Преглед изворни кода

优化提示和超时时间(7秒)

htc пре 1 дан
родитељ
комит
b3bc894b96
1 измењених фајлова са 15 додато и 15 уклоњено
  1. 15 15
      pagesMy/wifiSet.vue

+ 15 - 15
pagesMy/wifiSet.vue

@@ -93,11 +93,11 @@
 			this.initTimeout = setTimeout(() => {
 				wx.hideLoading();
 				wx.showModal({
-					title: '提示',
-					content: '设备初始化超时,请重试',
+					title: '温馨提示',
+					content: '设备初始化超时,请返回上一页重试;若多次超时,请重启设备。',
 					showCancel: false
 				});
-			}, 10000); // 10秒超时
+			}, 5000); // 5秒超时
 
 			xBlufi.notifyInitBleEsp32({
 				deviceId: options.deviceId,
@@ -139,7 +139,7 @@
 						if (!options.result)
 							wx.showModal({
 								title: '配网失败',
-								content: '请检查WiFi和密码是否正确',
+								content: '请检查:\n1、WiFi和密码是否正确(可手动输入);\n2、设备是否处于待配网状态。',
 								showCancel: false,
 							})
 						else {
@@ -193,17 +193,17 @@
 									this.wifiListFetchTimeout = setTimeout(() => {
 										wx.hideLoading();
 										wx.showModal({
-											title: '提示',
-											content: '获取Wi-Fi列表超时,请重试',
+											title: '温馨提示',
+											content: '获取Wi-Fi列表超时,您也可手动输入WiFi和密码。',
 											showCancel: false
 										});
-									}, 10000);
+									}, 7000);
 								}
 							} else {
 								that.connected = false
 								wx.showModal({
 									title: '温馨提示',
-									content: `设备初始化失败`,
+									content: '设备初始化失败,请返回上一页重试;若多次失败,请重启设备。',
 									showCancel: false, //是否显示取消按钮
 								})
 							}
@@ -233,12 +233,12 @@
 					// 获取Wi-Fi列表超时处理
 					this.wifiListFetchTimeout = setTimeout(() => {
 						wx.hideLoading();
-						wx.showModal({
-							title: '提示',
-							content: '获取Wi-Fi列表超时,请重试',
+						wx.showModal({
+							title: '温馨提示',
+							content: '获取Wi-Fi列表超时,可手动输入WiFi和密码。',
 							showCancel: false
 						});
-					}, 10000);
+					}, 7000);
 				}else{
 					wx.showLoading({title:'正在获取WiFi...'})
 					this.wifiList = [];
@@ -259,10 +259,10 @@
 					wx.hideLoading();
 					wx.showModal({
 						title: '配网超时',
-						content: '请检查WiFi密码或设备状态',
+						content: '请检查:\n1、WiFi名和密码是否正确(可手动输入);\n2、设备是否处于待配网状态。',
 						showCancel: false
 					});
-				}, 10000); 
+				}, 7000); 
 
 				xBlufi.notifySendRouterSsidAndPassword({
 					ssid: that.wifiSSID,
@@ -286,7 +286,7 @@
 				this.isInitOK = true
 			},
 			startSearchWifi() {
-				wx.showLoading({title:'设备初始化获取WiFi...'})
+				wx.showLoading({title:'设备初始化获取WiFi...'})
 				this.wifiList = [];
 				uni.startWifi({
 					success: (res) => {