From 6c372e6066f5b20fe136ffff6570ea2a93320be3 Mon Sep 17 00:00:00 2001 From: hreenshan112 Date: Sat, 22 Feb 2025 08:23:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=A0=E6=84=9F=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/index.vue | 26 ++++++++++++++++++++------ src/views/user/index.vue | 22 ++++++++++++++++++++-- 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 009ba75..de28630 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -22,6 +22,8 @@ const loginInfo = reactive({ time: getTimeUnix() }) const singButLoading = ref(false) + +const xingzhi = ref(1) //验证码图片 const codePic = ref("") const getSignCode = () => { @@ -35,11 +37,20 @@ const getSignCode = () => { } onBeforeMount(() => { - let xingzhi = judgingEnvironment(); - if(xingzhi == 3){ - window.location.href="http://wab.hxgk.group/systemapi/wechat/obtainAuthorization?systemapp="+import.meta.env.VITE_APP_SYSTEM_APP+"&isagain="+import.meta.env.VITE_APP_AGAIN+"&userid="+route.query.userid + if(!userPinia.judgeIsLogin(route.query.userkey,route.query.token)){ + xingzhi.value = judgingEnvironment(); + if(xingzhi.value == 3){ + window.location.href="http://wab.hxgk.group/systemapi/wechat/obtaOnePage?systemapp="+import.meta.env.VITE_APP_SYSTEM_APP+"&isagain="+import.meta.env.VITE_APP_AGAIN+"&userid="+route.query.userid+"&call_back_type=login" + }else{ + xingzhi.value = 1 + getSignCode() + } + + }else{ + userPinia.getInfo() + router.push('/') } - getSignCode() + }) const loginForm = ref(ElForm); //表单实例化 @@ -132,10 +143,12 @@ const judgingEnvironment = () => {