更改验证码接口
This commit is contained in:
@@ -104,9 +104,7 @@
|
||||
|
||||
<script>
|
||||
import { life, sign } from '@/apis/interfaces/life.js'
|
||||
|
||||
var account;
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -132,6 +130,7 @@
|
||||
base_seconds: 0,
|
||||
timeData : {},
|
||||
isSign : false,
|
||||
isAccount : false,
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
@@ -145,7 +144,10 @@
|
||||
// 倒计时结束
|
||||
TimeFinish(){
|
||||
this.isSign = false
|
||||
clearInterval(account)
|
||||
if(this.isAccount){
|
||||
this.isAccount = false;
|
||||
clearInterval(account)
|
||||
}
|
||||
},
|
||||
// 共力人生
|
||||
getLife(){
|
||||
@@ -176,10 +178,13 @@
|
||||
this.$nextTick(() => {
|
||||
try{
|
||||
// 计算数值
|
||||
account = setInterval(() =>{
|
||||
let newGlz = (Number(this.glz) + this.base_seconds)
|
||||
this.glz = newGlz.toFixed(4)
|
||||
}, 1000)
|
||||
if(!this.isAccount){
|
||||
this.isAccount = true;
|
||||
account = setInterval(() =>{
|
||||
let newGlz = (Number(this.glz) + this.base_seconds)
|
||||
this.glz = newGlz.toFixed(4)
|
||||
}, 1000)
|
||||
}
|
||||
// 签到开始倒计时
|
||||
this.$refs.countDown.start();
|
||||
}catch(e){
|
||||
@@ -232,6 +237,7 @@
|
||||
try{
|
||||
clearInterval(account)
|
||||
this.$refs.countDown.pause();
|
||||
this.isAccount = false;
|
||||
}catch(err){
|
||||
uni.showToast({
|
||||
title: err,
|
||||
|
||||
Reference in New Issue
Block a user