Commit 07ccd515 by amateur

1

1 parent 3fd520ff
......@@ -15,11 +15,11 @@ export const JsInterfaces = objVal2Array(JsMethodNames)
export const NativeMenuApi = {
nativeMenuShow: (param = {}) => {
const newParam = { ...param, type: '1' }
return $api.call(NativeMethodNames.AppBottomMenu, newParam, false)
NativeApi.nativeMenuStatus(newParam).then(res => { }).catch(e => { })
},
nativeMenuHide: (param = {}) => {
const newParam = { ...param, type: '2' }
return $api.call(NativeMethodNames.AppBottomMenu, newParam, false)
NativeApi.nativeMenuStatus(newParam).then(res => { }).catch(e => { })
}
}
......
......@@ -4,6 +4,7 @@ import Home from '@/views/home/index.vue'
import userRouter from './modules/user'
import memberRouter from './modules/member'
import qulificationRouter from './modules/qualification'
import { NativeMenuApi } from '@/api/NativeApis'
const APP_ENV = process.env.VUE_APP_NODE_ENV
......@@ -17,13 +18,14 @@ const routes = [
topType: 3
},
redirect: {
name: APP_ENV == 'production' ? 'Home' : 'Catalog'
name: 'Catalog'
}
},
{
path: '/home',
name: 'Home',
meta: {
menu: true,
title: '首页'
},
component: Home
......@@ -32,6 +34,7 @@ const routes = [
path: '/catalog',
name: 'Catalog',
meta: {
menu: true,
title: '目录'
},
component: () => import(/* webpackChunkName: "catalog" */ '@/views/catalog/') // 首页
......@@ -43,6 +46,8 @@ const router = new VueRouter({
})
router.beforeEach((to, from, next) => {
const { menu } = to.meta || {}
menu && NativeMenuApi.nativeMenuShow() || NativeMenuApi.nativeMenuHide()
next()
})
......
......@@ -2,6 +2,7 @@ const memberRouter = [{
path: '/member/login',
name: 'MemberLogin',
meta: {
menu: true,
title: '登录'
},
component: () => import( /* webpackChunkName: "memberLogin" */ '@/views/member/memberLogin.vue') // 会员登录
......
......@@ -66,6 +66,7 @@ const userRouter = [
path: '/user/center',
name: 'Center',
meta: {
menu: true,
title: '个人中心',
isLogin: false
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!