|
@@ -132,13 +132,7 @@ export default {
|
|
|
// show: true,
|
|
|
},
|
|
|
//'水柱音箱', '喷雾恐龙(大)', '喷雾恐龙(小)', '轨道车', '碰碰车', '小车(大)', '小车(中)', '小车(小)', '飞行器(大)', '飞行器(小)', '水母灯'
|
|
|
- toy_list: [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- name: "水柱音箱",
|
|
|
- img: "https://img.shuimuai.com/web/toy_car.png",
|
|
|
- },
|
|
|
- ],
|
|
|
+ toy_list: [],
|
|
|
toy_action: 1,
|
|
|
connect_show: false,
|
|
|
// connect_show: true,
|
|
@@ -146,11 +140,7 @@ export default {
|
|
|
connect_toy: 0,
|
|
|
code: "jellyfish1234",
|
|
|
device: {},
|
|
|
- canWrite: false,
|
|
|
_deviceId: "",
|
|
|
- _serviceId: "",
|
|
|
- _characteristicId: "",
|
|
|
- chs: [],
|
|
|
_device_index: false,
|
|
|
};
|
|
|
},
|
|
@@ -307,6 +297,7 @@ export default {
|
|
|
console.log("成功连接");
|
|
|
//成功连接脑环蓝牙
|
|
|
$this.change_device_status(2);
|
|
|
+ bluetooth.watch_bluetooth_status($this)
|
|
|
// $this.getBLEDeviceServices($this.device.deviceId)
|
|
|
},
|
|
|
fail(err) {
|
|
@@ -342,7 +333,6 @@ export default {
|
|
|
// 开始游戏的方法
|
|
|
game_start() {
|
|
|
game_store.commit("setToyIndex", $this.toy_action - 1);
|
|
|
- // bluetooth.sendConnect($this.toy_action - 1, $this._deviceId, $this._serviceId, $this._characteristicId)
|
|
|
console.log("device.vue", $this._deviceId);
|
|
|
},
|
|
|
},
|