张延森 5 年之前
父節點
當前提交
77683ad51e
共有 2 個檔案被更改,包括 8 行新增2 行删除
  1. 1
    1
      project.config.json
  2. 7
    1
      src/pages/auth/index.js

+ 1
- 1
project.config.json 查看文件

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

+ 7
- 1
src/pages/auth/index.js 查看文件

40
 
40
 
41
   toPage(succed) {
41
   toPage(succed) {
42
     const router = Taro.getStorageSync('router')
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
     Taro.setStorageSync('firstLoading', '8')
50
     Taro.setStorageSync('firstLoading', '8')
46
     if (!succed && path === 'pages/signin/index') {
51
     if (!succed && path === 'pages/signin/index') {
52
       })
57
       })
53
       return
58
       return
54
     }
59
     }
60
+
55
     Taro.reLaunch({
61
     Taro.reLaunch({
56
       url: `/${path}?${query.params}`
62
       url: `/${path}?${query.params}`
57
     })
63
     })