.umirc.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import { defineConfig } from '@umijs/max';
  2. export default defineConfig({
  3. antd: {},
  4. access: {},
  5. model: {},
  6. initialState: {},
  7. request: {},
  8. layout: false,
  9. publicPath: process.env.NODE_ENV == 'development' ? '/' : '/gt-dig/',
  10. metas: [
  11. // 配置html禁止缓存
  12. { 'http-equiv': 'pragma', content: 'no-cache' },
  13. { 'http-equiv': 'cache-control', content: 'no-cache' },
  14. { 'http-equiv': 'expires', content: '0' },
  15. { 'http-equiv': 'X-UA-Compatible', content: 'IE=EmulateIE9' },
  16. ],
  17. proxy: {
  18. '/api': {
  19. // target: 'http://47.96.12.136:8888/',
  20. target: 'http://47.96.12.136:8788/',
  21. // target: 'https://work.greentech.com.cn/',
  22. changeOrigin: true,
  23. },
  24. },
  25. routes: [
  26. {
  27. path: '/',
  28. redirect: '/home',
  29. },
  30. {
  31. name: '首页',
  32. path: '/home',
  33. component: './Home',
  34. },
  35. {
  36. name: '工况管理',
  37. path: '/smart/work/:projectId',
  38. component: './Smart',
  39. },
  40. {
  41. name: '任务管理',
  42. path: '/task-manage/:projectId',
  43. component: './TaskManage',
  44. },
  45. // {
  46. // name: '权限演示',
  47. // path: '/access',
  48. // component: './Access',
  49. // },
  50. // {
  51. // name: ' CRUD 示例',
  52. // path: '/table',
  53. // component: './Table',
  54. // },
  55. ],
  56. npmClient: 'yarn',
  57. });