Ver Fonte

1.修改匹配蓝牙页面断开连接的提示,添加获取服务列表部分失败函数 getFail
2.修改版本2.1.3,21012502,日期25

slambb há 5 anos atrás
pai
commit
e5e97de58e

+ 1 - 1
common/config.js

@@ -1,6 +1,6 @@
 //设置游戏列表的更新时间,超过这个时间,不显示出来
 //"2020-07-14"
-const endTime = "2021-01-22"
+const endTime = "2021-01-25"
 
 
 //线上地址,腾讯云服务器

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "哔蹦",
     "appid" : "__UNI__2635DF5",
     "description" : "",
-    "versionName" : "2.1.2",
-    "versionCode" : 21012501,
+    "versionName" : "2.1.3",
+    "versionCode" : 21012502,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 12 - 1
pages/personal-page/devices-hardware/devices-hardware.vue

@@ -318,7 +318,18 @@
 					//假如匹配过程中断开连接
 					this.$store.state.BLEConnectDevice = null;
 					this.$store.state.bConnection = false;
-					uni.hideToast();
+					// uni.hideToast();
+					// console.log("//假如匹配过程中断开连接");
+					uni.showToast({
+						title:'连接失败,请检查设备是否正常。',
+						icon:'none',
+						mask:true,
+						duration:2000
+					})
+					if (this.getServicesTimeout) {
+						clearTimeout(this.getServicesTimeout);
+						this.getServicesTimeout = null;
+					}
 				}
 
 			},

+ 16 - 4
util/util-js/store.js

@@ -1418,6 +1418,14 @@ const store = new Vuex.Store({
 							getServiceList: (serviceList) => {
 								//搜索服务失败后
 								state.BLEGetServices = serviceList;
+							},
+							getFail:()=>{
+								this.commit("B_CloseBLEConnection", {
+									deviceId: item.deviceId
+								})
+								state.cIndex = -1;
+								state.bConnection = false;
+								state.bVerifiedConnection = false;
 							}
 						});
 
@@ -1542,12 +1550,13 @@ const store = new Vuex.Store({
 				callback: success,
 				getServiceList: (serviceList) => {
 					state.BLEGetServices = serviceList;
-				}
+				},
+				getFail:()=>{}
 			})
 		},
 		onCloseBLEConnection(state, context) {
 
-			console.log("onCloseBLEConnection");
+			console.log("onCloseBLEConnection", state.BLEConnectDevice);
 			let {
 				getSuccess = null,
 			} = context;
@@ -1933,7 +1942,8 @@ const store = new Vuex.Store({
 				retryCount,
 				item,
 				callback,
-				getServiceList
+				getServiceList,
+				getFail,
 			} = context;
 			let serviceList = [];
 			let _self = this;
@@ -1954,7 +1964,9 @@ const store = new Vuex.Store({
 							},500)
 							return;
 						}
-					
+						if(getFail){
+							getFail();
+						}
 						uni.hideToast();
 						uni.showModal({
 							title: '提示',