// config/env.js - 环境配置文件

/**
 * 环境配置
 * 可以根据不同环境切换API地址
 */

// 开发环境
const development = {
  apiBaseUrl: 'https://ad.ningmuyun.com/farm/api',
  uploadUrl: 'https://ad.ningmuyun.com/farm/api/upload',
  imageBaseUrl: 'https://ad.ningmuyun.com/farm',
  timeout: 10000,
  debug: true
}

// 测试环境
const testing = {
  apiBaseUrl: 'https://test.ningmuyun.com/farm/api',
  uploadUrl: 'https://test.ningmuyun.com/farm/api/upload',
  imageBaseUrl: 'https://test.ningmuyun.com/farm',
  timeout: 10000,
  debug: true
}

// 生产环境
const production = {
  apiBaseUrl: 'https://ad.ningmuyun.com/farm/api',
  uploadUrl: 'https://ad.ningmuyun.com/farm/api/upload',
  imageBaseUrl: 'https://ad.ningmuyun.com/farm',
  timeout: 10000,
  debug: false
}

// 当前环境配置
// 可以通过修改这里来切换环境
const currentEnv = 'development' // development | testing | production

// 环境映射
const envMap = {
  development,
  testing,
  production
}

// 导出当前环境配置
module.exports = envMap[currentEnv]

