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

2

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