xujing 5 years ago
parent
commit
028c43c08a
3 changed files with 12 additions and 11 deletions
  1. 4
    4
      config/dev.js
  2. 4
    4
      config/prod.js
  3. 4
    3
      src/utils/login.js

+ 4
- 4
config/dev.js View File

5
   defineConstants: {
5
   defineConstants: {
6
     // HOST: '"http://47.101.36.130:8085"',//测试
6
     // HOST: '"http://47.101.36.130:8085"',//测试
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
-    // HOST: '"https://dev.jinchengjiaye.com"',//测试
9
-    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
-    HOST: '"https://lt.pawoma.cn"',
11
-    WSS_HOST: '"wss://lt.pawoma.cn"',
8
+    HOST: '"https://dev.jinchengjiaye.com"',//测试
9
+    WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
+    // HOST: '"https://lt.pawoma.cn"',
11
+    // WSS_HOST: '"wss://lt.pawoma.cn"',
12
     // HOST: '"http://192.168.2.51:8080"',
12
     // HOST: '"http://192.168.2.51:8080"',
13
     // WSS_HOST: '"ws://192.168.2.51:8080"',
13
     // WSS_HOST: '"ws://192.168.2.51:8080"',
14
     Version: 'V3.5.5'
14
     Version: 'V3.5.5'

+ 4
- 4
config/prod.js View File

5
   defineConstants: {
5
   defineConstants: {
6
     // HOST: '"http://192.168.2.54:8080"',
6
     // HOST: '"http://192.168.2.54:8080"',
7
     // WSS_HOST: '"ws://192.168.2.54:8080"',
7
     // WSS_HOST: '"ws://192.168.2.54:8080"',
8
-    // HOST: '"https://dev.jinchengjiaye.com"',//测试
9
-    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
-    HOST: '"https://lt.pawoma.cn"',
11
-    WSS_HOST: '"wss://lt.pawoma.cn"',
8
+    HOST: '"https://dev.jinchengjiaye.com"',//测试
9
+    WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
+    // HOST: '"https://lt.pawoma.cn"',
11
+    // WSS_HOST: '"wss://lt.pawoma.cn"',
12
     Version:'V3.5.5_2019-12-27'
12
     Version:'V3.5.5_2019-12-27'
13
   },
13
   },
14
   weapp: {},
14
   weapp: {},

+ 4
- 3
src/utils/login.js View File

22
 
22
 
23
         loading = false
23
         loading = false
24
 
24
 
25
-        const { extraInfo, miniApp, person, miniAuthorized } = data
25
+        const { extraInfo, miniApp, person, miniAuthorized, avatarAuth } = data
26
         const { token, sessionKey } = miniApp
26
         const { token, sessionKey } = miniApp
27
         const { dispatch } = getStore()
27
         const { dispatch } = getStore()
28
         Taro.setStorageSync('token', token)
28
         Taro.setStorageSync('token', token)
29
         Taro.setStorageSync('sessionKey', sessionKey)
29
         Taro.setStorageSync('sessionKey', sessionKey)
30
         dispatch({ type: USER_INFO, payload: { extraInfo, person, miniApp } })
30
         dispatch({ type: USER_INFO, payload: { extraInfo, person, miniApp } })
31
 
31
 
32
+
32
         // 用户信息已授权获取成功
33
         // 用户信息已授权获取成功
33
-        if (miniAuthorized) {
34
-   
34
+        if (miniAuthorized || avatarAuth) {
35
+
35
           // 保存用户信息
36
           // 保存用户信息
36
           // dispatch({ type: USER_INFO, payload: { extraInfo, person, miniApp } })
37
           // dispatch({ type: USER_INFO, payload: { extraInfo, person, miniApp } })
37
           callback && callback(data)
38
           callback && callback(data)