|
@@ -475,6 +475,23 @@ Page({
|
|
|
///退出登录
|
|
|
logOut() {
|
|
|
var that = this;
|
|
|
+ ///有设备在线被选中,则让它不被选择
|
|
|
+ var deviceListIndex = that.data.deviceListIndex;
|
|
|
+ if (deviceListIndex != null) {
|
|
|
+ var list = that.data.deviceList;
|
|
|
+ if (list.length > deviceListIndex) {
|
|
|
+ if (list[deviceListIndex].connectType == 3) {
|
|
|
+ if (that.data.thisDeviceMac !== null) {
|
|
|
+ app.unsubscribe(`/${that.data.thisDeviceMac}/user/pub_response`);
|
|
|
+ that.setData({
|
|
|
+ actionIndex: null,
|
|
|
+ deviceListIndex: null,
|
|
|
+ });
|
|
|
+ };
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
wx.removeStorageSync('userInfo');
|
|
|
wx.removeStorageSync('token');
|
|
|
var nickName = "未登录";
|