登录跳转统一登录平台
This commit is contained in:
parent
6b0ec18722
commit
9ed8f050e3
|
|
@ -69,9 +69,15 @@ const param = reactive({
|
||||||
password: defParam ? defParam.password : "",
|
password: defParam ? defParam.password : "",
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
// 保存登录参数到本地存储
|
// 保存登录参数到本地存储
|
||||||
getMyUserInfo(localStorage.getItem("userId"));
|
let res = getMyUserInfo(localStorage.getItem("userId"));
|
||||||
|
if(res.code === 0){
|
||||||
|
// 如果已经登录,跳转到用户页面
|
||||||
|
router.push("/user");
|
||||||
|
}else{
|
||||||
|
window.location.href = "https://sv.ljsea.top/#/login?site=gs-vp"; //https://sv.ljsea.top/
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
|
|
@ -145,6 +151,7 @@ const getMyUserInfo = async (id) => {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取标签存储并清空标签
|
// 获取标签存储并清空标签
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue