Commit 9d12ab4e authored by GuanHua's avatar GuanHua

fix: 移除多余路由

parent a39033d4
/*
* @Author: XieZhiXiong
* @Date: 2020-07-29 10:21:49
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-26 17:36:39
* @Description:
*/
/**
* @description 路由配置页, 更多配置可查看 https://umijs.org/zh-CN/docs/routing#routes
*/
const router = [
{
path: '/login',
component: '@/pages/user/login',
},
{
path: '/mall/template/edit',
component: '@/pages/pageCustomized/mallEdit',
},
{
path: '/mall/template/preview',
component: '@/pages/pageCustomized/preview/mallPreview',
},
{
path: '/',
component: '@/layouts/index',
routes: [
{
path: '/',
redirect: '/home',
},
{
path: '/home',
name: 'home',
component: '@/pages/home',
icon: 'BarChartOutlined',
},
{
path: '/pageCustomized',
name: 'pageCustomized',
icon: 'SmileOutlined',
routes: [
{
path: '/pageCustomized/shopCenterTemplate',
name: 'shopCenterTemplate',
component: '@/pages/pageCustomized/shopCenterTemplate',
},
{
path: '/pageCustomized/shopTemplate',
name: 'shopTemplate',
component: '@/pages/pageCustomized/shopTemplate',
},
{
path: '/pageCustomized/template/detail',
name: 'templateDetail',
component: '@/pages/pageCustomized/templateDetail',
hideInMenu: true,
hidePageHeader: true,
},
],
},
],
},
];
export default router;
/*
* @Author: XieZhiXiong
* @Date: 2020-07-29 10:21:49
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-26 17:36:39
* @Description:
*/
/**
* @description 路由配置页, 更多配置可查看 https://umijs.org/zh-CN/docs/routing#routes
*/
const router = [
{
path: '/login',
component: '@/pages/user/login',
},
{
path: '/',
component: '@/layouts/index',
routes: [
{
path: '/',
redirect: '/home',
},
{
path: '/home',
name: 'home',
component: '@/pages/home',
icon: 'BarChartOutlined',
}
],
},
];
export default router;
......@@ -88,10 +88,10 @@ const appMallEdit: React.FC<ShopPreviewPropsType> = (props) => {
if(res.code === 1000) {
resolve(res.data.data)
} else {
reject(false)
resolve([])
}
}).catch((eror) => {
reject(false)
resolve([])
})
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment