扫描二维码时效fix

This commit is contained in:
limqhz
2020-08-30 18:40:18 +08:00
parent 311055815a
commit 4d11ab9c79
3 changed files with 16 additions and 15 deletions

View File

@@ -7,12 +7,12 @@ Page({
*/
data: {
venueId: undefined,
canOpen: true,
venue: {
},
isGoHome: false,
showDeleteDialog: false,
canOpen: true
showDeleteDialog: false
},
/**
@@ -23,11 +23,14 @@ Page({
app.$api.scanCodeInitVenue({
deviceId : this.data.venueId
}).then(res => {
var that = this;
if (res.venueInit){
this.setData({
venue: res.venueInit
})
setTimeout(canOpenDoor,60000);
}),
setTimeout(function() {
that.setData({canOpen : false});
},60000);
}
});
},
@@ -90,6 +93,12 @@ Page({
})
},
backClick : function(){
wx.redirectTo({
url: '/pages/home/index',
})
},
// 取消弹框
cancelDialog() {
this.setData({
@@ -97,13 +106,6 @@ Page({
})
},
// 取消开门
canOpenDoor() {
this.setData({
canOpen: false
})
},
confirmEnterDialog(){
this.setData({
showDeleteDialog: false
@@ -119,11 +121,11 @@ Page({
title: '请入场!'
});
}else {
canOpenDoor();
wx.showToast({
title: res.err_msg
});
}
this.setData({canOpen : false});
});
}