扫描二维码时效fix
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
// pages/home/index.js
|
// pages/home/index.js
|
||||||
|
import {
|
||||||
|
getCurrentPageUrl
|
||||||
|
} from './../../utils/util.js'
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
let s = '';
|
let s = '';
|
||||||
let m = 0;
|
let m = 0;
|
||||||
@@ -206,6 +209,13 @@ Page({
|
|||||||
|
|
||||||
//扫描二维码
|
//扫描二维码
|
||||||
sacnQRCode() {
|
sacnQRCode() {
|
||||||
|
if (!wx.getStorageSync('accessToken')) {
|
||||||
|
wx.setStorageSync('history', getCurrentPageUrl());
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '/pages/login/index',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
wx.scanCode({
|
wx.scanCode({
|
||||||
success (res) {
|
success (res) {
|
||||||
// wx.showToast({
|
// wx.showToast({
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ Page({
|
|||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
that.setData({canOpen : false});
|
that.setData({canOpen : false});
|
||||||
},60000);
|
},60000);
|
||||||
|
}else if (res.InitError){
|
||||||
|
venue: res.InitError
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<view wx:if="{{canOpen==true}}" class='footer-btn' bindtap='enterClick'>开门</view>
|
<view wx:if="{{canOpen==true}}" class='footer-btn' bindtap='enterClick'>开门</view>
|
||||||
<view wx:if="{{canOpen==false}}" class='footer-btn' bindtap='backClick'>返回</view>
|
<view wx:if="{{canOpen==false}}" class='footer-btn' bindtap='backClick'>返回</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='container' wx:if="{{!venue.name}}">
|
<view class='container' wx:if="{{!venue.venueInit}}">
|
||||||
<rich-text class='info' nodes="门禁设备连接异常,请联系管理员!"></rich-text>
|
<rich-text class='info' nodes="{{venue.InitError}}"></rich-text>
|
||||||
</view>
|
</view>
|
||||||
<confirm-dialog title="{{'提示'}}" message="{{'确认开门'}}" bindcancelselect="cancelDialog" bindconfirmselect="confirmEnterDialog" wx:if="{{showDeleteDialog}}"></confirm-dialog>
|
<confirm-dialog title="{{'提示'}}" message="{{'确认开门'}}" bindcancelselect="cancelDialog" bindconfirmselect="confirmEnterDialog" wx:if="{{showDeleteDialog}}"></confirm-dialog>
|
||||||
Reference in New Issue
Block a user