config.js 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * 在package.json中定义的H_NODE_ENV
  3. * 在本地运行该环境为未定义,设置初始baseUrl
  4. * 只有在打包环境下才会有H_NODE_ENV
  5. */
  6. const node_dev = process.env.H_NODE_ENV;
  7. let baseUrl = 'https://wx.hw.hongweisoft.com/parking', // 默认为普定测试环境
  8. wxAppid = 'wx6e9cdf7a0ee8a51b', // 默认为达泽公众号appid
  9. projectFlag = 'puding';
  10. if (node_dev) {
  11. (baseUrl = process.env.H_BASE_URL), (wxAppid = process.env.H_WXAPPID), (projectFlag = process.env.H_PROJECT);
  12. }
  13. export const config = {
  14. wxAppid,
  15. baseUrl,
  16. projectFlag,
  17. onlyWxLogin: [
  18. 'pages/parkingLock/parkingLock',
  19. 'pages/wechatLogin/wechatLogin',
  20. 'pages/VehicleInquiry/VehicleInquiry',
  21. 'pages/OnsitePayment/OnsitePayment',
  22. 'pages/parkadvance/parkadvance',
  23. 'pages/parkexport/parkexport',
  24. 'pages/parkroadgate/parkroadgate',
  25. 'pages/roadGateSystem/roadGateSystem',
  26. 'pages/parkentrace/parkentrace',
  27. 'pages/geomagnetismLock/geomagnetismLock',
  28. 'pages/wechatLogin/wechatLogin',
  29. 'pages/goldPlan/goldPlan',
  30. 'pages/center/phoneLogin/phoneLogin'
  31. ] // 只需要微信登录的页面路径
  32. };