diff --git a/src/store/modules/app.js b/src/store/modules/app.js index 0b13c11..acba333 100644 --- a/src/store/modules/app.js +++ b/src/store/modules/app.js @@ -10,7 +10,7 @@ const state = { isCollapsed: false, sideMenuData: [], pageConfig: {}, - systemConfig: {}, + systemConfig: JSON.parse(localStorage.getItem('systemConfig')) || {}, userData: null, operateTime: '', basePath: '', @@ -66,6 +66,10 @@ const mutations = { state.pageConfig = data }, SETTING_SYSTEM_CONFIG(state, data) { + // 为什么不用 csc 的方式 管理端父传子是异步方式 可能导致表格列渲染完成后接口还没返回 + data.projectConfigLabel = data.projectConfigLabel || '项目' + data.serviceConfigLabel = data.serviceConfigLabel || '业务' + localStorage.setItem('systemConfig', JSON.stringify(data)) state.systemConfig = data } } @@ -102,7 +106,7 @@ const actions = { } }, async GetSystemConfigs({ commit }) { - const data = await getSystemConfigs({ codes: 'pwdStrength,lockScreenTime' }) + const data = await getSystemConfigs({ codes: 'pwdStrength,lockScreenTime,serviceConfigLabel,projectConfigLabel' }) if (data.success) { commit('SETTING_SYSTEM_CONFIG', data.data) } diff --git a/vite.config.ts b/vite.config.ts index 26b79bf..95e7617 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -12,7 +12,7 @@ function resolve(dir: string) { } const httpType = 'https://' -const proxyUrl = '10.20.12.56:60006/' // 代理地址设置 +const proxyUrl = '23.33.3.22:60006/' // 代理地址设置 // https://vitejs.dev/config/ export default defineConfig({