ソースを参照

feature: 处理几个异常跳转问题

Damon 8 ヶ月 前
コミット
592d682b9d

+ 1 - 8
pages/connectBle/connectBle.js

@@ -120,14 +120,7 @@ Page({
         var connectDevice = _this.data.connectDevice;
         getCurrentPages()[0].addConnectBlueDevice(connectDevice);
         route_util.goBackRoute(route_constant.indexRoot);
-        // setTimeout(() => {
-        //   // wx.redirectTo({
-        //   //   url: '/pages/index/index'
-        //   // });
-
-        //   route_util.goBackRoute("");
-        //   console.log("gadfasdfasdfaf==22222222222=");
-        // }, 200);
+
       }
 
     })

+ 6 - 8
pages/deviceConnect0/deviceConnect0.js

@@ -1,5 +1,8 @@
 // pages/deviceConnect0/deviceConnect0.ts
 const app = getApp();
+import route_constant from '../../utils/route_constant.js'
+import route_util from '../../utils/route_util.js';
+
 Page({
 
   /**
@@ -19,8 +22,7 @@ Page({
     },
     isNotruter: false
   },
-  onShow() {
-  },
+  onShow() {},
   /**
    * 生命周期函数--监听页面加载
    */
@@ -35,9 +37,7 @@ Page({
           showCapsule: 1,
           title: '连接配网',
           callback: () => {
-          wx.redirectTo({
-            url: '/pages/index/index'
-          });
+            route_util.goBackRoute(route_constant.indexRoot);
           }
         },
       })
@@ -127,9 +127,7 @@ Page({
   },
   notRoter() {
     getCurrentPages()[0].onLoad();
-          wx.redirectTo({
-            url: '/pages/index/index'
-          });
+    route_util.goBackRoute(route_constant.indexRoot);
   },
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 0 - 3
pages/deviceConnect3/deviceConnect3.js

@@ -234,8 +234,5 @@ Page({
     //  BLUFI_7cdfa1fd3cfc
     app.globalData.newDeviceId = this.data.name;
     route_util.goBackRoute(route_constant.indexRoot);
-    // wx.redirectTo({
-    //   url: '/pages/index/index'
-    // });
   }
 })