|
|
@@ -3936,7 +3936,7 @@ Page({
|
|
|
},
|
|
|
showData() {
|
|
|
const that = this;
|
|
|
- if (!wx.getStorageSync('res') || !wx.getStorageSync('res').result) {
|
|
|
+ if ((!wx.getStorageSync('res') || !wx.getStorageSync('res').result) && !wx.getStorageInfoSync('hotelEmpower') && !wx.getStorageInfoSync('roomEmpower')) {
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
|
content: '请先扫描房间二维码',
|
|
|
@@ -3951,21 +3951,29 @@ Page({
|
|
|
} else {
|
|
|
let hotelcodeTemp = '';
|
|
|
let roomcodeTemp = '';
|
|
|
+
|
|
|
if (wx.getStorageSync('res').result.split('|').length != 2) {
|
|
|
- wx.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '房间二维码不正确,请重新扫码',
|
|
|
- showCancel: false
|
|
|
- });
|
|
|
+ if (!wx.getStorageInfoSync('hotelEmpower') || !wx.getStorageInfoSync('roomEmpower')) {
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '房间二维码不正确,请重新扫码',
|
|
|
+ showCancel: false
|
|
|
+ });
|
|
|
|
|
|
- setTimeout(function () {
|
|
|
- wx.reLaunch({
|
|
|
- url: '/subpages/scan/scan',
|
|
|
- })
|
|
|
- }, 2000) // 设置延时时间,单位为毫秒
|
|
|
+ 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.getStorageInfoSync('hotelEmpower');
|
|
|
+ roomcodeTemp = wx.getStorageInfoSync('roomEmpower');
|
|
|
}
|
|
|
- hotelcodeTemp = wx.getStorageSync('res').result.split('|')[0];
|
|
|
- roomcodeTemp = wx.getStorageSync('res').result.split('|')[1];
|
|
|
entity = roomcodeTemp;
|
|
|
if (entity == 'labs') {
|
|
|
entity = '公司实验室';
|