index.js 511 B

123456789101112131415161718192021222324
  1. import { ProjectName,APIHOST,IMGHOST } from '@/config'
  2. // #ifdef MP-WEIXIN
  3. const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}
  4. // #endif
  5. // #ifdef APP-PLUS
  6. const extConfig = {apiHost:APIHOST,imgHost:IMGHOST,}
  7. // #endif
  8. // 常量索引
  9. const envVal = {
  10. imgUrl: extConfig.imgHost,
  11. env: process.env.NODE_ENV,
  12. // 本地连接地址
  13. hostUrl: extConfig.apiHost,
  14. // 请求接口地址
  15. formal: null,
  16. // 项目来源
  17. source: ProjectName,
  18. // 第一个host
  19. firstHost: ''
  20. }
  21. export default envVal