|
@@ -5,6 +5,7 @@ import EventManager from '../../../utils/event_bus'
|
|
|
import { EnumCmdEvent, CmdEvent } from '../../../devices/cmd_key_event';
|
|
|
import js_md5 from '../../../utils/js_md5';
|
|
|
import store from '../../../utils/store';
|
|
|
+import route_util from '../../../utils/route_util';
|
|
|
const { BtHelper } = require('../../../devices/bt_helper');
|
|
|
|
|
|
Page({
|
|
@@ -34,6 +35,7 @@ Page({
|
|
|
_imgNext: 0,
|
|
|
max_scale: 2,
|
|
|
_hasPermission: false,
|
|
|
+ _hasShowModal: false,
|
|
|
wallpaper: {},
|
|
|
},
|
|
|
cropper: null,
|
|
@@ -518,16 +520,16 @@ Page({
|
|
|
disconnect(event) {
|
|
|
let _this = this;
|
|
|
console.log("断开连接", event.commonValue, event.deviceId);
|
|
|
- if (event.commonValue === "offline") {
|
|
|
+ if (event.commonValue === "offline" && !_this.data._hasShowModal) {
|
|
|
+ _this.data._hasShowModal = true
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
|
content: '设备断开连接,请重新连接设备',
|
|
|
showCancel: false,
|
|
|
success: function (res) {
|
|
|
+ _this.data._hasShowModal = false;
|
|
|
if (res.confirm) {
|
|
|
- wx.navigateBack({
|
|
|
- delta: 1
|
|
|
- })
|
|
|
+ route_util.goBackHomePage()
|
|
|
}
|
|
|
}
|
|
|
})
|