|
@@ -2,6 +2,7 @@ import ble_store from "../store/bluetooth";
|
|
import game_store from "../store/game";
|
|
import game_store from "../store/game";
|
|
import Toast from "../../static/vant/toast/toast";
|
|
import Toast from "../../static/vant/toast/toast";
|
|
import Notify from "../../static/vant/notify/notify";
|
|
import Notify from "../../static/vant/notify/notify";
|
|
|
|
+import WechatLog from "../utils/wechat_log";
|
|
|
|
|
|
function getDeviceWriteInfo() {
|
|
function getDeviceWriteInfo() {
|
|
let deviceId = ble_store.getters.getDeviceId();
|
|
let deviceId = ble_store.getters.getDeviceId();
|
|
@@ -356,7 +357,9 @@ export default {
|
|
if (isJELLYFISH()){
|
|
if (isJELLYFISH()){
|
|
|
|
|
|
$this.connect_toy = 2;
|
|
$this.connect_toy = 2;
|
|
- wx.showToast({title: "已连接到" + $this.toy_item.name });
|
|
+ if($this.toy_item && $this.toy_item.name){
|
|
|
|
+ wx.showToast({title: "已连接到" + $this.toy_item.name });
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
console.log("一对多")
|
|
console.log("一对多")
|
|
|
|
|
|
@@ -367,7 +370,9 @@ export default {
|
|
}
|
|
}
|
|
if (new RegExp("01").test($hex_index) === true) {
|
|
if (new RegExp("01").test($hex_index) === true) {
|
|
console.log("一对一")
|
|
console.log("一对一")
|
|
- wx.showToast({title: "已连接到" + $this.toy_item.name });
|
|
+ if($this.toy_item && $this.toy_item.name){
|
|
|
|
+ wx.showToast({title: "已连接到" + $this.toy_item.name });
|
|
|
|
+ }
|
|
|
|
|
|
$this.connect_toy = 2;
|
|
$this.connect_toy = 2;
|
|
|
|
|
|
@@ -598,6 +603,7 @@ export default {
|
|
$this.connect_toy = 0;
|
|
$this.connect_toy = 0;
|
|
$this.device_status = 0;
|
|
$this.device_status = 0;
|
|
$this.$forceUpdate();
|
|
$this.$forceUpdate();
|
|
|
|
+
|
|
},
|
|
},
|
|
});
|
|
});
|
|
},500);
|
|
},500);
|