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:
@@ -4,18 +4,21 @@ export const ENV_CONFIG = {
|
||||
development: {
|
||||
API_BASE_URL: 'https://shop-api.websoft.top/api',
|
||||
SERVER_API_URL: 'https://server.websoft.top/api',
|
||||
WEBSOPY_API_BASE_URL: 'https://websopy-api.websoft.top/api',
|
||||
APP_NAME: '威硕谱软件',
|
||||
DEBUG: 'true',
|
||||
},
|
||||
test: {
|
||||
API_BASE_URL: 'https://shop-api.websoft.top/api',
|
||||
SERVER_API_URL: 'https://server.websoft.top/api',
|
||||
WEBSOPY_API_BASE_URL: 'https://websopy-api.websoft.top/api',
|
||||
APP_NAME: '威硕谱软件',
|
||||
DEBUG: 'true',
|
||||
},
|
||||
production: {
|
||||
API_BASE_URL: 'https://shop-api.websoft.top/api',
|
||||
SERVER_API_URL: 'https://server.websoft.top/api',
|
||||
WEBSOPY_API_BASE_URL: 'https://websopy-api.websoft.top/api',
|
||||
APP_NAME: '威硕谱软件',
|
||||
DEBUG: 'false',
|
||||
},
|
||||
@@ -25,4 +28,4 @@ export function getEnvConfig() {
|
||||
return ENV_CONFIG[CURRENT_ENV] || ENV_CONFIG.development
|
||||
}
|
||||
|
||||
export const { API_BASE_URL, SERVER_API_URL, APP_NAME, DEBUG } = getEnvConfig()
|
||||
export const { API_BASE_URL, SERVER_API_URL, WEBSOPY_API_BASE_URL, APP_NAME, DEBUG } = getEnvConfig()
|
||||
|
||||
Reference in New Issue
Block a user