|
@@ -144,9 +144,6 @@ export default {
|
|
|
}
|
|
|
//判断是否游戏中
|
|
|
$this.game_status = game_store.getters.getGameStatus()*1;
|
|
|
- // 游戏过程中关闭脑机状态
|
|
|
- let $game_close_status = game_store.getters.getGameCloseStatus();
|
|
|
-
|
|
|
if ($this.game_status === 3) {
|
|
|
// getBluetoothLinkStatus
|
|
|
let $ble_status = ble_store.getters.getBluetoothLinkStatus();
|
|
@@ -154,25 +151,18 @@ export default {
|
|
|
//断开蓝牙连接
|
|
|
$this.setDeviceStatus(0);
|
|
|
}
|
|
|
-
|
|
|
//不在游戏状态
|
|
|
$this.connect_toy = 0;
|
|
|
- //$this.connect_show = true;
|
|
|
// 监听数据
|
|
|
$this.$connection.notifyDatas($this);
|
|
|
$this.$connection.watchBLEstatus($this);
|
|
|
-
|
|
|
- //$this.toy_UUID = "";
|
|
|
-
|
|
|
- // 重新连接失败
|
|
|
+ // 游戏过程中脑机断连
|
|
|
+ let $game_close_status = game_store.getters.getGameCloseStatus();
|
|
|
if ($game_close_status === 1) {
|
|
|
- console.log("---------------------------------------------------------------------")
|
|
|
// 重置默认条件
|
|
|
$this.connect_toy = 0;
|
|
|
- //$this.connect_show = false;
|
|
|
$this.device_status = 0;
|
|
|
$this.$connection.watchBLEstatus($this);
|
|
|
- //$this.toy_UUID = "";
|
|
|
// 清空链接的设备
|
|
|
ble_store.setters.clearDeviceToy();
|
|
|
game_store.setters.setPlayedTime(0);
|