refactor(frontend): 删除无用的文件
This commit is contained in:
1 parent
dc141d19a2
commit
ced7fbe085
11 files changed
-162
No files matched your search
@@ -1,23 +0,0 @@
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useAuthStore } from '../stores/auth.store';
|
||||
|
||||
/**
|
||||
* 认证 composable:新代码的统一入口。
|
||||
*/
|
||||
export function useAuth() {
|
||||
const store = useAuthStore();
|
||||
const { user, isLoggedIn, isAdmin, isGuest, token } = storeToRefs(store);
|
||||
|
||||
return {
|
||||
user,
|
||||
isLoggedIn,
|
||||
isAdmin,
|
||||
isGuest,
|
||||
token,
|
||||
login: store.login,
|
||||
logout: store.logout,
|
||||
refreshAccessToken: store.refreshAccessToken,
|
||||
getHeaders: store.getHeaders,
|
||||
syncFromStorage: store.syncFromStorage,
|
||||
};
|
||||
}
|
||||
@@ -3,7 +3,6 @@
|
||||
* 认证 feature 对外导出:store、登录 composable、用户 API。
|
||||
*/
|
||||
export { useAuthStore, bindAuthStoreSync } from './stores/auth.store';
|
||||
export { useAuth } from './composables/useAuth';
|
||||
export { useLogin } from './composables/useLogin';
|
||||
export {
|
||||
getUserProfile,
|
||||
|
||||
Reference in new issue
Block a user