Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
polysoft-nafmii
/
polysoft-h5
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 07ccd515
authored
May 18, 2021
by
amateur
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
3fd520ff
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
3 deletions
src/api/NativeApis.js
src/router/index.js
src/router/modules/member.js
src/router/modules/user.js
src/api/NativeApis.js
View file @
07ccd51
...
@@ -15,11 +15,11 @@ export const JsInterfaces = objVal2Array(JsMethodNames)
...
@@ -15,11 +15,11 @@ export const JsInterfaces = objVal2Array(JsMethodNames)
export
const
NativeMenuApi
=
{
export
const
NativeMenuApi
=
{
nativeMenuShow
:
(
param
=
{})
=>
{
nativeMenuShow
:
(
param
=
{})
=>
{
const
newParam
=
{
...
param
,
type
:
'1'
}
const
newParam
=
{
...
param
,
type
:
'1'
}
return
$api
.
call
(
NativeMethodNames
.
AppBottomMenu
,
newParam
,
false
)
NativeApi
.
nativeMenuStatus
(
newParam
).
then
(
res
=>
{
}).
catch
(
e
=>
{
}
)
},
},
nativeMenuHide
:
(
param
=
{})
=>
{
nativeMenuHide
:
(
param
=
{})
=>
{
const
newParam
=
{
...
param
,
type
:
'2'
}
const
newParam
=
{
...
param
,
type
:
'2'
}
return
$api
.
call
(
NativeMethodNames
.
AppBottomMenu
,
newParam
,
false
)
NativeApi
.
nativeMenuStatus
(
newParam
).
then
(
res
=>
{
}).
catch
(
e
=>
{
}
)
}
}
}
}
...
...
src/router/index.js
View file @
07ccd51
...
@@ -4,6 +4,7 @@ import Home from '@/views/home/index.vue'
...
@@ -4,6 +4,7 @@ import Home from '@/views/home/index.vue'
import
userRouter
from
'./modules/user'
import
userRouter
from
'./modules/user'
import
memberRouter
from
'./modules/member'
import
memberRouter
from
'./modules/member'
import
qulificationRouter
from
'./modules/qualification'
import
qulificationRouter
from
'./modules/qualification'
import
{
NativeMenuApi
}
from
'@/api/NativeApis'
const
APP_ENV
=
process
.
env
.
VUE_APP_NODE_ENV
const
APP_ENV
=
process
.
env
.
VUE_APP_NODE_ENV
...
@@ -17,13 +18,14 @@ const routes = [
...
@@ -17,13 +18,14 @@ const routes = [
topType
:
3
topType
:
3
},
},
redirect
:
{
redirect
:
{
name
:
APP_ENV
==
'production'
?
'Home'
:
'Catalog'
name
:
'Catalog'
}
}
},
},
{
{
path
:
'/home'
,
path
:
'/home'
,
name
:
'Home'
,
name
:
'Home'
,
meta
:
{
meta
:
{
menu
:
true
,
title
:
'首页'
title
:
'首页'
},
},
component
:
Home
component
:
Home
...
@@ -32,6 +34,7 @@ const routes = [
...
@@ -32,6 +34,7 @@ const routes = [
path
:
'/catalog'
,
path
:
'/catalog'
,
name
:
'Catalog'
,
name
:
'Catalog'
,
meta
:
{
meta
:
{
menu
:
true
,
title
:
'目录'
title
:
'目录'
},
},
component
:
()
=>
import
(
/* webpackChunkName: "catalog" */
'@/views/catalog/'
)
// 首页
component
:
()
=>
import
(
/* webpackChunkName: "catalog" */
'@/views/catalog/'
)
// 首页
...
@@ -43,6 +46,8 @@ const router = new VueRouter({
...
@@ -43,6 +46,8 @@ const router = new VueRouter({
})
})
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
const
{
menu
}
=
to
.
meta
||
{}
menu
&&
NativeMenuApi
.
nativeMenuShow
()
||
NativeMenuApi
.
nativeMenuHide
()
next
()
next
()
})
})
...
...
src/router/modules/member.js
View file @
07ccd51
...
@@ -2,6 +2,7 @@ const memberRouter = [{
...
@@ -2,6 +2,7 @@ const memberRouter = [{
path
:
'/member/login'
,
path
:
'/member/login'
,
name
:
'MemberLogin'
,
name
:
'MemberLogin'
,
meta
:
{
meta
:
{
menu
:
true
,
title
:
'登录'
title
:
'登录'
},
},
component
:
()
=>
import
(
/* webpackChunkName: "memberLogin" */
'@/views/member/memberLogin.vue'
)
// 会员登录
component
:
()
=>
import
(
/* webpackChunkName: "memberLogin" */
'@/views/member/memberLogin.vue'
)
// 会员登录
...
...
src/router/modules/user.js
View file @
07ccd51
...
@@ -66,6 +66,7 @@ const userRouter = [
...
@@ -66,6 +66,7 @@ const userRouter = [
path
:
'/user/center'
,
path
:
'/user/center'
,
name
:
'Center'
,
name
:
'Center'
,
meta
:
{
meta
:
{
menu
:
true
,
title
:
'个人中心'
,
title
:
'个人中心'
,
isLogin
:
false
isLogin
:
false
},
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment