feat: 支持登录、个人信息存储

This commit is contained in:
richarjiang
2026-04-05 13:37:58 +08:00
parent e438f6fce4
commit b732e4d8f8
23 changed files with 3572 additions and 144 deletions

View File

@@ -0,0 +1,31 @@
/**
* 服务端 API 通用响应类型
*/
/** 服务端标准响应封装 */
export interface ApiEnvelope<T> {
success: boolean;
data: T | null;
message: string | null;
}
/** 登录响应数据 */
export interface WxLoginData {
token: string;
user: {
id: string;
nickname: string | null;
points: number;
};
}
/** 积分响应数据 */
export interface UserAssetsData {
points: number;
}
/** 游戏数据响应Loading 页面) */
export interface GameData {
user: { id: string; points: number };
completedLevelIds: string[];
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "13078ed9-43cf-4949-8a92-e702ee7de88a",
"files": [],
"subMetas": {},
"userData": {}
}