62 lines
1.4 KiB
JavaScript
62 lines
1.4 KiB
JavaScript
import Vue from 'vue'
|
|
import VueRouter from 'vue-router'
|
|
|
|
Vue.use(VueRouter)
|
|
|
|
const routes = [
|
|
{
|
|
path: '/',
|
|
name: 'Home',
|
|
component: () => import(/* webpackChunkName: "home" */ '../views/Home/Home.vue')
|
|
},
|
|
{
|
|
path: '/add',
|
|
name: 'Add',
|
|
component: () => import(/* webpackChunkName: "add" */ '../views/Add/Add.vue')
|
|
},
|
|
{
|
|
path: '/account',
|
|
name: 'Account',
|
|
component: () => import(/* webpackChunkName: "account" */ '../views/Account/Account.vue')
|
|
},
|
|
// {
|
|
// path: '/faq',
|
|
// name: 'FAQ',
|
|
// component: () => import(/* webpackChunkName: "faq" */ '../views/FAQ/FAQ.vue')
|
|
// },
|
|
// {
|
|
// path: '/feedback',
|
|
// name: 'Feedback',
|
|
// component: () => import(/* webpackChunkName: "feedback" */ '../views/Feedback/Feedback.vue')
|
|
// },
|
|
// {
|
|
// path: '/settings',
|
|
// name: 'Settings',
|
|
// component: () => import(/* webpackChunkName: "settings" */ '../views/Settings/Settings.vue')
|
|
// },
|
|
{
|
|
path: '/unlock',
|
|
name: 'Unlock',
|
|
component: () => import(/* webpackChunkName: "unlock" */ '../views/Unlock/Unlock.vue')
|
|
},
|
|
{
|
|
path: '/detail',
|
|
name: 'Detail',
|
|
component: () => import(/* webpackChunkName: "detail" */ '../views/Detail/Detail.vue')
|
|
},
|
|
{
|
|
path: '*', // 页面不存在的情况下会跳到home
|
|
redirect: '/',
|
|
name: 'notFound',
|
|
hidden: true
|
|
}
|
|
]
|
|
|
|
const router = new VueRouter({
|
|
mode: 'history',
|
|
base: process.env.BASE_URL,
|
|
routes,
|
|
})
|
|
|
|
export default router
|