更新:登录功能

This commit is contained in:
2025-11-04 12:37:04 +08:00
commit a21fb92916
897 changed files with 51500 additions and 0 deletions

28
api/config.ts Normal file
View File

@@ -0,0 +1,28 @@
// api/config.ts
export const ENV = process.env.NODE_ENV || 'development';
/**
* 开发/生产的 base url 组织成 SERVICE_MAP。
* 根据实际域名替换下面的地址。
*/
const BASE_URL_MAP = {
development: {
MAIN: 'http://192.168.110.100:9300/pb/',
// PAYMENT: 'https://dev-pay.example.com', // 暂时用不到
// CDN: 'https://cdn-dev.example.com', // 暂时用不到
},
production: {
MAIN: 'https://global.nuttyreading.com/',
// PAYMENT: 'https://pay.example.com', // 暂时用不到
// CDN: 'https://cdn.example.com', // 暂时用不到
},
} as const;
export const APP_INFO = {
TYPE: 'abroad', // APP 名称
VERSION_CODE: '1.0.0', // APP 版本号,可能升级的时候会用,这里需要再确定?
}
export const REQUEST_TIMEOUT = 15000;
export const SERVICE_MAP = (BASE_URL_MAP as any)[ENV] ?? BASE_URL_MAP.development;