瀏覽代碼

同城分销店拆分、分销店对应多个经销商

zhujindu 11 月之前
父節點
當前提交
63f57a1aef
共有 2 個文件被更改,包括 5 次插入9 次删除
  1. 0 1
      src/permission.js
  2. 5 8
      src/store/modules/user.js

+ 0 - 1
src/permission.js

@@ -17,7 +17,6 @@ router.beforeEach((to, from, next) => {
         .catch(() => {
           next();
         });
-      store.dispatch('setStoreType');
     } else {
       next();
     }

+ 5 - 8
src/store/modules/user.js

@@ -1,5 +1,4 @@
 import { getMobileUserInfo, getDictOption } from '@/api/index';
-import { selectAllocationPermission } from '@/api/week';
 
 const user = {
   state: {
@@ -36,7 +35,11 @@ const user = {
             localStorage.setItem('deptLevel', res.data.depts[0].deptLevel);
             localStorage.setItem('userId', res.data.userId);
             localStorage.setItem('deptIds', JSON.stringify(res.data.deptIds));
-            resolve();
+            // 门店类型
+            getDictOption({}, 'sfa_store_type').then((res) => {
+              commit('SET_STORE_TYPE', res.data);
+              resolve();
+            });
           })
           .catch((error) => {
             reject(error);
@@ -47,12 +50,6 @@ const user = {
     setActivaTypeStore({ commit }, value) {
       commit('SET_ACTIVA_TYPE_STORE', value);
     },
-    // 门店类型
-    setStoreType({ commit }, value) {
-      getDictOption({}, 'sfa_store_type').then((res) => {
-        commit('SET_STORE_TYPE', res.data);
-      });
-    },
   },
 };