瀏覽代碼

1。修改配对页面提示

slambb 5 年之前
父節點
當前提交
83def84aed
共有 2 個文件被更改,包括 26 次插入14 次删除
  1. 2 2
      manifest.json
  2. 24 12
      pages/personal-page/devices-hardware/devices-hardware.vue

+ 2 - 2
manifest.json

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

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

@@ -180,7 +180,6 @@
 				}).then(
 					res => {
 						console.log('BLEFINDHASBIND:', res);
-						// uni.hideToast();
 						if (res.code == 0) {
 							//code = 0 是新的地址,没绑定过
 							//绑定设备使用者
@@ -283,7 +282,7 @@
 							//2.跳转蓝牙设置
 							uni.showModal({
 								title:'蓝牙提示',
-								content:'请在弹出框点击确定匹配蓝牙。\r\n如没有提示框,重新刷新手机蓝牙,是否跳转手机蓝牙页面?',
+								content:'1.请在弹出框点击确定匹配蓝牙。\r\n2.如没有提示框,重新刷新手机蓝牙,是否跳转手机蓝牙页面?',
 								success: (res) => {
 									if(res.confirm){
 										this.B_OpenBLESetting();
@@ -331,7 +330,6 @@
 				let _self = this;
 				if (_self.bOpenBluetooth) {
 					
-					
 					//先查询最近使用的硬件,如果最近使用的和当前需要连接的item id一样,则认为是
 					if (_self.finallyUseDevice !== null) {
 						if (_self.finallyUseDevice.id == _self.currentItem.id) {
@@ -342,7 +340,7 @@
 							uni.showToast({
 								title: '设备连接中...',
 								icon: 'loading',
-								duration: 10000,
+								duration: 12000,
 								mask: true
 							})
 							// 先直连,然后判断版本
@@ -351,7 +349,7 @@
 
 							uni.showModal({
 								title: '连接提示!',
-								content: "确定则连接最近使用的设备。\r\n取消则重新搜索设备。",
+								content: "1.确定则连接最近使用的设备。\r\n2.取消则重新搜索设备。",
 								success: (res) => {
 									if (res.confirm) {
 										//currentItem 是mode 页面选中的item
@@ -363,7 +361,7 @@
 										uni.showToast({
 											title: '设备连接中...',
 											icon: 'loading',
-											duration: 10000,
+											duration: 12000,
 											mask: true
 										})
 										console.log("_onConnectDevice:::===", obj);
@@ -422,7 +420,7 @@
 						uni.showToast({
 							title: '设备连接中...',
 							icon: 'loading',
-							duration: 10000,
+							duration: 12000,
 							mask: true
 						})
 						console.log("B_GetBondedDevices:::===", obj);
@@ -442,7 +440,7 @@
 				uni.showToast({
 					title: '设备连接中...',
 					icon: 'loading',
-					duration: 10000,
+					duration: 12000,
 					mask: true
 				})
 				// 1.已经搜索到的,根据蓝牙回调的mac 地址判断合法性。
@@ -465,13 +463,13 @@
 					_self.searchTimeOut = null;
 				}
 				_self.searchTimeOut = setTimeout(() => {
-					//1.搜索10秒钟之后,停止搜索,走其他流程判断
+					//1.搜索12秒钟之后,停止搜索
 					_self.stopBluetoothDevicesDiscovery();
 					uni.showModal({
 						title: '搜索失败',
 						content: '1.请开启设备。\r\n2.或者断开手机蓝牙页面连接的手柄。\r\n待蓝色设备灯闪烁,再重新搜索连接。'
 					})
-				}, 10000)
+				}, 12000)
 			},
 			/**
 			 * 停止搜索蓝牙设备
@@ -554,6 +552,12 @@
 							console.log("*****getBLEDeviceServices************");
 							//连接成功了,设置旧的item
 							this.oldItem = this.currentItem;
+							uni.showToast({
+								title: '正在验证设备信息...',
+								icon: 'loading',
+								duration: 6000,
+								mask: true
+							})
 							// 初始化服务后,获取版本,判断
 							// 停止蓝牙加速计
 							this.writeMacTimeout = setTimeout(() => {
@@ -570,9 +574,10 @@
 									this.searchMac = null;
 								}
 								this.searchMac = setTimeout(() => {
+									uni.hideToast();
 									uni.showModal({
 										title: '提示',
-										content: '检测设备失败再次尝试连接或者 重启手柄(Reset键位也可)后再尝试重新连接'
+										content: '检测设备失败。\r\n1.检查手机蓝牙是否已连接上设备。\r\n2.再次尝试连接或者 重启手柄(Reset键位也可)后再尝试连接'
 									})
 									this.onOnlyCloseBLEConnection({
 										getSuccess: () => {
@@ -601,6 +606,12 @@
 									console.log("******getBLEDeviceServices************", res);
 									//连接成功了,设置旧的item
 									this.oldItem = this.currentItem;
+									uni.showToast({
+										title: '正在验证设备信息...',
+										icon: 'loading',
+										duration: 6000,
+										mask: true
+									})
 									// 初始化服务后,获取版本,判断
 									// 停止蓝牙加速计
 									this.writeMacTimeout = setTimeout(() => {
@@ -617,9 +628,10 @@
 											this.searchMac = null;
 										}
 										this.searchMac = setTimeout(() => {
+											uni.hideToast();
 											uni.showModal({
 												title: '提示',
-												content: '检测设备失败再次尝试连接或者 重启手柄(Reset键位也可)后再尝试重新连接'
+												content: '检测设备失败。\r\n1.检查手机蓝牙是否已连接上设备。\r\n2.再次尝试连接或者 重启手柄(Reset键位也可)后再尝试连接'
 											})
 											this.onOnlyCloseBLEConnection({
 												getSuccess: () => {