feat: 添加登录和获取用户信息接口,整合pinia实现用户状态全局共享

This commit is contained in:
ray
2024-09-23 08:29:44 +08:00
parent f106f84646
commit 737f6a3ee5
21 changed files with 6997 additions and 5061 deletions

12
src/store/index.ts Normal file
View File

@@ -0,0 +1,12 @@
import type { App } from "vue";
import { createPinia } from "pinia";
const store = createPinia();
// 全局注册 store
export function setupStore(app: App<Element>) {
app.use(store);
}
export * from "./modules/user";
export { store };