123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- import { defineConfig } from '@umijs/max';
- import type { RequestConfig } from 'umi';
-
-
- export default defineConfig({
- antd: {},
- access: {},
- model: {},
- initialState: {},
- request: {},
- layout: {
- name: '菊城人才市场',
- logo: 'https://preview.pro.ant.design/static/logo.f0355d39.svg',
- // copy from pro site
- navTheme: 'dark',
- primaryColor: '#1890ff',
- layout: 'mix',
- contentWidth: 'Fluid',
- fixedHeader: true,
- fixSiderbar: false,
- splitMenus: true,
- siderWidth: 240,
- title: '菊城人才市场',
- pwa: false,
- iconfontUrl: '',
- avatarProps: {
- src: 'https://gw.alipayobjects.com/zos/antfincdn/efFD%24IOql2/weixintupian_20170331104822.jpg',
- size: 'small',
- title: '七妮妮'
- },
- },
- routes: [
- {
- path: '/',
- redirect: '/main/company/list',
- },
- {
- path: '/login',
- component: './Login',
- layout: false
- },
- // 总控路由
- {
- name: '基础管理',
- path: '/main',
- routes: [
- {
- name: '企业管理',
- routes: [
- {
- name: '企业列表',
- path: '/main/company/list',
- component: './Main/Company/List',
- },
- {
- name: 'VIP列表',
- path: '/main/company/vip',
- component: './Main/Company/Vip',
- },
- {
- name: '部门管理',
- path: '/main/company/department',
- component: './Main/Company/Department',
- },
- {
- name: '职位管理',
- path: '/main/company/post',
- component: './Main/Company/Post',
- }
- ]
- },
- {
- name: '求职者管理',
- routes: [
- {
- name: '简历列表',
- path: '/main/jobseeker/list',
- component: './Main/Jobseeker/List',
- },
- {
- name: '求职者账号列表',
- path: '/main/jobseeker/account',
- component: './Main/Jobseeker/Account',
- }
- ]
- }
-
- ]
- },
- // 出租屋路由
- {
- name: '系统管理',
- path: '/rent',
- routes: [
- {
- name: '房屋管理',
- path: '/rent/house',
- component: './Rent/House',
- },
- {
- name: '租客管理',
- path: '/rent/renter',
- component: './Rent/Renter',
- },
- ]
- },
- // 学校路由
- {
- name: '账号权限',
- path: '/school',
- routes: [
- {
- name: '学校管理',
- path: '/school/address',
- component: './Main/Address',
- },
- {
- name: '学生管理',
- path: '/school/area',
- component: './Main/Area',
- },
- ]
- },
- ],
- npmClient: 'npm',
- });
-
- export const request: RequestConfig = {
- // 统一的请求设定
- baseURL: '',
- timeout: 1000,
- headers: {
- 'Content-Type': 'application/json'
- },
-
- // 请求拦截器
- requestInterceptors: [
- (config) => {
- sessionStorage.getItem('token') ? config.headers.Authorization = sessionStorage.getItem('token') : '';
- // 在发送请求之前做些什么
- return config;
- }
- ],
-
- // 响应拦截器
- responseInterceptors: [
- (response) => {
- // 拦截响应数据,进行个性化处理
- const { data } = response;
- if (!data.success) {
- }
- return response;
- }
- ]
- };
|