From 36d63032e7ec80d87cf5b95f29a1db4e1c4075e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E5=90=AF=E9=BE=99?= Date: Tue, 29 Oct 2024 17:04:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=9A=E5=8A=A1=E5=92=8C=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=A0=87=E7=AD=BE=E5=90=8D=E7=A7=B0=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E4=BB=8E=E6=8E=A5=E5=8F=A3=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/app.js | 8 ++++++-- vite.config.ts | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) 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({