242 lines
7.8 KiB
JavaScript
242 lines
7.8 KiB
JavaScript
import Vue from 'vue'
|
|
import Router from 'vue-router';
|
|
|
|
Vue.use(Router);
|
|
|
|
const routes = [
|
|
{
|
|
path: '/',
|
|
name: 'home',
|
|
component: () => import('../pages/home.vue')
|
|
},
|
|
{
|
|
path: '/search',
|
|
name: 'search',
|
|
meta: { title: '搜索' },
|
|
component: () => import('@/pages/search')
|
|
},
|
|
{
|
|
path: '/temple',
|
|
name: 'temple',
|
|
meta: { title: '寺院', navBarBackgroundColor: 'white', showNavBar: false },
|
|
component: { render: h => h('router-view') },
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'temple-home',
|
|
meta: { title: '寺院', navBarBackgroundColor: 'white', showNavBar: false },
|
|
component: () => import('@/pages/temple-home')
|
|
},
|
|
{
|
|
path: 'list',
|
|
name: 'temple-list',
|
|
meta: { title: '寺院列表', navBarBackgroundColor: 'white',showNavBar: false },
|
|
component: () => import('@/pages/temple-list')
|
|
},
|
|
{
|
|
path: 'detail',
|
|
name: 'temple-detail',
|
|
meta: { title: '寺院详情', navBarBackgroundColor: 'white',showNavBar: false },
|
|
component: () => import('@/pages/temple-detail')
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/buddha-activity',
|
|
name: 'buddha-activity',
|
|
meta: { title: '进展活动', navBarBackgroundColor: 'white' },
|
|
component: () => import('@/pages/buddha-activity')
|
|
},
|
|
{
|
|
path: '/buddha-detail',
|
|
name: 'buddha-detail',
|
|
meta: { title: '进展活动详情', navBarBackgroundColor: 'white' },
|
|
component: () => import('@/pages/buddha-detail')
|
|
},
|
|
{
|
|
path: '/merit-list',
|
|
name: 'merit-list',
|
|
meta: { title: '功德无量', navBarBackgroundColor: 'white' },
|
|
component: () => import('@/pages/merit-list')
|
|
},
|
|
{
|
|
path: '/merit-box',
|
|
name: 'merit-box',
|
|
meta: { title: '功德无量', navBarBackgroundColor: 'white', showNavBar: false},
|
|
component: () => import('@/pages/merit-box')
|
|
},
|
|
|
|
{
|
|
path: '/monk',
|
|
name: 'monk',
|
|
meta: { title: '详情', navBarBackgroundColor: 'white' },
|
|
component: () => import('@/pages/monk')
|
|
},
|
|
{
|
|
path: '/pay',
|
|
name: 'pay',
|
|
meta: { title: '支付', navBarBackgroundColor: 'white' },
|
|
component: () => import('@/pages/pay')
|
|
},
|
|
{
|
|
path: '/pay-result',
|
|
name: 'pay-result',
|
|
meta: { title: '支付成功', navBarBackgroundColor: 'white' },
|
|
component: () => import('@/pages/pay-result')
|
|
},
|
|
{
|
|
path: '/join-cert',
|
|
name: 'join-cert',
|
|
meta: { title: '参与成功', navBarBackgroundColor: 'white' },
|
|
component: () => import('@/pages/join-cert')
|
|
},
|
|
{
|
|
path: '/goods-detail',
|
|
name: 'goods-detail',
|
|
meta: { title: '详情', navBarBackgroundColor: 'white' },
|
|
component: () => import('@/pages/goods-detail')
|
|
},
|
|
{
|
|
path: '/fill-name',
|
|
name: 'fill-name',
|
|
meta: { title: '详情', navBarBackgroundColor: 'white' },
|
|
component: () => import('@/pages/fill-name')
|
|
},
|
|
{
|
|
path: '/everyday-donation',
|
|
name: 'everyday-donation',
|
|
meta: { title: '日行一善', navBarBackgroundColor: 'white', showNavBar: false },
|
|
component: () => import('@/pages/everyday-donation')
|
|
},
|
|
{
|
|
path: '/user',
|
|
name: 'user',
|
|
component: () => import('@/pages/user/root'),
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'user-home',
|
|
meta: { title: '个人中心', showNavBar: false },
|
|
component: () => import('@/pages/user/index')
|
|
},
|
|
{
|
|
path: 'customer',
|
|
name: 'user-customer',
|
|
meta: { title: '客服中心' },
|
|
component: () => import('@/pages/user/customer')
|
|
},
|
|
{
|
|
path: 'temple-station',
|
|
name: 'user-temple-station',
|
|
meta: { title: '寺院入驻', showNavBar: false },
|
|
component: () => import('@/pages/user/temple-station')
|
|
},
|
|
{
|
|
path: 'temple-station-review',
|
|
name: 'user-temple-station-review',
|
|
meta: { title: '寺院入驻', showNavBar: false },
|
|
component: () => import('@/pages/user/temple-station/review')
|
|
},
|
|
{
|
|
path: 'certificate',
|
|
name: 'user-certificate',
|
|
meta: { title: '客服中心' },
|
|
component: () => import('@/pages/user/certificate')
|
|
},
|
|
{
|
|
path: 'order',
|
|
name: 'user-order',
|
|
meta: { title: '我的善缘' },
|
|
component: () => import('@/pages/user/order')
|
|
},
|
|
{
|
|
path: 'focus',
|
|
name: 'user-focus',
|
|
meta: { title: '我的关注' },
|
|
component: () => import('@/pages/user/focus')
|
|
},
|
|
{
|
|
path: 'approve',
|
|
name: 'user-approve',
|
|
meta: { title: '认证法师' },
|
|
component: () => import('@/pages/user/approve')
|
|
},
|
|
{
|
|
path: 'course',
|
|
name: 'user-course',
|
|
meta: { title: '修行' },
|
|
component: { render: h => h('router-view')},
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'user-course-list',
|
|
meta: { title: '修行', showNavBar: false },
|
|
component: () => import('@/pages/user/course'),
|
|
},
|
|
{
|
|
path: 'detail',
|
|
name: 'user-course-detail',
|
|
meta: { title: '我的功课', showNavBar: false },
|
|
component: () => import('@/pages/user/course/detail'),
|
|
},
|
|
{
|
|
path: 'count',
|
|
name: 'user-course-count',
|
|
meta: { title: '我的功课 - 修行', showNavBar: false },
|
|
component: () => import('@/pages/user/course/count'),
|
|
},
|
|
]
|
|
},
|
|
]
|
|
}
|
|
]
|
|
const router = new Router({
|
|
mode: 'hash',
|
|
routes,
|
|
scrollBehavior(){
|
|
return {
|
|
x: 0,
|
|
y: 0
|
|
}
|
|
}
|
|
})
|
|
|
|
export default router;
|
|
|
|
export const tabbar = [
|
|
{
|
|
path: '/',
|
|
name: 'home',
|
|
active: require('../assets/img/tabbar/tabbar_icon_01_click.png'),
|
|
inactive: require('../assets/img/tabbar/tabbar_icon_01.png'),
|
|
title: '首页'
|
|
},
|
|
{
|
|
path: '/user/course',
|
|
name: 'user-course',
|
|
active: require('../assets/img/tabbar/tabbar_icon_02_click.png'),
|
|
inactive: require('../assets/img/tabbar/tabbar_icon_02.png'),
|
|
title: '修行'
|
|
},
|
|
{
|
|
path: '/merit-box',
|
|
name: 'merit-box',
|
|
active: require('../assets/img/tabbar/tabbar_icon_03_click.png'),
|
|
inactive: require('../assets/img/tabbar/tabbar_icon_03.png'),
|
|
title: '每日功德'
|
|
},
|
|
{
|
|
path: '/temple/list',
|
|
name: 'temple-list',
|
|
active: require('../assets/img/tabbar/tabbar_icon_04_click.png'),
|
|
inactive: require('../assets/img/tabbar/tabbar_icon_04.png'),
|
|
title: '参寺'
|
|
},
|
|
{
|
|
path: '/user',
|
|
name: 'user',
|
|
active: require('../assets/img/tabbar/tabbar_icon_05_click.png'),
|
|
inactive: require('../assets/img/tabbar/tabbar_icon_05.png'),
|
|
title: '我的'
|
|
},
|
|
] |