feat(passport): 迁移并修复小程序支付页面访问 websopy API 问题

- 迁移 src/passport/pay 相关代码至当前项目,无需替换文件
- 新增环境变量 WEBSOPY_API_BASE_URL,提供 websopy API 基础地址
- 在 config/app.ts 导出 WebsopyBaseUrl,供代码引用
- 配置 env.d.ts 类型定义,消除 TypeScript 隐式 any 错误
- request 请求方法支持自定义 baseUrl 以调用不同接口地址
- passport/pay 页面调用订阅接口统一传入 WebsopyBaseUrl
- 修正 tenantId 类型为 number,调整登录用户类型断言
- 确认编译成功,dist 目录生成对应文件及正确请求地址
- 说明 type-check 依赖库问题不影响正常构建和运行
This commit is contained in:
2026-07-16 01:34:27 +08:00
parent 9df90c1176
commit 85a1558e84
8 changed files with 92 additions and 34 deletions

30
config/env.d.ts vendored Normal file
View File

@@ -0,0 +1,30 @@
export const CURRENT_ENV: string
export const ENV_CONFIG: {
development: {
API_BASE_URL: string
SERVER_API_URL: string
WEBSOPY_API_BASE_URL: string
APP_NAME: string
DEBUG: string
}
test: {
API_BASE_URL: string
SERVER_API_URL: string
WEBSOPY_API_BASE_URL: string
APP_NAME: string
DEBUG: string
}
production: {
API_BASE_URL: string
SERVER_API_URL: string
WEBSOPY_API_BASE_URL: string
APP_NAME: string
DEBUG: string
}
}
export function getEnvConfig(): (typeof ENV_CONFIG)[keyof typeof ENV_CONFIG]
export const API_BASE_URL: string
export const SERVER_API_URL: string
export const WEBSOPY_API_BASE_URL: string
export const APP_NAME: string
export const DEBUG: string