.umirc.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. // ref: https://umijs.org/config/
  2. import pxToViewPort from 'postcss-px-to-viewport';
  3. const extraPostCSSPlugins = [
  4. pxToViewPort({
  5. viewportWidth: 750,
  6. unitPrecision: 5,
  7. viewportUnit: 'vw',
  8. selectorBlackList: [],
  9. minPixelValue: 1,
  10. mediaQuery: false
  11. })
  12. ]
  13. export default {
  14. extraPostCSSPlugins,
  15. treeShaking: true,
  16. routes: [
  17. {
  18. path: '/',
  19. component: '../layouts/BasicLayout',
  20. routes: [
  21. {
  22. path: '/',
  23. name: '矿机首页',
  24. component: '../pages/Home/Home'
  25. },
  26. {
  27. path: '/topupmoney',
  28. name: '认购WOS',
  29. component: '../pages/Topupmoney/Topupmoney'
  30. },
  31. {
  32. path:'/team',
  33. name:'团队',
  34. component:'../pages/Team/Team'
  35. },
  36. {
  37. path:'/inviter',
  38. name:'绑定邀请人',
  39. component:'../pages/Team/Inviterpeople/Inviterpeople'
  40. },
  41. {
  42. path:'/myinvitation',
  43. name:'我的邀请',
  44. component:'../pages/Team/Myinvitation/Myinvitation'
  45. },
  46. {
  47. path: '/mine',
  48. name: '我的',
  49. component: '../pages/Mine/Mine'
  50. },
  51. {
  52. path: '/mill/millDetail',
  53. name: '矿机详情',
  54. component: '../pages/Milldetail/Milldetail'
  55. },
  56. {
  57. path: '/mill/buymill',
  58. name: '购买矿机',
  59. component: '../pages/Buymill/Buymill'
  60. },
  61. {
  62. path: '/wallet',
  63. name: '充值USDT',
  64. component: '../pages/Wallet/Wallet'
  65. },
  66. {
  67. path: '/extract',
  68. name: 'WOS提取',
  69. component: '../pages/Extract/Extract'
  70. },
  71. {
  72. path: '/examples',
  73. name: 'WOS转赠',
  74. component: '../pages/Examples/Examples'
  75. },
  76. {
  77. path: '/examplesnext',
  78. name: 'WOS转赠',
  79. component: '../pages/Examplesnext/Examplesnext'
  80. },
  81. {
  82. path:'/USDT',
  83. name:'USDT明细',
  84. component:'../pages/USDTdetail/USDTdetail'
  85. },
  86. {
  87. path:'/Showdetail',
  88. name:'USDT详情',
  89. component:'../pages/Showdetail/Showdetail'
  90. },
  91. {
  92. path:'/Equitydetail',
  93. name:'权益值明细',
  94. component:'../pages/Equitydetail/Equitydetail'
  95. },
  96. {
  97. path:'/WOSdetail',
  98. name:'WOS明细',
  99. component:'../pages/WOSdetail/WOSdetail'
  100. },
  101. {
  102. path:'/WOSshowdetail',
  103. name:'收益详情',
  104. component:'../pages/WOSshowdetail/WOSshowdetail'
  105. },
  106. ]
  107. }
  108. ],
  109. plugins: [
  110. // ref: https://umijs.org/plugin/umi-plugin-react.html
  111. ['umi-plugin-react', {
  112. antd: false,
  113. dva: false,
  114. dynamicImport: false,
  115. title: '矿机',
  116. dll: false,
  117. hd: true,
  118. routes: {
  119. exclude: [
  120. /components\//,
  121. ],
  122. },
  123. }],
  124. ],
  125. extraBabelPlugins: [
  126. ["import", { libraryName: "antd-mobile", style: true }] // `style: true` 会加载 less 文件
  127. ],
  128. proxy: {
  129. '/wazhima': {
  130. target: 'http://api.starbuds.laylib.com/', //测试
  131. // target:'http://zhima.xingya.live/', //生产
  132. changeOrigin: true,
  133. },
  134. },
  135. hash: true,
  136. outputPath: '/mill',//测试
  137. // outputPath: '/wazhima' //线上
  138. }