Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a1b45f80
authored
Jun 03, 2023
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 优化 spu 相关路由配置
parent
91a5f804
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/router/modules/remaining.ts
+3
-3
src/views/mall/product/spu/index.vue
+3
-3
No files found.
src/router/modules/remaining.ts
View file @
a1b45f80
...
...
@@ -355,7 +355,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
},
children
:
[
{
path
:
'
productSpuA
dd'
,
// TODO @puhui999:最好拆成 add 和 edit 两个路由;添加商品;修改商品 fix
path
:
'
spu/a
dd'
,
// TODO @puhui999:最好拆成 add 和 edit 两个路由;添加商品;修改商品 fix
component
:
()
=>
import
(
'@/views/mall/product/spu/addForm.vue'
),
name
:
'ProductSpuAdd'
,
meta
:
{
...
...
@@ -368,7 +368,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
}
},
{
path
:
'
productSpuE
dit/:spuId(\\d+)'
,
path
:
'
spu/e
dit/:spuId(\\d+)'
,
component
:
()
=>
import
(
'@/views/mall/product/spu/addForm.vue'
),
name
:
'productSpuEdit'
,
meta
:
{
...
...
@@ -381,7 +381,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
}
},
{
path
:
'
productSpuD
etail/:spuId(\\d+)'
,
path
:
'
spu/d
etail/:spuId(\\d+)'
,
component
:
()
=>
import
(
'@/views/mall/product/spu/addForm.vue'
),
name
:
'productSpuDetail'
,
meta
:
{
...
...
src/views/mall/product/spu/index.vue
View file @
a1b45f80
...
...
@@ -397,18 +397,18 @@ const resetQuery = () => {
const
openForm
=
(
id
?:
number
)
=>
{
// 修改
if
(
typeof
id
===
'number'
)
{
push
(
'/product/
productSpuE
dit/'
+
id
)
push
(
'/product/
spu/e
dit/'
+
id
)
return
}
// 新增
push
(
'/product/
productSpuA
dd'
)
push
(
'/product/
spu/a
dd'
)
}
/**
* 查看商品详情
*/
const
openDetail
=
(
id
?:
number
)
=>
{
push
(
'/product/
productSpuD
etail/'
+
id
)
push
(
'/product/
spu/d
etail/'
+
id
)
}
/** 导出按钮操作 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment