修复菜单不正常打开
This commit is contained in:
parent
108c590d95
commit
7ec0490577
|
|
@ -212,7 +212,7 @@ const login = async () => {
|
|||
localStorage.setItem("end_time", now.setDate(now.getHours() + 12)); //过期时间
|
||||
await getMyUserInfo(result.data.id);
|
||||
//token.value= result.data;
|
||||
router.push("/videoList");
|
||||
router.push("/user");
|
||||
};
|
||||
|
||||
//注册接口调用
|
||||
|
|
@ -241,7 +241,7 @@ const onRegister = async () => {
|
|||
let now = new Date();
|
||||
localStorage.setItem("end_time", now.setDate(now.getHours() + 12)); //过期时间
|
||||
//token.value= result.data;
|
||||
router.push("/videoList");
|
||||
router.push("/user");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -307,7 +307,7 @@ const getQRStatus = async () => {
|
|||
let now = new Date();
|
||||
localStorage.setItem("end_time", now.setDate(now.getHours() + 12)); //过期时间
|
||||
//token.value= result.data;
|
||||
router.push("/videoList");
|
||||
router.push("/user");
|
||||
}
|
||||
} else {
|
||||
//alert(result.message);
|
||||
|
|
@ -344,6 +344,8 @@ const getMyUserInfo = async (id) => {
|
|||
localStorage.setItem("video_func", result.data.VideoFunc);
|
||||
localStorage.setItem("device_func", result.data.DeviceFunc);
|
||||
localStorage.setItem("cid_func", result.data.CIDFunc);
|
||||
|
||||
//alert("video_func:" + localStorage.getItem("video_func")+" type:" +typeof(localStorage.getItem("video_func")));
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
|
|
|||
|
|
@ -61,9 +61,9 @@ export default {
|
|||
keyword: "",
|
||||
},
|
||||
func_permissions: {
|
||||
video: localStorage.getItem("video_func"),
|
||||
device: localStorage.getItem("device_func"),
|
||||
cid: localStorage.getItem("cid_func"),
|
||||
video: localStorage.getItem("video_func") === "true", //string转为boolean
|
||||
device: localStorage.getItem("device_func") === "true", //string转为boolean
|
||||
cid: localStorage.getItem("cid_func") === "true", //string转为boolean
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue