直播路由

This commit is contained in:
2020-10-10 14:34:23 +08:00
parent 96e9284abb
commit 3755425b0e
7 changed files with 48 additions and 20 deletions

View File

@@ -24,6 +24,7 @@ export async function loginpass(phone: string, password: string){
}else{
setToken();
store.commit("login");
store.dispatch("setUserInfo");
router.push("/mine/archives")
}
}
@@ -34,7 +35,11 @@ export async function loginpass(phone: string, password: string){
*/
export async function userinfo(){
const user = await get<UserInfo>('personalInfo');
console.log(user.data?.img)
// console.log(user.data?.img)
if(user.code == 1001){
router.push("/")
return '未登录';
}
return {
head: user.data?.img,
username: user.data?.name,