config.js 1.6 KB

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