temp
This commit is contained in:
parent
c7b82047ae
commit
d707be00de
@ -1,8 +1,9 @@
|
||||
import Vue from "vue";
|
||||
import VueRouter from "vue-router";
|
||||
import Main from "../views/main/Main.vue";
|
||||
import HOME from "../views/main/pages/home/index";
|
||||
import UserInfo from "../views/main/pages/personSpace/UserInfo.vue";
|
||||
import BookmarkManage from "../views/main/pages/things/BookmarkManage.vue";
|
||||
import BookmarkManage from "../views/main/pages/manage/BookmarkManage.vue";
|
||||
|
||||
import Public from "../views/public/Public.vue";
|
||||
import Login from "../views/public/pages/Login.vue";
|
||||
@ -13,63 +14,68 @@ import GithubOauth from "../views/public/pages/oauth/Github.vue";
|
||||
Vue.use(VueRouter);
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: "/",
|
||||
component: Main,
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "BookmarkManage",
|
||||
component: BookmarkManage
|
||||
},
|
||||
{
|
||||
path: "personSpace/userInfo",
|
||||
name: "UserInfo",
|
||||
component: UserInfo
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/public",
|
||||
name: "Public",
|
||||
component: Public,
|
||||
children: [
|
||||
{
|
||||
path: "login",
|
||||
name: "Login",
|
||||
component: Login
|
||||
},
|
||||
{
|
||||
path: "register",
|
||||
name: "Register",
|
||||
component: Register
|
||||
},
|
||||
{
|
||||
path: "resetPassword",
|
||||
name: "ResetPassword",
|
||||
component: ResetPassword
|
||||
},
|
||||
{
|
||||
path: "oauth/github",
|
||||
name: "GithubRedirect",
|
||||
component: GithubOauth
|
||||
},
|
||||
{
|
||||
path: "notFound",
|
||||
name: "NOTFOUND",
|
||||
component: () => import("@/views/public/pages/NotFound")
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "*",
|
||||
redirect: "/public/notFound"
|
||||
}
|
||||
{
|
||||
path: "/",
|
||||
component: Main,
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "HOME",
|
||||
component: HOME
|
||||
},
|
||||
{
|
||||
path: "/manage",
|
||||
name: "BookmarkManage",
|
||||
component: BookmarkManage
|
||||
},
|
||||
{
|
||||
path: "personSpace/userInfo",
|
||||
name: "UserInfo",
|
||||
component: UserInfo
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/public",
|
||||
name: "Public",
|
||||
component: Public,
|
||||
children: [
|
||||
{
|
||||
path: "login",
|
||||
name: "Login",
|
||||
component: Login
|
||||
},
|
||||
{
|
||||
path: "register",
|
||||
name: "Register",
|
||||
component: Register
|
||||
},
|
||||
{
|
||||
path: "resetPassword",
|
||||
name: "ResetPassword",
|
||||
component: ResetPassword
|
||||
},
|
||||
{
|
||||
path: "oauth/github",
|
||||
name: "GithubRedirect",
|
||||
component: GithubOauth
|
||||
},
|
||||
{
|
||||
path: "notFound",
|
||||
name: "NOTFOUND",
|
||||
component: () => import("@/views/public/pages/NotFound")
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "*",
|
||||
redirect: "/public/notFound"
|
||||
}
|
||||
];
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: "history",
|
||||
routes
|
||||
mode: "history",
|
||||
routes
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
@ -35,6 +35,7 @@ export default {
|
||||
await this.$store.dispatch("treeData/init");
|
||||
console.log("treeData加载完毕");
|
||||
console.log("state数据:", this.$store.state);
|
||||
//数据初始化时会检查版本情况,因此循环检查,五分钟后开始
|
||||
this.timer = setInterval(this.checkVersion, 5 * 60 * 1000);
|
||||
},
|
||||
destroyed() {
|
||||
|
13
bookmark_front/src/views/main/pages/home/index.vue
Normal file
13
bookmark_front/src/views/main/pages/home/index.vue
Normal file
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div>这是主页面</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "HOME",
|
||||
data() {},
|
||||
methods: { },
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
Loading…
x
Reference in New Issue
Block a user