mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:13: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-for="(item, j) in state.days" :key="j" class='dateCell'>
|
||||||
<view v-if="item.date">
|
<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>
|
<text>{{ item.date }}</text>
|
||||||
</view>
|
</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="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>
|
<text>{{ item.date }}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 今日未签到-->
|
<!-- 今日未签到-->
|
||||||
@@ -63,7 +62,7 @@
|
|||||||
</coreshop-page>
|
</coreshop-page>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive } from 'vue';
|
import { reactive ,watch} from 'vue';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
import { queryUserCheckByMonth, queryUserCheckCount, queryUserCheckIn } from '@/core/api';
|
import { queryUserCheckByMonth, queryUserCheckCount, queryUserCheckIn } from '@/core/api';
|
||||||
import { handleShowToast } from '@/core/utils';
|
import { handleShowToast } from '@/core/utils';
|
||||||
@@ -117,6 +116,12 @@
|
|||||||
onJudgeSign();
|
onJudgeSign();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
watch(()=> state.dataSource ,(newVal:any)=>{
|
||||||
|
if(newVal){
|
||||||
|
state.SignUp = newVal;
|
||||||
|
onJudgeSign();
|
||||||
|
}
|
||||||
|
})
|
||||||
/** 获取用户按月签到数据 */
|
/** 获取用户按月签到数据 */
|
||||||
const getUserCheckByMonth = async (cur_year : number, cur_month : number) => {
|
const getUserCheckByMonth = async (cur_year : number, cur_month : number) => {
|
||||||
const checkByMonth : Response<any> = await queryUserCheckByMonth({
|
const checkByMonth : Response<any> = await queryUserCheckByMonth({
|
||||||
|
|||||||
Reference in New Issue
Block a user