forked from gxwebsoft/mp-10550
feat(dealer): 添加配送员解冻资金功能
- 在dealer页面添加配送员权限判断和解冻资金功能 - 导入useUser hook和updateShopDealerUser API - 仅配送员角色可操作冻结金额转入可提现 - 点击待使用金额弹出确认框进行资金转移 - 统一rider和dealer页面的解冻资金逻辑实现 - 修改环境配置支持SERVER_API_URL变量导出 - 更新版权信息配置结构优化代码注释 - 优化待使用金额卡片点击交互体验
This commit is contained in:
@@ -1,44 +1,43 @@
|
||||
// 环境变量配置
|
||||
|
||||
// ============ 环境切换开关(修改这里即可切换环境)============
|
||||
// 可选值: 'development' | 'test' | 'production'
|
||||
const CURRENT_ENV = 'production' as const
|
||||
// ===========================================================
|
||||
|
||||
export const ENV_CONFIG = {
|
||||
// 开发环境
|
||||
development: {
|
||||
API_BASE_URL: 'http://127.0.0.1:9200/api',
|
||||
// API_BASE_URL: 'https://glt-api2.websoft.top/api',
|
||||
API_BASE_URL: 'https://glt-dev-api.websoft.top/api',
|
||||
SERVER_API_URL: 'https://glt-dev-server.websoft.top/api',
|
||||
APP_NAME: '开发环境',
|
||||
DEBUG: 'true',
|
||||
},
|
||||
// 测试环境
|
||||
test: {
|
||||
API_BASE_URL: 'https://glt-dev-api.websoft.top/api',
|
||||
SERVER_API_URL: 'https://glt-dev-server.websoft.top/api',
|
||||
APP_NAME: '测试环境',
|
||||
DEBUG: 'true',
|
||||
},
|
||||
// 生产环境
|
||||
production: {
|
||||
API_BASE_URL: 'https://glt-api2.websoft.top/api',
|
||||
API_BASE_URL: 'https://glt-api.websoft.top/api',
|
||||
SERVER_API_URL: 'https://glt-server.websoft.top/api',
|
||||
APP_NAME: '桂乐淘',
|
||||
DEBUG: 'false',
|
||||
},
|
||||
// 测试环境
|
||||
test: {
|
||||
// API_BASE_URL: 'http://127.0.0.1:9200/api',
|
||||
API_BASE_URL: 'https://glt-api2.websoft.top/api',
|
||||
APP_NAME: '测试环境',
|
||||
DEBUG: 'true',
|
||||
}
|
||||
}
|
||||
|
||||
// 获取当前环境配置
|
||||
export function getEnvConfig() {
|
||||
const env = process.env.NODE_ENV || 'development'
|
||||
if (env === 'production') {
|
||||
return ENV_CONFIG.production
|
||||
} else { // @ts-ignore
|
||||
if (env === 'test') {
|
||||
return ENV_CONFIG.test
|
||||
} else {
|
||||
return ENV_CONFIG.development
|
||||
}
|
||||
}
|
||||
return ENV_CONFIG[CURRENT_ENV]
|
||||
}
|
||||
|
||||
// 导出环境变量
|
||||
export const {
|
||||
API_BASE_URL,
|
||||
SERVER_API_URL,
|
||||
APP_NAME,
|
||||
DEBUG
|
||||
} = getEnvConfig()
|
||||
|
||||
Reference in New Issue
Block a user