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

41
src/types/global.d.ts vendored Normal file
View File

@@ -0,0 +1,41 @@
declare global {
/**
* 分页查询参数
*/
interface PageQuery {
pageNum: number;
pageSize: number;
}
/**
* 分页响应对象
*/
interface PageResult<T> {
/** 数据列表 */
list: T;
/** 总数 */
total: number;
}
/**
* 组件数据源
*/
interface OptionType {
/** 值 */
value: string | number;
/** 文本 */
label: string;
/** 子列表 */
children?: OptionType[];
}
/**
* 响应数据
*/
interface ResponseData<T = any> {
code: string;
data: T;
msg: string;
}
}
export {};