userId免登录 sn存储

This commit is contained in:
jiayu 2024-09-30 09:12:09 +08:00
parent 49828737eb
commit aae818d9c8

View File

@ -524,10 +524,13 @@ onMounted(async () => {
if (window.location.href.indexOf("userId") != -1) {
console.log("免登录跳转进来了吗----", window.location.href.indexOf("userId"));
const newUserId = window.location.href.split("userId=")[1].split("&")[0];
const projectSn = window.location.href.split("sn=")[1].split("&")[0];
const data: any = await jumpLargeByUserIdApi({ userId: newUserId });
console.log("跳转请求的数据----", data.result);
if (data.result.sn) {
store.setSN(data.result.sn);
const accountTypeList = [2, 3, 4, 7];
const sn = accountTypeList.includes(data.result.accountType) ? projectSn : data.result.sn;
store.setSN(sn);
}
store.setToken(data.result.token);
store.setAccount(data.result.account);