From 1803fd24329f134f21d122c5e0dc724694bf5c20 Mon Sep 17 00:00:00 2001 From: danshihao Date: Mon, 5 Aug 2024 17:05:42 +0800 Subject: [PATCH] =?UTF-8?q?[update=20=E9=A3=9E=E4=B9=A6=E5=8D=95=E7=82=B9?= =?UTF-8?q?=E7=99=BB=E5=BD=95]=20=E8=A7=A3=E5=86=B3=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=8A=9E=E7=90=86=E5=AE=8Cgo(-1)=E4=BC=9A=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E4=B8=AD=E8=BD=AC=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/permission.js b/src/permission.js index fcbead3..8d90252 100644 --- a/src/permission.js +++ b/src/permission.js @@ -37,7 +37,11 @@ router.beforeEach(async (to, from, next) => { } else if (to.query.code && to.query.state === 'feishu') { // 如果没有登录,state是飞书,并且有code,就请求飞书单点登录 await store.dispatch('FeiShuLogin', to.query.code).catch((e) => { - this.$message.warn(e.message) + // 从飞书跳转进来,正常提示,系统内跳转进来不提示(解决用了replace,但是go(-1)还会跳转回来) + if (from.path === '/') { + Vue.prototype.$message.warning(e.message, 3) + } + next({ path: '/user/login', replace: true }) }) } else if (to.query.code) { // 研发大前台单点登录