htc 19 hours ago
parent
commit
2d94737453
1 changed files with 13 additions and 1 deletions
  1. 13 1
      components/deviceBox/index.vue

+ 13 - 1
components/deviceBox/index.vue

@@ -79,8 +79,9 @@
 								xBlufi.notifyConnectBle({
 									isStart: false,
 									deviceId: item.id,
-									name: '',
+									name: 'cx-mxb-wifi',
 								});
+								xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
 								setTimeout(()=>{
 									this.$emit('unbindSuccess')
 								},1000)
@@ -88,6 +89,17 @@
 						}
 					}
 				})
+			},
+			funListenDeviceMsgEvent: function(options) {
+				let that = this
+				switch (options.type) {
+					case xBlufi.XBLUFI_TYPE.TYPE_STATUS_CONNECTED:
+						that.connected = options.result
+						if (!options.result) {
+							console.log(options,'options')
+						}
+						break;
+				}
 			}
 		}
 	}