From 73a5f64d7e963cb7c1ae54afb368aa4ffe2401c0 Mon Sep 17 00:00:00 2001 From: JEECG <445654970@qq.com> Date: Wed, 9 Apr 2025 09:39:34 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90issues/8034=E3=80=91hash=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E4=B8=8B=E9=80=80=E5=87=BA=E9=87=8D=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E8=B7=B3=E8=BD=AC=E5=9C=B0=E5=9D=80=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jeecgboot-vue3/src/store/modules/user.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/jeecgboot-vue3/src/store/modules/user.ts b/jeecgboot-vue3/src/store/modules/user.ts index 08044c8b7..099710d72 100644 --- a/jeecgboot-vue3/src/store/modules/user.ts +++ b/jeecgboot-vue3/src/store/modules/user.ts @@ -209,18 +209,11 @@ export const useUserStore = defineStore({ //update-begin---author:wangshuai ---date:20230424 for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------ if (redirect && goHome) { //update-end---author:wangshuai ---date:20230424 for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------ - // update-begin--author:liaozhiyang---date:20240104---for:【QQYUN-7804】部署生产环境,登录跳转404问题 - 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:20240509---for:【issues/1147】登录跳转时去掉发布路径的最后一个/以解决404问题 + // update-begin--author:liaozhiyang---date:20250407---for:【issues/8034】hash模式下退出重登录默认跳转地址异常 + // router.options.history.base可替代之前的publicPath // 当前页面打开 - window.open(redirect, '_self') + window.open(`${router.options.history.base}${redirect}`, '_self'); + // update-end--author:liaozhiyang---date:20250407---for:【issues/8034】hash模式下退出重登录默认跳转地址异常 return data; } // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题