|
|
@@ -536,7 +536,7 @@ Page({
|
|
|
success() {
|
|
|
setTimeout(() => {
|
|
|
wx.navigateTo({
|
|
|
- url: `/subpages/detectionResult/detectionResult?comScoreIndex=${comScoreIndex.slice(0,1)}`,
|
|
|
+ url: `/subpages/detectionResult/detectionResult?comScoreIndex=${comScoreIndex.slice(0, 1)}`,
|
|
|
})
|
|
|
}, 1000);
|
|
|
}
|
|
|
@@ -621,63 +621,65 @@ Page({
|
|
|
var that = this;
|
|
|
console.log("constitutionDiagnosis页面");
|
|
|
// wx.clearStorage();
|
|
|
- console.log('option.res=' + JSON.stringify(wx.getStorageSync('res')));
|
|
|
- if (!wx.getStorageSync('res') || !wx.getStorageSync('res').result) {
|
|
|
- wx.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '请先扫描房间二维码',
|
|
|
- showCancel: false
|
|
|
- });
|
|
|
+ // console.log('option.res=' + JSON.stringify(wx.getStorageSync('res')));
|
|
|
+ // if (!wx.getStorageSync('res') || !wx.getStorageSync('res').result) {
|
|
|
+ // wx.showModal({
|
|
|
+ // title: '提示',
|
|
|
+ // content: '请先扫描房间二维码',
|
|
|
+ // showCancel: false
|
|
|
+ // });
|
|
|
+
|
|
|
+ // setTimeout(function () {
|
|
|
+ // wx.reLaunch({
|
|
|
+ // url: '/subpages/scan/scan',
|
|
|
+ // })
|
|
|
+ // }, 2000) // 设置延时时间,单位为毫秒
|
|
|
+ // } else if (wx.getStorageSync('res').result.split('|').length != 2) {
|
|
|
+ // wx.showModal({
|
|
|
+ // title: '提示',
|
|
|
+ // content: '房间二维码不正确,请重新扫码',
|
|
|
+ // showCancel: false
|
|
|
+ // });
|
|
|
+
|
|
|
+ // setTimeout(function () {
|
|
|
+ // wx.reLaunch({
|
|
|
+ // url: '/subpages/scan/scan',
|
|
|
+ // })
|
|
|
+ // }, 2000) // 设置延时时间,单位为毫秒
|
|
|
+ // } else {
|
|
|
+ // const expiresAt = wx.getStorageSync('scanResultExpiresAt');
|
|
|
+ // const now = Date.now()
|
|
|
+ // if (expiresAt || expiresAt < now) {
|
|
|
+ // // 扫码结果已过期
|
|
|
+ // wx.showToast({
|
|
|
+ // title: '扫码结果失效或已过期,请重新扫码',
|
|
|
+ // icon: 'none'
|
|
|
+ // });
|
|
|
+ // // 清除过期的扫码结果
|
|
|
+ // wx.removeStorageSync('scanResultExpiresAt');
|
|
|
+ // setTimeout(function() {
|
|
|
+ // wx.reLaunch({
|
|
|
+ // url: '/pages/scan/scan',
|
|
|
+ // })
|
|
|
+ // }, 2000) // 设置延时时间,单位为毫秒
|
|
|
+
|
|
|
+ // }else{
|
|
|
+ // //续期
|
|
|
+ // wx.setStorageSync('scanResultExpiresAt', Date.now() + 2 * 60 * 60 * 1000)
|
|
|
+ // }
|
|
|
|
|
|
- setTimeout(function () {
|
|
|
- wx.reLaunch({
|
|
|
- url: '/subpages/scan/scan',
|
|
|
- })
|
|
|
- }, 2000) // 设置延时时间,单位为毫秒
|
|
|
- } else if (wx.getStorageSync('res').result.split('|').length != 2) {
|
|
|
- wx.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '房间二维码不正确,请重新扫码',
|
|
|
- showCancel: false
|
|
|
- });
|
|
|
+ let hotelTemp = '';
|
|
|
+ let roomTemp = '';
|
|
|
|
|
|
- setTimeout(function () {
|
|
|
- wx.reLaunch({
|
|
|
- url: '/subpages/scan/scan',
|
|
|
- })
|
|
|
- }, 2000) // 设置延时时间,单位为毫秒
|
|
|
- } else {
|
|
|
- // const expiresAt = wx.getStorageSync('scanResultExpiresAt');
|
|
|
- // const now = Date.now()
|
|
|
- // if (expiresAt || expiresAt < now) {
|
|
|
- // // 扫码结果已过期
|
|
|
- // wx.showToast({
|
|
|
- // title: '扫码结果失效或已过期,请重新扫码',
|
|
|
- // icon: 'none'
|
|
|
- // });
|
|
|
- // // 清除过期的扫码结果
|
|
|
- // wx.removeStorageSync('scanResultExpiresAt');
|
|
|
- // setTimeout(function() {
|
|
|
- // wx.reLaunch({
|
|
|
- // url: '/pages/scan/scan',
|
|
|
- // })
|
|
|
- // }, 2000) // 设置延时时间,单位为毫秒
|
|
|
-
|
|
|
- // }else{
|
|
|
- // //续期
|
|
|
- // wx.setStorageSync('scanResultExpiresAt', Date.now() + 2 * 60 * 60 * 1000)
|
|
|
- // }
|
|
|
-
|
|
|
- let hotelTemp = '';
|
|
|
- let roomTemp = '';
|
|
|
-
|
|
|
- hotelTemp = wx.getStorageSync('res').result.split('|')[0];
|
|
|
- roomTemp = wx.getStorageSync('res').result.split('|')[1];
|
|
|
- this.setData({
|
|
|
- hotel: hotelTemp,
|
|
|
- room: roomTemp,
|
|
|
- });
|
|
|
- }
|
|
|
+ hotelTemp = wx.getStorageSync('hotelEmpower');
|
|
|
+ roomTemp = wx.getStorageSync('roomEmpower');
|
|
|
+ // hotelTemp = wx.getStorageSync('res').result.split('|')[0];
|
|
|
+ // roomTemp = wx.getStorageSync('res').result.split('|')[1];
|
|
|
+ this.setData({
|
|
|
+ hotel: hotelTemp,
|
|
|
+ room: roomTemp,
|
|
|
+ });
|
|
|
+ // }
|
|
|
|
|
|
},
|
|
|
areAllArraysEmpty: function (arr1, arr2, arr3, arr4, arr5, arr6, arr7, arr8) {
|