.umirc.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import { defineConfig } from "umi";
  2. export default defineConfig({
  3. routes: [
  4. {
  5. path: "/",
  6. component: "index",
  7. name: "系统首页",
  8. title: "系统首页",
  9. wrappers: ["@/wrappers/auth"],
  10. },
  11. {
  12. path: "/login",
  13. component: "login",
  14. name: "登录",
  15. title: "登录",
  16. wrappers: ["@/wrappers/auth"],
  17. },
  18. {
  19. path: "/user",
  20. component: "user",
  21. name: "普通用户",
  22. title: "普通用户",
  23. wrappers: ["@/wrappers/auth"],
  24. },
  25. {
  26. path: "/admin",
  27. component: "admin",
  28. name: "管理用户",
  29. title: "管理用户",
  30. wrappers: ["@/wrappers/auth"],
  31. },
  32. {
  33. path: "/tea",
  34. component: "tea",
  35. name: "茶产品",
  36. title: "茶产品",
  37. wrappers: ["@/wrappers/auth"],
  38. },
  39. {
  40. path: "/fruit",
  41. component: "fruit",
  42. name: "水果茶产品",
  43. title: "水果茶产品",
  44. wrappers: ["@/wrappers/auth"],
  45. },
  46. {
  47. path: "/products",
  48. component: "products",
  49. name: "茶副产品",
  50. title: "茶副产品",
  51. wrappers: ["@/wrappers/auth"],
  52. },
  53. { path: "/*", component: "404" },
  54. ],
  55. plugins: ["@umijs/plugins/dist/react-query"],
  56. reactQuery: {},
  57. npmClient: "npm",
  58. proxy: {
  59. "/ball/v1/api": {
  60. target: "http://127.0.0.1:13005",
  61. changeOrigin: true,
  62. // pathRewrite: { "^/api": "" },
  63. },
  64. },
  65. });