feat: 新增个人页面跳转功能

This commit is contained in:
陈淳
2024-01-17 16:31:01 +08:00
parent 0d5c196f39
commit 98a4a2158a
17 changed files with 139 additions and 43 deletions

View File

@@ -15,7 +15,7 @@ export const AUTH_USER = "AUTH_USER";
export default function useAuths(opt) {
const defaultOpt = {
@@ -40,6 +40,10 @@ const isLogin=computed(()=>{
return getToken()? true : false
});
const currentUserInfo=computed(()=>{
return useUserStore();
});
// 存储token到cookies
const setToken = (token) => {
if (token == null) {
@@ -187,6 +191,7 @@ const isLogin=computed(()=>{
clearStorage,
registerFun,
loginSuccess,
isLogin
isLogin,
currentUserInfo
};
}