|
@@ -104,7 +104,9 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 窗口弹出-->
|
|
|
- <van-popup :show="pop_show" @close="close_pop" round :close-on-click-overlay="false">
|
|
|
+ <van-popup :show="pop_show" @close="close_pop" round :close-on-click-overlay="false"
|
|
|
+ overlay
|
|
|
+ z-index="99">
|
|
|
<div class="err_container flex flex-direction align-center justify-around">
|
|
|
<view>
|
|
|
<text class="title">
|
|
@@ -133,6 +135,7 @@ import bluetooth from "../../utils/bluetooth";
|
|
|
import game_store from "@/store/game";
|
|
|
import Toast from '../../../static/vant/toast/toast';
|
|
|
import {game_devices, gameAddLine, gameEnd} from "../../requests/game";
|
|
|
+import ext from "../../utils/ext";
|
|
|
|
|
|
var att_charts,
|
|
|
med_charts,
|
|
@@ -342,12 +345,6 @@ export default {
|
|
|
//连接玩具
|
|
|
console.log('玩具hexStr', hexStr)
|
|
|
bluetooth.sendControl($this._deviceId, $this._serviceId, $this._characteristicId)
|
|
|
-
|
|
|
- //连接不上设备
|
|
|
- if ($flag == false) {
|
|
|
- // $this.game_finished()
|
|
|
- console.log('info', $this._deviceId, $this._serviceId, $this._characteristicId)
|
|
|
- }
|
|
|
})
|
|
|
},
|
|
|
|
|
@@ -401,10 +398,8 @@ export default {
|
|
|
let $play_time = $this.play_time - $current_time
|
|
|
if ($this.mode == 2) {
|
|
|
let $userinfo = wx.getStorageSync('userinfo')
|
|
|
- $play_time = $userinfo['play_time'] - $current_time
|
|
|
+ $play_time = $userinfo['play_time'] * 60 - $current_time
|
|
|
}
|
|
|
- console.log('当前结束时间', $current_time)
|
|
|
- console.log('游玩时间:', $this.play_time)
|
|
|
let $params = {
|
|
|
game_record_id: game_store.getters.getGameRecordId,
|
|
|
type: $this.mode,
|
|
@@ -447,7 +442,14 @@ export default {
|
|
|
bluetooth.watch_bluetooth_status($this)
|
|
|
|
|
|
},
|
|
|
- onLoad() {
|
|
|
+ onLoad(options) {
|
|
|
+ let $game_status = game_store.getters.getGameStatus;
|
|
|
+ if ($game_status == 1) {
|
|
|
+ console.log("结束游戏跳转", options)
|
|
|
+ if (options.end) {
|
|
|
+ $this.game_finished()
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
onUnload() {
|
|
|
// 返回 的时候 暂停
|