This commit is contained in:
chenrx
2024-06-07 16:38:53 +08:00
parent a93fdfe6fd
commit 0388b52d22
2 changed files with 22 additions and 13 deletions
+19 -11
View File
@@ -24,6 +24,7 @@ Page({
nowTime: "",
item: {},
info: "",
fail_img: ''
},
/**
@@ -99,18 +100,25 @@ Page({
}
/////接口方法
_.apiQuery.getappSignConf(params).then(res => {
this.setData({
qrcode_img: res.data.qcode,
qrcode_count_time: parseInt(res.data.qrcode_count_time),
loading: false,
info: res.data
}, () => {
wx.hideLoading()
this.getTimes(this.data.qrcode_count_time).then(() => {
this.getappSignConf()
if (res.data.type == 'fail') {
this.setData({
fail_img:res.data.fail_img
})
this.setScreenBright()
})
} else {
this.setData({
qrcode_img: res.data.qcode,
qrcode_count_time: parseInt(res.data.qrcode_count_time),
loading: false,
info: res.data
}, () => {
wx.hideLoading()
this.getTimes(this.data.qrcode_count_time).then(() => {
this.getappSignConf()
})
this.setScreenBright()
})
}
})
})
},
+3 -2
View File
@@ -14,10 +14,11 @@
<view class="text-center color-fff font-34 pt20 pb20" style="background-color:#1a1c26;color:#fff3e4;">邀请客户微信扫码签到</view>
<view class="ulib-r20 bg-fff inner40" style="min-height:20vh;">
<view class="text-center">
<image class="img-400x400" src="data:image/PNG;base64,{{qrcode_img}}" />
<image class="img-400x400" wx:if="{{qrcode_img}}" src="data:image/PNG;base64,{{qrcode_img}}" />
<image class="img-400x400" wx:else src="{{fail_img}}" />
<view class="text-center font-28 fn-flex fn-flex-center fn-flex-middle mt30 color-999">
<text wx:if="{{info}}">{{wxTimerList.wxTimer.tim||0}}秒后失效</text>
<view class="ml15 font-24" style="color:#36f" bindtap="getappSignConf">立即刷新</view>
<view class="font-24" style="color:#36f" bindtap="getappSignConf">立即刷新</view>
</view>
<view class="font-24 mt30" style="color:#f10">客户点击签到,授权手机号及地理位置方可签到成功</view>
</view>