Commit d31ade7a by puhui999

fix: 完善 SPU 相关路由 review

parent 20f3f726
...@@ -355,7 +355,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ ...@@ -355,7 +355,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
}, },
children: [ children: [
{ {
path: 'spu/add', // TODO @puhui999:最好拆成 add 和 edit 两个路由;添加商品;修改商品 fix path: 'spu/add',
component: () => import('@/views/mall/product/spu/addForm.vue'), component: () => import('@/views/mall/product/spu/addForm.vue'),
name: 'ProductSpuAdd', name: 'ProductSpuAdd',
meta: { meta: {
...@@ -370,7 +370,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ ...@@ -370,7 +370,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
{ {
path: 'spu/edit/:spuId(\\d+)', path: 'spu/edit/:spuId(\\d+)',
component: () => import('@/views/mall/product/spu/addForm.vue'), component: () => import('@/views/mall/product/spu/addForm.vue'),
name: 'productSpuEdit', name: 'ProductSpuEdit',
meta: { meta: {
noCache: true, noCache: true,
hidden: true, hidden: true,
...@@ -383,7 +383,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ ...@@ -383,7 +383,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
{ {
path: 'spu/detail/:spuId(\\d+)', path: 'spu/detail/:spuId(\\d+)',
component: () => import('@/views/mall/product/spu/addForm.vue'), component: () => import('@/views/mall/product/spu/addForm.vue'),
name: 'productSpuDetail', name: 'ProductSpuDetail',
meta: { meta: {
noCache: true, noCache: true,
hidden: true, hidden: true,
......
...@@ -400,7 +400,7 @@ const openForm = (id?: number) => { ...@@ -400,7 +400,7 @@ const openForm = (id?: number) => {
return return
} }
// 新增 // 新增
push('/product/spu/add') push({ name: 'ProductSpuAdd' })
} }
/** /**
......
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 sign in to comment