armg hace 4 días
padre
commit
7b35cff983
Se han modificado 3 ficheros con 21 adiciones y 21 borrados
  1. 1 1
      .env.production
  2. 19 19
      src/utils/wecomLogin.ts
  3. 1 1
      src/views/AIDesign/result.vue

+ 1 - 1
.env.production

@@ -6,4 +6,4 @@ devtool=cheap-module-source-map
 VUE_APP_AUTHURL=https://aidesign.nipponpaint.com.cn/AiDesignWeb/
 VUE_APP_Target=/
 # 应用agentID
-VUE_APP_AGENTID=1000400
+VUE_APP_AGENTID=1000401

+ 19 - 19
src/utils/wecomLogin.ts

@@ -89,27 +89,27 @@ export const doWecomLogin = async (code: string, wxId?: string): Promise<void> =
             window.localStorage.setItem('isRefreshProvider', res.Data.isRefreshProvider);
             window.localStorage.setItem('weChat', res.Data.weChat);
             // 处理身份,身份可能为多个,只能按身份权限大小来固定为某个身份;
-            if (res.Data.userType) {
-                // 使用位运算
-                const ROLE_CONFIG = [
-                    { bit: 1 << 0, code: 'ssb', desc: '经销商' },             // 1 
-                    { bit: 1 << 1, code: 'hbs', desc: '立邦用户' },           // 2
-                    { bit: 1 << 2, code: 'stoneLikePaint', desc: '服务商' },  // 4 
-                    { bit: 1 << 3, code: 'goldShop', desc: '金牌店' },        // 8 
-                    { bit: 1 << 4, code: 'dg', desc: '导购' },                // 16
-                    { bit: 1 << 5, code: 'xlskf', desc: '新零售客服' }         // 32
-                ];
-                const userType = Number(res.Data.userType);
-                console.log("userType=", userType);
-                const matchRole = ROLE_CONFIG.find(item => (userType & item.bit) === item.bit);
-                console.log("matchRole=", matchRole)
-                const agent = matchRole && matchRole.code || 'xlskf';
-                window.localStorage.setItem('agentFrom', agent);
-                window.localStorage.setItem('agentFromAI', agent);
-            }else{
+            // if (res.Data.userType) {
+            //     // 使用位运算
+            //     const ROLE_CONFIG = [
+            //         { bit: 1 << 0, code: 'ssb', desc: '经销商' },             // 1 
+            //         { bit: 1 << 1, code: 'hbs', desc: '立邦用户' },           // 2
+            //         { bit: 1 << 2, code: 'stoneLikePaint', desc: '服务商' },  // 4 
+            //         { bit: 1 << 3, code: 'goldShop', desc: '金牌店' },        // 8 
+            //         { bit: 1 << 4, code: 'dg', desc: '导购' },                // 16
+            //         { bit: 1 << 5, code: 'xlskf', desc: '新零售客服' }         // 32
+            //     ];
+            //     const userType = Number(res.Data.userType);
+            //     console.log("userType=", userType);
+            //     const matchRole = ROLE_CONFIG.find(item => (userType & item.bit) === item.bit);
+            //     console.log("matchRole=", matchRole)
+            //     const agent = matchRole && matchRole.code || 'xlskf';
+            //     window.localStorage.setItem('agentFrom', agent);
+            //     window.localStorage.setItem('agentFromAI', agent);
+            // }else{
                 window.localStorage.setItem('agentFrom', 'xlskf');
                 window.localStorage.setItem('agentFromAI', 'xlskf');
-            }
+            // }
             isLogging = false;
         } else {
             isLogging = false;

+ 1 - 1
src/views/AIDesign/result.vue

@@ -140,7 +140,7 @@ export default class extends Vue {
   };
 
   private designTimer = {
-    outside: 50000,
+    outside: 30000,
     inside: 20000
   };
   private showArtificial = false;