Added subscription page

This commit is contained in:
Peng-YM
2020-08-23 00:56:35 +08:00
parent 72bb2f4edb
commit 0a11261eee
17 changed files with 401 additions and 65 deletions

View File

@@ -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;