From 801186779f401dd009e1e90980175b14ce21c588 Mon Sep 17 00:00:00 2001 From: JEECG <445654970@qq.com> Date: Fri, 10 May 2024 09:59:30 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90issues/1147=E3=80=91=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E6=97=B6=E5=8E=BB=E6=8E=89=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E7=9A=84=E6=9C=80=E5=90=8E=E4=B8=80=E4=B8=AA?= =?UTF-8?q?/=E4=BB=A5=E8=A7=A3=E5=86=B3404=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index f5a6002..7388ccf 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -210,11 +210,15 @@ export const useUserStore = defineStore({ if (redirect && goHome) { //update-end---author:wangshuai ---date:20230424 for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------ // update-begin--author:liaozhiyang---date:20240104---for:【QQYUN-7804】部署生产环境,登录跳转404问题 - const publicPath = import.meta.env.VITE_PUBLIC_PATH; + let publicPath = import.meta.env.VITE_PUBLIC_PATH; if (publicPath && publicPath != '/') { + // update-begin--author:liaozhiyang---date:20240509---for:【issues/1147】登录跳转时去掉发布路径的最后一个/以解决404问题 + if (publicPath.endsWith('/')) { + publicPath = publicPath.slice(0, -1); + } redirect = publicPath + redirect; } - // update-end--author:liaozhiyang---date:20240104---for:【QQYUN-7804】部署生产环境,登录跳转404问题 + // update-end--author:liaozhiyang---date:20240509---for:【issues/1147】登录跳转时去掉发布路径的最后一个/以解决404问题 // 当前页面打开 window.open(redirect, '_self') return data;