feat: 支持登录、个人信息存储
This commit is contained in:
29
assets/scripts/config/ApiConfig.ts
Normal file
29
assets/scripts/config/ApiConfig.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* API 配置常量
|
||||
* 统一管理所有服务端 API 地址
|
||||
*/
|
||||
|
||||
/** 服务端 API 基础地址 */
|
||||
export const API_BASE = 'https://ilookai.cn/api/v1';
|
||||
|
||||
/** API 端点 */
|
||||
export const API_ENDPOINTS = {
|
||||
WX_LOGIN: `${API_BASE}/auth/wx-login`,
|
||||
USER_ASSETS: `${API_BASE}/user/assets`,
|
||||
USER_ASSETS_CONSUME: `${API_BASE}/user/assets/consume`,
|
||||
USER_ASSETS_EARN: `${API_BASE}/user/assets/earn`,
|
||||
USER_GAME_DATA: `${API_BASE}/user/game-data`,
|
||||
LEVELS: `${API_BASE}/wechat-game/levels`,
|
||||
} as const;
|
||||
|
||||
/** 积分操作原因 */
|
||||
export const POINT_REASONS = {
|
||||
HINT_UNLOCK: 'hint_unlock',
|
||||
LEVEL_COMPLETE: 'level_complete',
|
||||
} as const;
|
||||
|
||||
/** 请求超时时间(毫秒) */
|
||||
export const API_TIMEOUT = {
|
||||
DEFAULT: 8000,
|
||||
SHORT: 5000,
|
||||
} as const;
|
||||
Reference in New Issue
Block a user