config.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /**
  2. * 配置通用
  3. */
  4. const node_dev = process.env.H_NODE_ENV;
  5. // //运行到浏览器用的
  6. let baseUrl = null // 后端服务接口
  7. let linkUrl = null // 链接
  8. let upFileUrl= null // 后端上传接口
  9. let staticUrl= null // 静态文件地址
  10. let redirectUri = null
  11. // 本地
  12. // #ifdef MP
  13. baseUrl='https://greath5.dev.dazesoft.cn/serviceapi';
  14. linkUrl='';
  15. upFileUrl='';
  16. staticUrl='';
  17. redirectUri= 'https://h5.wdzzgs.com/distribution/pages/login/index'
  18. // #endif
  19. // #ifdef H5
  20. baseUrl='/api';
  21. linkUrl='https://greath5.dev.dazesoft.cn/distributionlink/link.html';
  22. upFileUrl='';
  23. staticUrl='https://greath5.dev.dazesoft.cn/distribution/static/';
  24. redirectUri= 'https://greath5.dev.dazesoft.cn/distribution/pages/login/index'
  25. // #endif
  26. // 打包用的
  27. if (node_dev =='development') { // 分销测试
  28. // #ifdef MP
  29. baseUrl='';
  30. linkUrl='';
  31. upFileUrl='';
  32. staticUrl='';
  33. // #endif
  34. // #ifdef H5
  35. baseUrl='https://greath5.dev.dazesoft.cn/serviceapi';
  36. linkUrl='https://greath5.dev.dazesoft.cn/distributionlink/link.html';
  37. upFileUrl='h';
  38. staticUrl='https://greath5.dev.dazesoft.cn/distribution/static/';
  39. redirectUri= 'https://greath5.dev.dazesoft.cn/distribution/pages/login/index'
  40. // #endif
  41. }
  42. if (node_dev =='production') { // 分销正式
  43. // #ifdef MP
  44. baseUrl='';
  45. linkUrl='';
  46. upFileUrl='';
  47. staticUrl='';
  48. redirectUri= 'https://h5.wdzzgs.com/distribution/pages/login/index'
  49. // #endif
  50. // #ifdef H5
  51. baseUrl='https://h5.wdzzgs.com/serviceapi';
  52. linkUrl='https://h5.wdzzgs.com/distributionlink/link.html'
  53. upFileUrl='';
  54. staticUrl='https://h5.wdzzgs.com/distribution/static/';
  55. redirectUri= 'https://h5.wdzzgs.com/distribution/pages/login/index'
  56. // #endif
  57. }
  58. const commonConfig = {
  59. wxAppid: '', // 测试wxAppid
  60. appid: 'wx6490eaa0d20d2be2', // 公众号
  61. redirectUri: encodeURIComponent(redirectUri), //
  62. baseUrl: baseUrl, // 服务器地址
  63. linkUrl: linkUrl,
  64. uploadFileUrl: upFileUrl, // 上传文件路径
  65. staticUrl:staticUrl,
  66. paginationConfig:{
  67. pageNum: 1,
  68. pageSize: 10
  69. },//分页参数
  70. successCode:200,//接口返回状态
  71. }
  72. export {
  73. commonConfig
  74. }