123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- // https://umijs.org/config/
- import { defineConfig } from 'umi';
- import defaultSettings from './defaultSettings';
- import proxy from './proxy';
- const { REACT_APP_ENV } = process.env;
- export default defineConfig({
- publicPath: './',
- hash: true,
- antd: {},
- dva: {
- hmr: true,
- },
- history: {
- type: 'hash',
- },
- locale: {
- // default zh-CN
- default: 'zh-CN',
- antd: true,
- // default true, when it is true, will use `navigator.language` overwrite default
- baseNavigator: true,
- },
- dynamicImport: {
- loading: '@/components/PageLoading/index',
- },
- targets: {
- ie: 11,
- },
- // umi routes: https://umijs.org/docs/routing
- routes: [
- {
- path: '/',
- component: '../layouts/BlankLayout',
- routes: [
- {
- path: '/user',
- component: '../layouts/UserLayout',
- routes: [
- {
- path: '/user/login',
- name: 'login',
- component: './User/login',
- },
- ],
- },
- // {
- // path: '/',
- // component: '../layouts/SecurityLayout',
- // routes: [
- // {
- // path: '/',
- // component: '../layouts/BasicLayout',
- // routes: [
- // {
- // path: '/',
- // redirect: '/agent/list',
- // },
- // {
- // path: '/agent',
- // name: '代理商管理',
- // icon: 'dashboard',
- // routes: [
- // {
- // name: '代理商列表',
- // icon: 'smile',
- // path: '/agent/list',
- // component: './agent/list',
- // }
- // ]
- // },
- // ]
- // }
- // ]
- // }
- {
- path: '/',
- component: '../layouts/BasicLayout',
- routes: [
- {
- path: '/',
- redirect: '/agent/list',
- },
- {
- path: '/agent',
- name: '代理商管理',
- icon: 'UserOutlined',
- routes: [
- {
- name: '代理商列表',
- path: '/agent/list',
- component: './agent/list',
- },
- ],
- },
- {
- path: '/tieba',
- name: '贴吧管理',
- icon: 'HomeOutlined',
- routes: [
- {
- name: '分类管理',
- icon: 'smile',
- path: '/tieba/Classify',
- component: './tieba/classify',
- },
- {
- name: '贴吧板块',
- icon: 'smile',
- path: '/tieba/plate',
- component: './tieba/plate',
- },
- {
- name: '帖子管理',
- icon: 'smile',
- path: '/tieba/posts',
- component: './tieba/posts',
- },
- ],
- },
- {
- path: '/notice',
- name: '通知管理',
- icon: 'MessageOutlined',
- routes: [
- {
- name: '公告管理',
- path: '/notice/notice',
- component: './notice',
- },
- ],
- },
- {
- path: '/club',
- name: '俱乐部管理',
- icon: 'CoffeeOutlined',
- component: './club',
- },
- {
- path: '/weapp',
- name: '小程序管理',
- icon: 'WechatOutlined',
- component: './weapp',
- },
- {
- path: '/complaint',
- name: '投诉管理',
- icon: 'AlertOutlined',
- routes: [
- {
- name: '帖子列表',
- icon: 'smile',
- path: '/complaint/admin',
- component: './complaint/admin',
- },
- ],
- },
- {
- path: '/setting',
- name: '设置',
- icon: 'SettingOutlined',
- routes: [
- {
- name: '首页轮播图',
- path: '/setting/banner',
- component: './setting/banner/index',
- },
- {
- name: '登录页背景图',
- path: '/setting/bgi',
- component: './setting/bgi/index',
- },
- ],
- },
- ],
- },
- ],
- },
- ],
- // Theme for antd: https://ant.design/docs/react/customize-theme-cn
- theme: {
- 'primary-color': defaultSettings.primaryColor,
- },
- title: false,
- ignoreMomentLocale: true,
- proxy: proxy[REACT_APP_ENV || 'dev'],
- manifest: {
- basePath: './',
- },
- });
|