xujing 5 yıl önce
ebeveyn
işleme
028c43c08a
3 değiştirilmiş dosya ile 12 ekleme ve 11 silme
  1. 4
    4
      config/dev.js
  2. 4
    4
      config/prod.js
  3. 4
    3
      src/utils/login.js

+ 4
- 4
config/dev.js Dosyayı Görüntüle

@@ -5,10 +5,10 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://47.101.36.130:8085"',//测试
7 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 12
     // HOST: '"http://192.168.2.51:8080"',
13 13
     // WSS_HOST: '"ws://192.168.2.51:8080"',
14 14
     Version: 'V3.5.5'

+ 4
- 4
config/prod.js Dosyayı Görüntüle

@@ -5,10 +5,10 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://192.168.2.54:8080"',
7 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 12
     Version:'V3.5.5_2019-12-27'
13 13
   },
14 14
   weapp: {},

+ 4
- 3
src/utils/login.js Dosyayı Görüntüle

@@ -22,16 +22,17 @@ export default function (payload, callback) {
22 22
 
23 23
         loading = false
24 24
 
25
-        const { extraInfo, miniApp, person, miniAuthorized } = data
25
+        const { extraInfo, miniApp, person, miniAuthorized, avatarAuth } = data
26 26
         const { token, sessionKey } = miniApp
27 27
         const { dispatch } = getStore()
28 28
         Taro.setStorageSync('token', token)
29 29
         Taro.setStorageSync('sessionKey', sessionKey)
30 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 37
           // dispatch({ type: USER_INFO, payload: { extraInfo, person, miniApp } })
37 38
           callback && callback(data)