import { defineConfig } from '@umijs/max'; const isDev = process.env.NODE_ENV === 'development'; const UMI_APP_API_URL = isDev ? 'http://localhost:7001' : 'https://api.yoone.ca'; export default defineConfig({ antd: {}, access: {}, model: {}, initialState: {}, request: {}, layout: { title: 'YOONE', }, define: { UMI_APP_API_URL, }, routes: [ { path: '/', redirect: '/home' }, { name: '追踪', path: '/track', component: './Track', layout: false }, { name: '登录', path: '/login', component: './Login', layout: false }, { name: '首页', path: '/home', component: './Home' }, { name: '组织架构', path: '/organiza', access: 'canSeeSuper', routes: [ { name: '用户管理', path: '/organiza/user', component: './Organiza/User', }, ], }, { name: '商品管理', path: '/product', routes: [ { name: '商品分类', path: '/product/category', component: './Product/Category', }, { name: '强度', path: '/product/strength', component: './Product/Strength', }, { name: '口味', path: '/product/flavors', component: './Product/Flavors', }, { name: '产品列表', path: '/product/list', component: './Product/List', }, { name: 'WP商品列表', path: '/product/wp_list', component: './Product/WpList', }, ], }, { name: '库存管理', path: '/stock', routes: [ { name: '库存列表', path: '/stock/list', component: './Stock/List', }, { name: '仓库点', path: '/stock/warehouse', component: './Stock/Warehouse', }, { name: '采购管理', path: '/stock/purchaseOrder', component: './Stock/PurchaseOrder', }, { name: '发货管理', path: '/stock/transfer', component: './Stock/Transfer', }, { name: '库存记录', path: '/stock/record', component: './Stock/Record', }, ], }, { name: '订单管理', path: '/order', access: 'canSeeAdmin', routes: [ { name: '订单列表', path: '/order/list', component: './Order/List', }, { name: '待发货产品', path: '/order/item', component: './Order/PendingItems', }, ], }, { name: '客户管理', path: '/customer', access: 'canSeeAdmin', routes: [ { name: '客户列表', path: '/customer/list', component: './Customer/List', }, ], }, // { // name: '物流管理', // path: '/logistics', // routes: [ // { // name: '服务商', // path: '/logistics/services', // component: './Logistics/Services', // }, // { // name: '地址管理', // path: '/logistics/address', // component: './Logistics/Address', // }, // { // name: '物流列表', // path: '/logistics/list', // component: './Logistics/List', // }, // ], // }, { name: '数据统计', path: '/statistics', routes: [ { name: '销售统计', path: '/statistics/sales', component: './Statistics/Sales', access: 'canSeeSuper', }, { name: '订单统计', path: '/statistics/order', component: './Statistics/Order', access: 'canSeeSuper', }, { name: '订单来源', path: '/statistics/orderSource', component: './Statistics/OrderSource', access: 'canSeeSuper', }, { name: '客户统计', path: '/statistics/customer', component: './Statistics/Customer', access: 'canSeeSuper', }, { name: '库存预测', path: '/statistics/inventoryForecast', component: './Statistics/InventoryForecast', }, { name: '补货', path: '/statistics/restocking', component: './Statistics/Restocking', }, ], }, // { // path: '*', // component: './404', // }, ], npmClient: 'pnpm', });