const PROJECT_ENV = 'prod' // 生产 prod, 开发1 dev,开发2 dev2， 测试 test, 预生产 pre
const needMock = '' //
const brandId = 2711 ; //1002 测试 2711 生产
// appid_dev_wx   wxc3b64b09b1d3dfc2
// appid_test_wx  wxac09792264c49b5c
// appid_pre_711  wx358b56af62edbde1
// appid_prod_711  wx700028bf32a3be66


// 1 2 3 步!!!!!!!!!!!!!!!!!!!!!!  prod appid brandId

const devCtx = 'http://buyer.devapi.bigaka.net' // 开发环境 1
const devCtx2 = 'http://dev-sellerapi.bigaka.net' // 开发环境 2
const testCtx = 'https://crm-b.bigaka.net/api' // 发测试时解开此注释
const preCtx = 'https://crm-b.bigaka.com/api' // 发预生产时解开此注释
const prodCtx = 'https://crm-b.bigaka.com/api' // 发生产时解开此注释

const devImgCtx = 'https://img3.bigaka.com/test' // 开发环境图片地址
const testImgCtx = 'https://img3.bigaka.com/test' // 测试环境图片地址
const preImgCtx = 'https://img3.bigaka.com/test' // 预生产环境图片地址
const prodImgCtx = 'https://img3.bigaka.com' // 预生产环境图片地址
// const prodImgCtx = 'https://img3.bigaka.com/prd' // 预生产环境图片地址

// const prodImgCtx = 'https://img3.bigaka.com' // 生产环境图片地址
const config = {
  dev: devCtx,
  dev2: devCtx2,
  test: testCtx,
  pre: preCtx,
  prod: prodCtx
}

const imgConfig = {
  dev: devImgCtx,
  dev2: devImgCtx,
  test: testImgCtx,
  pre: preImgCtx,
  prod: prodImgCtx
}

const tunulToken = {
  dev: 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD',
  dev2: 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD',
  test: 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD',
  pre: '4c8d641cb2b8a576317ee5f6ead1f36474463041d61fb5d4289364565b0c6c63',
  prod: '4c8d641cb2b8a576317ee5f6ead1f36474463041d61fb5d4289364565b0c6c63'
}

const appId = {
  dev: 'wxc3b64b09b1d3dfc2',
  dev2: 'wxc3b64b09b1d3dfc2',
  test: 'wxac09792264c49b5c',
  pre: 'wx358b56af62edbde1',
  prod: 'wx700028bf32a3be66'
}

const envInfo = (() => {
  return {
    ctx: config[PROJECT_ENV],
    env: PROJECT_ENV,
    imgCtx: imgConfig[PROJECT_ENV],
    brandId : brandId,
    tunulToken: tunulToken[PROJECT_ENV],
    appId : appId[PROJECT_ENV]
  }
})()

module.exports = {
  envInfo
}
