Commit 542fd738 authored by 罗超's avatar 罗超

2

parent b17efaae
<template>
<view>
<u-popup v-model="showDig" :maskCloseAble="false" mode="center" @close="closePopup">
<u-popup v-model="showDig" :maskCloseAble="false" mode="center" @close="closePopup" >
<view style="margin: 60rpx;">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/cup3.png"
mode="widthFix" style="width:546rpx;height:auto;display: block;"></image>
......@@ -25,10 +25,6 @@
<script>
export default {
// model: {
// prop: 'show',
// event: "change"
// },
props: {
show:{
type:Boolean,
......@@ -37,6 +33,7 @@
},
watch:{
show(val){
console.log(36,val)
this.showDig=val
}
},
......@@ -48,7 +45,7 @@
methods: {
closePopup() {
this.$emit("close");
}
},
},
}
</script>
......
......@@ -83,7 +83,7 @@
themeColor="#44766E" is_themeImg :h_w_img="80" :themeImg="headImg" />
</view>
</u-popup>
<ComfirmDig :show="isShowSuccess" @close="isShowSuccess=false"></ComfirmDig>
<ComfirmDig :show="isShowSuccess" @close="closeComfirmDig"></ComfirmDig>
</view>
</template>
......@@ -106,7 +106,9 @@
headImg: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/cup.png",
pageData: {},
isShowSuccess: false,
timer:null
timer:null,
timing:0,//二维码计时用
flag:false,
}
},
......@@ -127,10 +129,11 @@
UserId: this.UserId,
timestamp: this.timestamp
}))
console.log(this.qrData)
await this.showQrcode() //生成二维码
this.isShowQrcode = true
setTimeout(() => {
this.timing=Date.now()
this.flag=true
this.getVerificat()
}, 2000)
},
......@@ -173,18 +176,30 @@
}
},
res => {
console.log(res)
if (res.data.State === 1) {
this.isShowSuccess = false
this.isShowSuccess = true
clearTimeout(this.timer)
} else if (res.data.State === 2) {
this.timer = setTimeout(() => {
// this.getVerificat()
let curTime=Date.now()
if((curTime-this.timing)<2*60*1000&&this.flag){
// this.getVerificat()
}else{
console.log('二维码超时')
clearTimeout(this.timer)
}
}, 2000)
}
}
);
},
closeComfirmDig(){
console.log(111)
this.isShowSuccess=false
clearTimeout(this.timer)
this.flag=false
}
}
}
</script>
......
......@@ -8,7 +8,9 @@
星巴克咖啡
</view>
<view class="Number">
-{{item.Number}}
<text v-if="item.Type==2">-</text>
<text v-if="item.Type==1">+</text>
{{item.Number}}
</view>
</view>
<view class="top">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment