fix: 优化 spu 相关路由配置
This commit is contained in:
parent
91a5f8044c
commit
a1b45f80bc
@ -355,7 +355,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'productSpuAdd', // TODO @puhui999:最好拆成 add 和 edit 两个路由;添加商品;修改商品 fix
|
path: 'spu/add', // TODO @puhui999:最好拆成 add 和 edit 两个路由;添加商品;修改商品 fix
|
||||||
component: () => import('@/views/mall/product/spu/addForm.vue'),
|
component: () => import('@/views/mall/product/spu/addForm.vue'),
|
||||||
name: 'ProductSpuAdd',
|
name: 'ProductSpuAdd',
|
||||||
meta: {
|
meta: {
|
||||||
@ -368,7 +368,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'productSpuEdit/: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: {
|
||||||
@ -381,7 +381,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'productSpuDetail/: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: {
|
||||||
|
@ -397,18 +397,18 @@ const resetQuery = () => {
|
|||||||
const openForm = (id?: number) => {
|
const openForm = (id?: number) => {
|
||||||
// 修改
|
// 修改
|
||||||
if (typeof id === 'number') {
|
if (typeof id === 'number') {
|
||||||
push('/product/productSpuEdit/' + id)
|
push('/product/spu/edit/' + id)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 新增
|
// 新增
|
||||||
push('/product/productSpuAdd')
|
push('/product/spu/add')
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查看商品详情
|
* 查看商品详情
|
||||||
*/
|
*/
|
||||||
const openDetail = (id?: number) => {
|
const openDetail = (id?: number) => {
|
||||||
push('/product/productSpuDetail/' + id)
|
push('/product/spu/detail/' + id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
|
Loading…
Reference in New Issue
Block a user