|
|
@@ -600,49 +600,60 @@ Page({
|
|
|
var that = this;
|
|
|
console.log("sleepEvaluation页面");
|
|
|
// wx.clearStorage();
|
|
|
- if ((!wx.getStorageSync('res') || !wx.getStorageSync('res').result) && !wx.getStorageSync('hotelEmpower') && !wx.getStorageSync('roomEmpower')) {
|
|
|
- wx.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '请先扫描房间二维码',
|
|
|
- showCancel: false
|
|
|
- });
|
|
|
-
|
|
|
- setTimeout(function () {
|
|
|
- wx.reLaunch({
|
|
|
- url: '/subpages/scan/scan',
|
|
|
- })
|
|
|
- }, 2000) // 设置延时时间,单位为毫秒
|
|
|
- } else {
|
|
|
- let hotelcodeTemp = '';
|
|
|
- let roomcodeTemp = '';
|
|
|
+ // if ((!wx.getStorageSync('res') || !wx.getStorageSync('res').result) && !wx.getStorageSync('hotelEmpower') && !wx.getStorageSync('roomEmpower')) {
|
|
|
+ // wx.showModal({
|
|
|
+ // title: '提示',
|
|
|
+ // content: '请先扫描房间二维码',
|
|
|
+ // showCancel: false
|
|
|
+ // });
|
|
|
+
|
|
|
+ // setTimeout(function () {
|
|
|
+ // wx.reLaunch({
|
|
|
+ // url: '/subpages/scan/scan',
|
|
|
+ // })
|
|
|
+ // }, 2000) // 设置延时时间,单位为毫秒
|
|
|
+ // } else {
|
|
|
+ // let hotelcodeTemp = '';
|
|
|
+ // let roomcodeTemp = '';
|
|
|
+
|
|
|
+ // if (wx.getStorageSync('res') && wx.getStorageSync('res').result && wx.getStorageSync('res').result.split('|').length != 2) {
|
|
|
+ // if (!wx.getStorageSync('hotelEmpower') || !wx.getStorageSync('roomEmpower')) {
|
|
|
+ // wx.showModal({
|
|
|
+ // title: '提示',
|
|
|
+ // content: '房间二维码不正确,请重新扫码',
|
|
|
+ // showCancel: false
|
|
|
+ // });
|
|
|
+
|
|
|
+ // setTimeout(function () {
|
|
|
+ // wx.reLaunch({
|
|
|
+ // url: '/subpages/scan/scan',
|
|
|
+ // })
|
|
|
+ // }, 2000) // 设置延时时间,单位为毫秒
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if (wx.getStorageSync('res') && wx.getStorageSync('res').result) {
|
|
|
+ // hotelcodeTemp = wx.getStorageSync('res').result.split('|')[0];
|
|
|
+ // roomcodeTemp = wx.getStorageSync('res').result.split('|')[1];
|
|
|
+ // } else {
|
|
|
+ // hotelcodeTemp = wx.getStorageSync('hotelEmpower');
|
|
|
+ // roomcodeTemp = wx.getStorageSync('roomEmpower');
|
|
|
+ // }
|
|
|
+ // this.setData({
|
|
|
+ // hotel: hotelcodeTemp,
|
|
|
+ // room: roomcodeTemp,
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ let hotelTemp = '';
|
|
|
+ let roomTemp = '';
|
|
|
|
|
|
- if (wx.getStorageSync('res') && wx.getStorageSync('res').result && wx.getStorageSync('res').result.split('|').length != 2) {
|
|
|
- if (!wx.getStorageSync('hotelEmpower') || !wx.getStorageSync('roomEmpower')) {
|
|
|
- wx.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '房间二维码不正确,请重新扫码',
|
|
|
- showCancel: false
|
|
|
- });
|
|
|
-
|
|
|
- setTimeout(function () {
|
|
|
- wx.reLaunch({
|
|
|
- url: '/subpages/scan/scan',
|
|
|
- })
|
|
|
- }, 2000) // 设置延时时间,单位为毫秒
|
|
|
- }
|
|
|
- }
|
|
|
- if (wx.getStorageSync('res') && wx.getStorageSync('res').result) {
|
|
|
- hotelcodeTemp = wx.getStorageSync('res').result.split('|')[0];
|
|
|
- roomcodeTemp = wx.getStorageSync('res').result.split('|')[1];
|
|
|
- } else {
|
|
|
- hotelcodeTemp = wx.getStorageSync('hotelEmpower');
|
|
|
- roomcodeTemp = wx.getStorageSync('roomEmpower');
|
|
|
- }
|
|
|
- this.setData({
|
|
|
- hotel: hotelcodeTemp,
|
|
|
- room: roomcodeTemp,
|
|
|
- });
|
|
|
- }
|
|
|
+ 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,
|
|
|
+ });
|
|
|
},
|
|
|
submitDB: function () {
|
|
|
var that = this;
|