.umirc.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import { defineConfig } from 'umi';
  2. export default defineConfig({
  3. antd: {},
  4. base: '/admin/',
  5. publicPath: '/admin/',
  6. history: { type: 'browser' },
  7. hash: true,
  8. metas: [
  9. {
  10. name: 'viewport',
  11. content: 'width=device-width, initial-scale=1, viewport-fit=cover',
  12. },
  13. ],
  14. headScripts: [
  15. { src: 'https://telegram.org/js/telegram-web-app.js' },
  16. ],
  17. routes: [
  18. { path: '/login', component: '@/pages/Login' },
  19. { path: '/change-password', component: '@/pages/ChangePassword' },
  20. { path: '/technician', component: '@/pages/TechnicianMiniApp' },
  21. {
  22. path: '/',
  23. component: '@/layouts/AdminLayout',
  24. routes: [
  25. { path: '/', redirect: '/dashboard' },
  26. { path: '/dashboard', component: '@/pages/Dashboard' },
  27. { path: '/chats', component: '@/pages/Chats' },
  28. { path: '/chats/:chatId', component: '@/pages/ChatDetail' },
  29. { path: '/giveaways', component: '@/pages/Giveaways' },
  30. { path: '/points', component: '@/pages/Points' },
  31. { path: '/directory', component: '@/pages/Directory' },
  32. { path: '/services', component: '@/pages/Services' },
  33. { path: '/business-assistant', component: '@/pages/BusinessAssistant' },
  34. { path: '/audit', component: '@/pages/AuditLogs' },
  35. { path: '/settings', component: '@/pages/Settings' },
  36. ],
  37. },
  38. ],
  39. npmClient: 'npm',
  40. proxy: {
  41. '/api/admin': {
  42. target: 'http://127.0.0.1:8088',
  43. changeOrigin: true,
  44. },
  45. },
  46. });