1
This commit is contained in:
@@ -8,7 +8,9 @@ export const API_CONFIG = {
|
||||
DETAIL: '/user/detail',
|
||||
UPDATE: '/user/update',
|
||||
FOLLOW: '/user/follow',
|
||||
UNFOLLOW: '/user/unfollow'
|
||||
UNFOLLOW: '/user/unfollow',
|
||||
HOSTED_GAMES: '/user/games',
|
||||
PARTICIPATED_GAMES: '/user/participated'
|
||||
},
|
||||
|
||||
// 文件上传接口
|
||||
|
||||
@@ -17,7 +17,8 @@ const envConfigs: Record<EnvType, EnvConfig> = {
|
||||
// 开发环境
|
||||
development: {
|
||||
name: '开发环境',
|
||||
apiBaseURL: 'https://sit.light120.com',
|
||||
// apiBaseURL: 'https://sit.light120.com',
|
||||
apiBaseURL: 'http://localhost:9098',
|
||||
timeout: 15000,
|
||||
enableLog: true,
|
||||
enableMock: true
|
||||
@@ -26,7 +27,8 @@ const envConfigs: Record<EnvType, EnvConfig> = {
|
||||
// 测试环境
|
||||
test: {
|
||||
name: '测试环境',
|
||||
apiBaseURL: 'https://sit.light120.com',
|
||||
// apiBaseURL: 'https://sit.light120.com',
|
||||
apiBaseURL: 'http://localhost:9098',
|
||||
timeout: 12000,
|
||||
enableLog: true,
|
||||
enableMock: false
|
||||
@@ -53,10 +55,10 @@ export const getCurrentEnv = (): EnvType => {
|
||||
|
||||
// 在开发调试时,可以通过修改这里的逻辑来切换环境
|
||||
// 默认在小程序中使用生产环境配置
|
||||
if (currentEnv === Taro.ENV_TYPE.WEAPP) {
|
||||
// 微信小程序环境
|
||||
return 'production'
|
||||
}
|
||||
// if (currentEnv === Taro.ENV_TYPE.WEAPP) {
|
||||
// // 微信小程序环境
|
||||
// return 'production'
|
||||
// }
|
||||
|
||||
// 默认返回开发环境(便于调试)
|
||||
return 'development'
|
||||
|
||||
Reference in New Issue
Block a user