From 8e9c17333650d10b899a5839fee520618a0d9e6c Mon Sep 17 00:00:00 2001 From: zz <2510566342@qq.com> Date: Mon, 21 Oct 2024 17:43:36 +0800 Subject: [PATCH] =?UTF-8?q?10.21=20=E8=AF=AD=E8=A8=80=E5=88=87=E6=8D=A2=20?= =?UTF-8?q?=E8=B7=9F=E6=96=B0=E8=8F=9C=E5=8D=95=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api-services/apis/sys-homepage-api.ts | 2 +- src/layout/navBars/topBar/user.vue | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api-services/apis/sys-homepage-api.ts b/src/api-services/apis/sys-homepage-api.ts index f9c64a0..0bff926 100644 --- a/src/api-services/apis/sys-homepage-api.ts +++ b/src/api-services/apis/sys-homepage-api.ts @@ -1227,7 +1227,7 @@ export const SysHomePageApiFp = function (configuration?: Configuration) { async apiGetChargMonitorChargBinData(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { const localVarAxiosArgs = await SysHomePageApiAxiosParamCreator(configuration).apiGetChargMonitorChargBinData(options); - const second_url = 'http://192.168.2.14:6035' + const second_url = 'http://localhost:5035' return (axios: AxiosInstance = globalAxios, basePath: string = second_url) => { const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: second_url + localVarAxiosArgs.url }; diff --git a/src/layout/navBars/topBar/user.vue b/src/layout/navBars/topBar/user.vue index 3db492c..d765c1f 100644 --- a/src/layout/navBars/topBar/user.vue +++ b/src/layout/navBars/topBar/user.vue @@ -112,6 +112,7 @@ import { clearAccessTokens, getAPI } from '/@/utils/axios-utils'; import { SysAuthApi, SysNoticeApi } from '/@/api-services/api'; import Push from 'push.js'; import { signalR } from '/@/views/system/onlineUser/signalR'; +import { initBackEndControlRoutes } from '/@/router/backEnd'; // 引入组件 @@ -213,13 +214,15 @@ const onComponentSizeChange = (size: string) => { window.location.reload(); }; // 语言切换 -const onLanguageChange = (lang: string) => { +const onLanguageChange =async (lang: string) => { Local.remove('themeConfig'); themeConfig.value.globalI18n = lang; Local.set('themeConfig', themeConfig.value); locale.value = lang; other.useTitle(); initI18nOrSize('globalI18n', 'disabledI18n'); + await initBackEndControlRoutes();//切换时,更新 + // console.log('xxx') }; // 初始化组件大小/i18n const initI18nOrSize = (value: string, attr: string) => {