From 87eb000dc86a649e241c952532bf5406f9cc30e4 Mon Sep 17 00:00:00 2001 From: fengchenchen Date: Fri, 6 Sep 2024 18:09:15 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E8=B7=B3=E8=BD=AC=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/user/Login.vue | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue index 1ab2492..62379da 100644 --- a/src/views/user/Login.vue +++ b/src/views/user/Login.vue @@ -129,17 +129,17 @@ export default { }, loginSuccess () { Toast('登录成功') - // const query = this.$route.query - // if (query.redirect) { - // console.log('redirect:', query) - // this.$router.push({ path: query.redirect }).catch((res) => { - // console.log(res) - // }) - // } else { - this.$router.push({ path: '/search/generalSearch' }).catch((res) => { - console.log(res) - }) - // } + const query = this.$route.query || {} + if (query.redirect) { + console.log('redirect:', query) + this.$router.push({ path: query.redirect }).catch((res) => { + console.log(res) + }) + } else { + this.$router.push({ path: '/search/generalSearch' }).catch((res) => { + console.log(res) + }) + } }, // 密码禁止粘贴 handleOperate () {