公立人生计时器调整,会员数据调整

This commit is contained in:
唐明明
2022-06-12 12:43:05 +08:00
parent dbd2a03d34
commit 564d5921bc
13 changed files with 10423 additions and 10065 deletions

View File

@@ -13,11 +13,11 @@
<view class="life-sign-icon-text">{{isSign ? 'GLF': '签到'}}</view>
<image class="life-sign-icon-image" :src="require('@/static/icon/sign_btn.png')" alt="签到"></image>
</view>
<block v-if="isSign">
<view v-show="isSign">
<view class="life-sign-num">{{base_hour}}</view>
<view class="life-sign-unit">GLF/h</view>
<view class="life-sign-time">
<u-count-down :time="nextSignAt" format="HH:mm:ss" @change="TimeDown">
<u-count-down ref="countDown" :time="nextSignAt" format="HH:mm:ss" :autoStart="false" @change="TimeDown" @finish="TimeFinish">
<view class="time">
<text class="time__item">{{ timeData.hours > 9 ? timeData.hours: '0'+timeData.hours}}:</text>
<text class="time__item">{{ timeData.minutes > 9 ? timeData.minutes: '0'+timeData.minutes }}:</text>
@@ -25,7 +25,7 @@
</view>
</u-count-down>
</view>
</block>
</view>
</view>
<image class="life-cover-back" :src="require('@/static/life/back.png')"></image>
<view class="life-role">
@@ -66,20 +66,20 @@
<image src="../../static/img/team_back.jpg" mode="aspectFill"></image>
</view>
</view>
<view class="life-flex-item other" @click="onToast('消息中心暂未开放尽情期待')">
<!-- <view class="life-flex-item other" @click="onToast('消息中心暂未开放尽情期待')">
<view class="other-title">
<image src="../../static/life/icon_05.png" mode="widthFix"></image>
消息中心
</view>
<view class="other-subtitle">{{message > 0 ? message + '条未读消息': '暂无消息'}}</view>
<image class="other-back" src="../../static/life/icon_07.png"></image>
</view>
</view> -->
<view class="life-flex-item other" @click="onNav({name: 'Invitation'}, '')">
<view class="other-title">
<image src="../../static/life/icon_03.png" mode="widthFix"></image>
邀请朋友
</view>
<view class="other-subtitle">加速共力增长</view>
<view class="other-subtitle">加速共力增长</view>
<image class="other-back" src="../../static/life/icon_08.png"></image>
</view>
<view class="life-flex-item other" @click="onNav({name: 'Order',params:{index:0}})">
@@ -90,14 +90,14 @@
<view class="other-subtitle">{{order.all || '暂无订单'}}</view>
<image class="other-back" src="../../static/life/icon_09.png"></image>
</view>
<view class="life-flex-item other" @click="onToast('共力好友暂未开放尽情期待')">
<!-- <view class="life-flex-item other" @click="onToast('共力好友暂未开放尽情期待')">
<view class="other-title">
<image src="../../static/life/icon_06.png" mode="widthFix"></image>
共力好友
</view>
<view class="other-subtitle">在线即时互动</view>
<image class="other-back" src="../../static/life/icon_10.png"></image>
</view>
</view> -->
</view>
</view>
</template>
@@ -121,10 +121,10 @@
},
message: 0,
order: {
all: 0,
init: 0,
pay: 0,
delivered: 0
all : 0,
init : 0,
pay : 0,
delivered : 0
},
nextSignAt : 0,
glz : 0,
@@ -142,6 +142,11 @@
TimeDown(e){
this.timeData = e
},
// 倒计时结束
TimeFinish(){
this.isSign = false
clearInterval(account)
},
// 共力人生
getLife(){
life().then(res => {
@@ -168,10 +173,22 @@
},
// 计时器
outTime(){
account = setInterval(() =>{
let newGlz = (Number(this.glz) + this.base_seconds)
this.glz = newGlz.toFixed(4)
}, 1000)
this.$nextTick(() => {
try{
// 计算数值
account = setInterval(() =>{
let newGlz = (Number(this.glz) + this.base_seconds)
this.glz = newGlz.toFixed(4)
}, 1000)
// 签到开始倒计时
this.$refs.countDown.start();
}catch(e){
uni.showToast({
title: e,
icon : 'none'
})
}
})
},
// 签到
onSign(){
@@ -213,6 +230,7 @@
},
onHide() {
clearInterval(account)
this.$refs.countDown.pause();
}
}
</script>