quwangxin 2 lat temu
rodzic
commit
3b0196910b
4 zmienionych plików z 25 dodań i 3 usunięć
  1. 3 1
      src/config/setting.js
  2. 2 0
      src/store/index.js
  3. 18 0
      src/store/modules/selectCache.js
  4. 2 2
      vue.config.js

+ 3 - 1
src/config/setting.js

@@ -109,7 +109,9 @@ export const TOKEN_STORE_NAME = window.__POWERED_BY_QIANKUN__
   : `${SYSTEM_NAME}-access_token`;
 
 // 主题配置存储的名称
-export const THEME_STORE_NAME = 'theme';
+export const THEME_STORE_NAME = window.__POWERED_BY_QIANKUN__
+  ? 'theme'
+  : `${SYSTEM_NAME}-theme`;
 
 // i18n 缓存的名称
 export const I18N_CACHE_NAME = 'i18n-lang';

+ 2 - 0
src/store/index.js

@@ -7,6 +7,7 @@ import getters from './getters';
 import dict from './modules/dict';
 import user from './modules/user';
 import theme from './modules/theme';
+import selectCache from './modules/selectCache';
 import team from './modules/team';
 import createPersistedState from 'vuex-persistedstate';
 
@@ -21,6 +22,7 @@ export default new Vuex.Store({
     dict,
     user,
     theme,
+    selectCache,
     team
   },
   getters,

+ 18 - 0
src/store/modules/selectCache.js

@@ -0,0 +1,18 @@
+// 公共选择组件数据缓存
+import Vue from 'vue';
+const state = {};
+
+const mutations = {
+  ADD_SELECT: (state, { name, dict }) => {
+    Vue.set(state, name, dict);
+  }
+};
+
+const actions = {};
+
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions
+};

+ 2 - 2
vue.config.js

@@ -32,10 +32,10 @@ module.exports = {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
         // target: 'http://192.168.3.51:18086', // 测试
-        // target: 'http://192.168.3.35:8080', // kang杨威
+        target: 'http://192.168.3.35:8080', // kang杨威
         // target: 'http://192.168.3.25:8080', // 黄峥嵘
         // target: 'http://192.168.3.41:8080', // 何江鹏
-        target: 'http://192.168.3.33:8080', // 谢一平
+        // target: 'http://192.168.3.33:8080', // 谢一平
         // target: 'http://192.168.3.64:8080', // 粟勋
         // target: 'http://192.168.3.34:8080', // 刘毅
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域