diff --git a/bookmark_front/src/router/index.js b/bookmark_front/src/router/index.js
index ea52f0e..e65fa55 100644
--- a/bookmark_front/src/router/index.js
+++ b/bookmark_front/src/router/index.js
@@ -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;
diff --git a/bookmark_front/src/views/main/Main.vue b/bookmark_front/src/views/main/Main.vue
index 66a5119..0f3d9a8 100644
--- a/bookmark_front/src/views/main/Main.vue
+++ b/bookmark_front/src/views/main/Main.vue
@@ -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() {
diff --git a/bookmark_front/src/views/main/pages/home/index.vue b/bookmark_front/src/views/main/pages/home/index.vue
new file mode 100644
index 0000000..76b86ac
--- /dev/null
+++ b/bookmark_front/src/views/main/pages/home/index.vue
@@ -0,0 +1,13 @@
+
+ 这是主页面
+
+
+
+
+
diff --git a/bookmark_front/src/views/main/pages/things/BookmarkManage.vue b/bookmark_front/src/views/main/pages/manage/BookmarkManage.vue
similarity index 100%
rename from bookmark_front/src/views/main/pages/things/BookmarkManage.vue
rename to bookmark_front/src/views/main/pages/manage/BookmarkManage.vue