Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
op-web-service
Commits
c25bba40
Commit
c25bba40
authored
Jul 07, 2021
by
lvweichao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: static file router
parent
63e70c36
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
27 deletions
+31
-27
router.js
server/router.js
+1
-1
pageconfig.js
src/config/pageconfig.js
+4
-4
main.js
src/main.js
+1
-1
config.js
src/pages/Goods/components/PageHeader/config.js
+2
-2
index.js
src/router/Goods/index.js
+7
-3
index.js
src/router/index.js
+16
-16
No files found.
server/router.js
View file @
c25bba40
...
@@ -10,7 +10,7 @@ const goods = require('./controllers/goods');
...
@@ -10,7 +10,7 @@ const goods = require('./controllers/goods');
const
router
=
Router
();
const
router
=
Router
();
const
API_VERSION
=
"/api/v1"
;
const
API_VERSION
=
"/api/v1"
;
router
.
get
(
'/'
,
static
.
index
)
router
.
get
(
/^
\/
op.*/
,
static
.
index
)
router
.
get
(
`
${
API_VERSION
}
/fetch_user`
,
system
.
fetch_user
);
router
.
get
(
`
${
API_VERSION
}
/fetch_user`
,
system
.
fetch_user
);
router
.
get
(
`
${
API_VERSION
}
/user/:type`
,
user
.
query
)
router
.
get
(
`
${
API_VERSION
}
/user/:type`
,
user
.
query
)
...
...
src/config/pageconfig.js
View file @
c25bba40
...
@@ -4,22 +4,22 @@ export const HEADER_CONFIG = {
...
@@ -4,22 +4,22 @@ export const HEADER_CONFIG = {
logo
:
'http://si1.go2yd.com/get-image/0ZAJxXeZ6iu'
,
logo
:
'http://si1.go2yd.com/get-image/0ZAJxXeZ6iu'
,
menuItems
:
[
menuItems
:
[
{
{
path
:
'/enterprise/certification'
,
path
:
'/
op/
enterprise/certification'
,
name
:
'企业认证管理'
,
name
:
'企业认证管理'
,
key
:
'enterprise'
,
key
:
'enterprise'
,
},
},
{
{
path
:
'/lifeNo'
,
path
:
'/
op/
lifeNo'
,
name
:
'生活号管理'
,
name
:
'生活号管理'
,
key
:
'lifeNo'
,
key
:
'lifeNo'
,
},
},
{
{
path
:
'/roleManageRole'
,
path
:
'/
op/
roleManageRole'
,
name
:
'角色管理'
,
name
:
'角色管理'
,
key
:
'role'
,
key
:
'role'
,
},
},
{
{
path
:
'/user'
,
path
:
'/
op/
user'
,
name
:
'用户管理'
,
name
:
'用户管理'
,
key
:
'user'
,
key
:
'user'
,
}
}
...
...
src/main.js
View file @
c25bba40
...
@@ -32,7 +32,7 @@ router.beforeResolve(async (to, from, next) => {
...
@@ -32,7 +32,7 @@ router.beforeResolve(async (to, from, next) => {
}
}
if
(
!
checkPathAuth
(
to
.
path
))
{
if
(
!
checkPathAuth
(
to
.
path
))
{
router
.
push
(
'/403'
)
router
.
push
(
{
name
:
'Forbidden'
}
)
}
else
{
}
else
{
next
()
next
()
}
}
...
...
src/pages/Goods/components/PageHeader/config.js
View file @
c25bba40
const
headerConfig
=
[
const
headerConfig
=
[
{
{
name
:
"商品管理"
,
name
:
"商品管理"
,
path
:
"/goods/list"
path
:
"/
op/
goods/list"
},
},
{
{
name
:
"分销"
,
name
:
"分销"
,
path
:
"/goods/retail"
path
:
"/
op/
goods/retail"
},
},
];
];
...
...
src/router/Goods/index.js
View file @
c25bba40
...
@@ -3,17 +3,21 @@
...
@@ -3,17 +3,21 @@
*/
*/
const
goodsRouters
=
[
const
goodsRouters
=
[
{
{
path
:
"/goods/list"
,
path
:
"/op/goods"
,
redirect
:
"/op/goods/list"
},
{
path
:
"/op/goods/list"
,
name
:
"GoodsList"
,
name
:
"GoodsList"
,
component
:
()
=>
import
(
/* webpackChunkName: "goods" */
"@/pages/Goods/List"
)
component
:
()
=>
import
(
/* webpackChunkName: "goods" */
"@/pages/Goods/List"
)
},
},
{
{
path
:
"/goods/detail"
,
path
:
"/
op/
goods/detail"
,
name
:
"GoodsDetail"
,
name
:
"GoodsDetail"
,
component
:
()
=>
import
(
/* webpackChunkName: "goods" */
"@/pages/Goods/Detail"
)
component
:
()
=>
import
(
/* webpackChunkName: "goods" */
"@/pages/Goods/Detail"
)
},
},
{
{
path
:
"/goods/retail"
,
path
:
"/
op/
goods/retail"
,
name
:
"GoodsRetail"
,
name
:
"GoodsRetail"
,
component
:
()
=>
import
(
/* webpackChunkName: "goods" */
"@/pages/Goods/Retail"
)
component
:
()
=>
import
(
/* webpackChunkName: "goods" */
"@/pages/Goods/Retail"
)
}
}
...
...
src/router/index.js
View file @
c25bba40
import
{
createRouter
,
createWebH
ashH
istory
}
from
"vue-router"
;
import
{
createRouter
,
createWebHistory
}
from
"vue-router"
;
import
LifeNo
from
"../pages/Life-no/index.vue"
;
import
LifeNo
from
"../pages/Life-no/index.vue"
;
import
LifeNoDetail
from
"../pages/Life-no/life-no-detail.vue"
;
import
LifeNoDetail
from
"../pages/Life-no/life-no-detail.vue"
;
...
@@ -13,24 +13,24 @@ import goodsRouter from "./Goods/index";
...
@@ -13,24 +13,24 @@ import goodsRouter from "./Goods/index";
const
routes
=
[
const
routes
=
[
{
{
path
:
"/"
,
path
:
"/
op/enterprise
"
,
redirect
:
"/enterprise/certification"
redirect
:
"/enterprise/certification"
},
},
{
{
path
:
"/404"
,
path
:
"/
op/
404"
,
name
:
"NotFound"
,
name
:
"NotFound"
,
component
:
()
=>
component
:
()
=>
import
(
/* webpackChunkName: "enterprise" */
"@/pages/Catch/notFound"
)
import
(
/* webpackChunkName: "enterprise" */
"@/pages/Catch/notFound"
)
},
},
{
{
path
:
"/403"
,
path
:
"/
op/
403"
,
name
:
"Forbidden"
,
name
:
"Forbidden"
,
component
:
()
=>
component
:
()
=>
import
(
/* webpackChunkName: "enterprise" */
"@/pages/Catch/forbidden"
)
import
(
/* webpackChunkName: "enterprise" */
"@/pages/Catch/forbidden"
)
},
},
// 企业认证管理
// 企业认证管理
{
{
path
:
"/enterprise/certification"
,
path
:
"/
op/
enterprise/certification"
,
name
:
"Certification"
,
name
:
"Certification"
,
component
:
()
=>
component
:
()
=>
import
(
import
(
...
@@ -41,7 +41,7 @@ const routes = [
...
@@ -41,7 +41,7 @@ const routes = [
}
}
},
},
{
{
path
:
"/enterprise/audit"
,
path
:
"/
op/
enterprise/audit"
,
name
:
"Audit"
,
name
:
"Audit"
,
component
:
()
=>
component
:
()
=>
import
(
/* webpackChunkName: "enterprise" */
"@/pages/Enterprise/Audit"
),
import
(
/* webpackChunkName: "enterprise" */
"@/pages/Enterprise/Audit"
),
...
@@ -50,7 +50,7 @@ const routes = [
...
@@ -50,7 +50,7 @@ const routes = [
}
}
},
},
{
{
path
:
"/enterprise/establish"
,
path
:
"/
op/
enterprise/establish"
,
name
:
"Establish"
,
name
:
"Establish"
,
component
:
()
=>
component
:
()
=>
import
(
import
(
...
@@ -62,7 +62,7 @@ const routes = [
...
@@ -62,7 +62,7 @@ const routes = [
},
},
//生活号管理
//生活号管理
{
{
path
:
"/lifeNo"
,
path
:
"/
op/
lifeNo"
,
name
:
"LifeNo"
,
name
:
"LifeNo"
,
component
:
LifeNo
,
component
:
LifeNo
,
meta
:
{
meta
:
{
...
@@ -70,24 +70,24 @@ const routes = [
...
@@ -70,24 +70,24 @@ const routes = [
}
}
},
},
{
{
path
:
"/lifeNoDetail"
,
path
:
"/
op/
lifeNoDetail"
,
name
:
"LifeNoDetail"
,
name
:
"LifeNoDetail"
,
component
:
LifeNoDetail
component
:
LifeNoDetail
},
},
//用户管理
//用户管理
{
{
path
:
"/user"
,
path
:
"/
op/
user"
,
name
:
"User"
,
name
:
"
/op/
User"
,
component
:
User
component
:
User
},
},
{
{
path
:
"/userDetail"
,
path
:
"/
op/
userDetail"
,
name
:
"UserDetail"
,
name
:
"UserDetail"
,
component
:
UserDetail
component
:
UserDetail
},
},
//角色管理
//角色管理
{
{
path
:
"/roleAddRole"
,
path
:
"/
op/
roleAddRole"
,
name
:
"AddRole"
,
name
:
"AddRole"
,
component
:
AddRole
,
component
:
AddRole
,
meta
:
{
meta
:
{
...
@@ -96,7 +96,7 @@ const routes = [
...
@@ -96,7 +96,7 @@ const routes = [
}
}
},
},
{
{
path
:
"/roleManageRole"
,
path
:
"/
op/
roleManageRole"
,
name
:
"ManageRole"
,
name
:
"ManageRole"
,
component
:
ManageRole
,
component
:
ManageRole
,
meta
:
{
meta
:
{
...
@@ -105,7 +105,7 @@ const routes = [
...
@@ -105,7 +105,7 @@ const routes = [
}
}
},
},
{
{
path
:
"/roleRoleDetail"
,
path
:
"/
op/
roleRoleDetail"
,
name
:
"RoleDetail"
,
name
:
"RoleDetail"
,
component
:
RoleDetail
,
component
:
RoleDetail
,
meta
:
{
meta
:
{
...
@@ -118,7 +118,7 @@ const routes = [
...
@@ -118,7 +118,7 @@ const routes = [
console
.
log
(
routes
);
console
.
log
(
routes
);
const
router
=
createRouter
({
const
router
=
createRouter
({
history
:
createWebH
ashH
istory
(),
history
:
createWebHistory
(),
routes
routes
});
});
...
...
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