From 16d8b71e21dc7298b30f46bf264cd9b3589a6978 Mon Sep 17 00:00:00 2001 From: who's hu Date: Tue, 22 Aug 2023 09:25:19 +0000 Subject: [PATCH 1/3] =?UTF-8?q?update=20ruoyi-ui/src/permission.js.=20?= =?UTF-8?q?=E7=94=B1=E4=BA=8E=E9=87=8D=E5=AE=9A=E5=90=91url=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=20http://xxx.xx.xxx/{id}=3Fparam=3D{a}&name=3D{b}=20?= =?UTF-8?q?=E7=9A=84=E5=9C=BA=E6=99=AF,=20=E5=BD=93=E6=9C=AA=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E8=AE=BF=E9=97=AE=E6=97=B6,=20=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E6=94=B9js=E5=B0=81=E8=A3=85=E7=99=BB=E5=BD=95=E5=90=8E?= =?UTF-8?q?=E9=87=8D=E5=AE=9A=E5=90=91=E5=8F=82=E6=95=B0,=20=E4=BC=9A?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=3F=E5=90=8E=E7=9A=84query=20params=20?= =?UTF-8?q?=E5=A6=82:=20=E8=AE=BF=E9=97=AE=20http://localhost:1024/core/do?= =?UTF-8?q?c/doc=3Fid=3D1683734914907807745&version=3D31=20=E6=9C=9F?= =?UTF-8?q?=E6=9C=9B=20http://localhost:1024/login=3Fredirect=3D%2Fcore%2F?= =?UTF-8?q?doc%2Fdoc%3Fid%3D1683734914907807745%26version%3D31=20=E5=AE=9E?= =?UTF-8?q?=E9=99=85=E9=80=9A=E8=BF=87=20to.fullPath=20=E5=B0=81=E8=A3=85?= =?UTF-8?q?=E5=90=8E=20=E8=8E=B7=E5=BE=97=20http://localhost:1024/login=3F?= =?UTF-8?q?redirect=3D%2Fcore%2Fdoc%2Fdoc%3Fid%3D1683734914907807745&versi?= =?UTF-8?q?on=3D31?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 登录成功跳转到重定向参数url后, 导致version参数丢失. 需要对 to.fullPath 进行一次编码, 以保证重定向前 to.fullPath 的完整性. 通过 ${encodeURIComponent(to.fullPath)} 获得 http://localhost:1024/login?redirect=%2Fcore%2Fdoc%2Fdoc%3Fid%3D1683734914907807745%26version%3D31 完整url Signed-off-by: who's hu --- ruoyi-ui/src/permission.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-ui/src/permission.js b/ruoyi-ui/src/permission.js index 609d2159..e1a14da7 100644 --- a/ruoyi-ui/src/permission.js +++ b/ruoyi-ui/src/permission.js @@ -45,7 +45,7 @@ router.beforeEach((to, from, next) => { // 在免登录白名单,直接进入 next() } else { - next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 + next(`/login?redirect=${encodeURIComponent(to.fullPath)}`) // 否则全部重定向到登录页 NProgress.done() } } From 4a78fe116d21e6ccfd94c82a838a6b111f07dc96 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 31 Aug 2023 10:18:25 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BC=98=E5=8C=96TopNav=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=9B=BE=E6=A0=87svg=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/TopNav/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/src/components/TopNav/index.vue b/ruoyi-ui/src/components/TopNav/index.vue index 9fb8dd81..daee1b87 100644 --- a/ruoyi-ui/src/components/TopNav/index.vue +++ b/ruoyi-ui/src/components/TopNav/index.vue @@ -6,7 +6,10 @@ > From f5a1b0c55014cbe15a18ed53ec24f7d4b277f3b1 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 1 Sep 2023 09:37:16 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E4=BC=A0=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/system/SysUserMapper.xml | 6 +++--- ruoyi-ui/src/views/system/user/profile/index.vue | 2 +- ruoyi-ui/src/views/system/user/profile/userAvatar.vue | 5 ----- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index 3c1c6c54..eda0be22 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -23,8 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - + + @@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + diff --git a/ruoyi-ui/src/views/system/user/profile/index.vue b/ruoyi-ui/src/views/system/user/profile/index.vue index 884f0ebd..d22b8903 100644 --- a/ruoyi-ui/src/views/system/user/profile/index.vue +++ b/ruoyi-ui/src/views/system/user/profile/index.vue @@ -8,7 +8,7 @@
- +
  • diff --git a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue index 70d8487f..96aa01f4 100644 --- a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue +++ b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue @@ -61,11 +61,6 @@ import { debounce } from '@/utils' export default { components: { VueCropper }, - props: { - user: { - type: Object - } - }, data() { return { // 是否显示弹出层