mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-04-13 12:26:58 +08:00
Added subscription page
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Vue from 'vue';
|
||||
import Router from 'vue-router';
|
||||
import store from "../store";
|
||||
|
||||
import Subscription from "@/views/Subscription";
|
||||
import Dashboard from "@/views/Dashboard";
|
||||
@@ -14,19 +15,29 @@ const router = new Router({
|
||||
{
|
||||
path: "/",
|
||||
name: "subscriptions",
|
||||
component: Subscription
|
||||
component: Subscription,
|
||||
meta: {title: "订阅"}
|
||||
},
|
||||
{
|
||||
path: "/dashboard",
|
||||
name: "dashboard",
|
||||
component: Dashboard
|
||||
component: Dashboard,
|
||||
meta: {title: "首页"}
|
||||
},
|
||||
{
|
||||
path: "/user",
|
||||
name: "user",
|
||||
component: User
|
||||
component: User,
|
||||
meta: {title: "我的"}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
const {meta} = to;
|
||||
document.title = to.meta.title
|
||||
store.commit("SET_NAV_TITLE", meta.title);
|
||||
next();
|
||||
})
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user