This commit is contained in:
2020-11-30 13:53:06 +08:00
parent 03d4d1ea15
commit 220f005bc7
3 changed files with 27 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
import router from '@/router';
import store from '@/store';
import { LiveList, LivelistInfo, LoginData, UserInfo } from '@/types';
import { getValue, saveValue } from '@/utils/common';
import { getValue, saveValue, toindex } from '@/utils/common';
import { message } from 'ant-design-vue';
import dayjs from 'dayjs';
import { del, get, post, put, setToken } from './base'
@@ -47,7 +47,7 @@ export async function userinfo(){
// console.log(user.data.img)
if(user.code == 1001){
saveValue("token","")
router.push("/")
toindex()
return '未登录';
}