Browse Source

feature: 处理当前界面定位到首页

Damon 8 months ago
parent
commit
74ce38dcd8
1 changed files with 7 additions and 0 deletions
  1. 7 0
      pages/index/index.js

+ 7 - 0
pages/index/index.js

@@ -795,6 +795,13 @@ Page({
   },
   },
 
 
   addConnectDevice(connectDevice) {
   addConnectDevice(connectDevice) {
+    var that = this;
+    var indexPage = that.data.indexPage;
+    if (indexPage != 0) {
+      that.setData({
+        indexPage: 0,
+      });
+    }
     console.log("dfadsfasdfasdfa==111==" + JSON.stringify(connectDevice))
     console.log("dfadsfasdfasdfa==111==" + JSON.stringify(connectDevice))
   },
   },