张延森 5 gadus atpakaļ
vecāks
revīzija
77683ad51e
2 mainītis faili ar 8 papildinājumiem un 2 dzēšanām
  1. 1
    1
      project.config.json
  2. 7
    1
      src/pages/auth/index.js

+ 1
- 1
project.config.json Parādīt failu

@@ -2,7 +2,7 @@
2 2
 	"miniprogramRoot": "dist/",
3 3
 	"projectname": "mini-chengjiao",
4 4
 	"description": "知与行联调",
5
-	"appid": "wxd9ee3a9480a4e544",
5
+	"appid": "wxda1f84b79b3edeb3",
6 6
 	"setting": {
7 7
 		"urlCheck": false,
8 8
 		"es6": false,

+ 7
- 1
src/pages/auth/index.js Parādīt failu

@@ -40,7 +40,12 @@ export default class Index extends Component {
40 40
 
41 41
   toPage(succed) {
42 42
     const router = Taro.getStorageSync('router')
43
-    const { query, path } = router
43
+    let { query, path } = router
44
+    if (!path) {
45
+      const loadOptions = wx.getLaunchOptionsSync()
46
+      query = loadOptions.query
47
+      path = loadOptions.path
48
+    }
44 49
     
45 50
     Taro.setStorageSync('firstLoading', '8')
46 51
     if (!succed && path === 'pages/signin/index') {
@@ -52,6 +57,7 @@ export default class Index extends Component {
52 57
       })
53 58
       return
54 59
     }
60
+
55 61
     Taro.reLaunch({
56 62
       url: `/${path}?${query.params}`
57 63
     })