app.js 685 B

123456789101112131415161718192021222324252627282930313233343536
  1. // 开发者环境:开|关 【注:方便微信小程序发行测试】
  2. const SWITCH_DEVELOPMENT = false
  3. /** S 是否H5端 **/
  4. // #ifdef H5
  5. const IS_H5 = true
  6. // #endif
  7. // #ifndef H5
  8. const IS_H5 = false
  9. // #endif
  10. /** E 是否H5端 **/
  11. /** S API BaseURL **/
  12. const baseURLMap = {
  13. // 开发环境
  14. development: 'https://shop.xianghuaqi.net.cn',
  15. // 生产环境
  16. production: IS_H5 ? location.origin : 'https://shop.xianghuaqi.net.cn',
  17. }
  18. const baseURL = SWITCH_DEVELOPMENT ? baseURLMap['development'] : baseURLMap[process.env.NODE_ENV]
  19. /** E API BaseURL **/
  20. module.exports = {
  21. version: '2.0.1.20220929', // 版本号
  22. baseURL, // API Base URL
  23. basePath: '/mobile'
  24. }