|
@@ -562,45 +562,45 @@ Page({
|
|
|
this.setData({ promptTextMessageFlag: false });
|
|
this.setData({ promptTextMessageFlag: false });
|
|
|
},
|
|
},
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
|
- // var that = this;
|
|
|
|
|
- // console.log("sleepEvaluation页面");
|
|
|
|
|
- // // 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
|
|
|
|
|
- // });
|
|
|
|
|
|
|
+ var that = this;
|
|
|
|
|
+ console.log("sleepEvaluation页面");
|
|
|
|
|
+ // 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
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
- // 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 if (wx.getStorageSync('res').result.split('|').length != 2) {
|
|
|
|
|
+ wx.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '房间二维码不正确,请重新扫码',
|
|
|
|
|
+ showCancel: false
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
- // setTimeout(function () {
|
|
|
|
|
- // wx.reLaunch({
|
|
|
|
|
- // url: '/subpages/scan/scan',
|
|
|
|
|
- // })
|
|
|
|
|
- // }, 2000) // 设置延时时间,单位为毫秒
|
|
|
|
|
- // } else {
|
|
|
|
|
- // let hotelTemp = '';
|
|
|
|
|
- // let roomTemp = '';
|
|
|
|
|
|
|
+ setTimeout(function () {
|
|
|
|
|
+ wx.reLaunch({
|
|
|
|
|
+ url: '/subpages/scan/scan',
|
|
|
|
|
+ })
|
|
|
|
|
+ }, 2000) // 设置延时时间,单位为毫秒
|
|
|
|
|
+ } else {
|
|
|
|
|
+ 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('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) {
|
|
areAllArraysEmpty: function (arr1, arr2, arr3, arr4, arr5, arr6, arr7, arr8) {
|