mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:23:26 +08:00
Merge branch 'dev' into 'master'
uniapp【优化】:签到页面样式优化 See merge request jianweie/coreshoppro!94
This commit is contained in:
@@ -35,13 +35,12 @@
|
||||
<view v-for="(item, j) in state.days" :key="j" class='dateCell'>
|
||||
<view v-if="item.date">
|
||||
<!-- 已签到日期 -->
|
||||
<view v-if="item.isSign == true" class='cell greenColor '>
|
||||
<view v-if="item.isSign == true" class='cell greenColor bgWhite'>
|
||||
<text>{{ item.date }}</text>
|
||||
</view>
|
||||
<!-- 漏签 -->
|
||||
<view @click="clickSignUp(item.date, 0)" class="cell bgGary"
|
||||
<view @click="clickSignUp(item.date, 0)" class="cell bgGary redColor"
|
||||
v-else-if="state.cur_year < state.toYear || (state.cur_year == state.toYear && state.cur_month < state.toMonth) || (state.cur_year == state.toYear && state.cur_month == state.toMonth && item.date < state.today)">
|
||||
<!-- 小程序不兼容这个 v-else-if="(new Date(cur_year+'-'+cur_month+'-'+item.date))<(new Date())"> -->
|
||||
<text>{{ item.date }}</text>
|
||||
</view>
|
||||
<!-- 今日未签到-->
|
||||
@@ -63,7 +62,7 @@
|
||||
</coreshop-page>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { reactive } from 'vue';
|
||||
import { reactive ,watch} from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { queryUserCheckByMonth, queryUserCheckCount, queryUserCheckIn } from '@/core/api';
|
||||
import { handleShowToast } from '@/core/utils';
|
||||
@@ -116,7 +115,13 @@
|
||||
calculateDays(state.cur_year, state.cur_month);
|
||||
onJudgeSign();
|
||||
})
|
||||
|
||||
|
||||
watch(()=> state.dataSource ,(newVal:any)=>{
|
||||
if(newVal){
|
||||
state.SignUp = newVal;
|
||||
onJudgeSign();
|
||||
}
|
||||
})
|
||||
/** 获取用户按月签到数据 */
|
||||
const getUserCheckByMonth = async (cur_year : number, cur_month : number) => {
|
||||
const checkByMonth : Response<any> = await queryUserCheckByMonth({
|
||||
|
||||
Reference in New Issue
Block a user