柒零 преди 1 година
родител
ревизия
300d32fef0
променени са 1 файла, в които са добавени 36 реда и са изтрити 36 реда
  1. 36 36
      subpages/constitutionDiagnosis/constitutionDiagnosis.js

+ 36 - 36
subpages/constitutionDiagnosis/constitutionDiagnosis.js

@@ -562,45 +562,45 @@ Page({
 		this.setData({ promptTextMessageFlag: false });
 	},
 	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) {