From 7d9e973f43f3795f757bfbe46883a90ff81ae622 Mon Sep 17 00:00:00 2001 From: Kerwin Bryant Date: Fri, 16 Sep 2022 21:04:48 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=88=A4=E6=96=AD=20(#311)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增配置项判断,避免出现undefined导致的无效url --- src/utils/request/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/request/index.ts b/src/utils/request/index.ts index 3a34fe6..7d15c7e 100644 --- a/src/utils/request/index.ts +++ b/src/utils/request/index.ts @@ -57,7 +57,7 @@ const transform: AxiosTransform = { const { apiUrl, isJoinPrefix, urlPrefix, joinParamsToUrl, formatDate, joinTime = true } = options; // 添加接口前缀 - if (isJoinPrefix) { + if (isJoinPrefix && urlPrefix && isString(urlPrefix)) { config.url = `${urlPrefix}${config.url}`; } From e1bc0a0d876f0fadc5166e3e3324f6b1bf0baee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=82=A0=E9=9D=99=E8=90=9D=E8=8E=89?= Date: Sat, 17 Sep 2022 00:23:47 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dsidenav=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=94=99=E8=AF=AF=20(#315)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * perf: 增加配置判断 (#311) 新增配置项判断,避免出现undefined导致的无效url * fix: 修复参数错误 Co-authored-by: Kerwin Bryant --- src/layouts/components/LayoutSideNav.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/components/LayoutSideNav.vue b/src/layouts/components/LayoutSideNav.vue index 1a6fb67..771408f 100644 --- a/src/layouts/components/LayoutSideNav.vue +++ b/src/layouts/components/LayoutSideNav.vue @@ -5,7 +5,7 @@ :layout="settingStore.layout" :is-fixed="settingStore.isSidebarFixed" :menu="sideMenu" - :theme="settingStore.mode" + :theme="settingStore.displayMode" :is-compact="settingStore.isSidebarCompact" /> From 0e259413ca91923e1f5f8517db9c480d5a07e134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=82=A0=E9=9D=99=E8=90=9D=E8=8E=89?= Date: Sat, 17 Sep 2022 00:24:20 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4user=E7=9A=84?= =?UTF-8?q?=E6=8C=81=E4=B9=85=E5=8C=96=E4=BF=AE=E5=A4=8D=E5=85=B6=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E9=97=AE=E9=A2=98=20(#314)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * perf: 增加配置判断 (#311) 新增配置项判断,避免出现undefined导致的无效url * fix: 移除user的持久化修复其导致的问题 Co-authored-by: Kerwin Bryant --- src/store/modules/user.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index fba0728..575af0f 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -1,6 +1,6 @@ import { defineStore } from 'pinia'; import { TOKEN_NAME } from '@/config/global'; -import { store, usePermissionStore } from '@/store'; +import { store } from '@/store'; const InitUserInfo = { roles: [], @@ -79,12 +79,6 @@ export const useUserStore = defineStore('user', { this.token = ''; }, }, - persist: { - afterRestore: (ctx) => { - const permissionStore = usePermissionStore(); - permissionStore.initRoutes(ctx.store.roles); - }, - }, }); export function getUserStore() {