diff --git a/bookmark_front/src/App.vue b/bookmark_front/src/App.vue
index ed21dbd..1da117b 100644
--- a/bookmark_front/src/App.vue
+++ b/bookmark_front/src/App.vue
@@ -1,30 +1,23 @@
-
-
-
-
-
+
diff --git a/bookmark_front/src/global.less b/bookmark_front/src/global.less
index 82e807f..256d66a 100644
--- a/bookmark_front/src/global.less
+++ b/bookmark_front/src/global.less
@@ -1,3 +1,5 @@
+@bgColor: rgba(211, 211, 205, 0.3); //全局背景色
+
/**
* header 配置
*/
@@ -12,5 +14,4 @@
/**
* content配置
*/
-@bgColor: rgba(211, 211, 205, 0.3); //背景色
-@loginBgColor: rgb(255, 255, 255); //登录页背景色
+@contentBgColor: rgb(255, 255, 255); //登录页背景色
diff --git a/bookmark_front/src/router/index.js b/bookmark_front/src/router/index.js
index 2cf20e6..d1b6a0c 100644
--- a/bookmark_front/src/router/index.js
+++ b/bookmark_front/src/router/index.js
@@ -1,21 +1,43 @@
import Vue from "vue";
import VueRouter from "vue-router";
-import Home from "../views/Home.vue";
+import Main from "../views/main/Main.vue";
+import UserInfo from "../views/main/pages/personSpace/UserInfo.vue";
+import BookmarkTree from "../views/main/pages/things/BookmarkTree.vue";
-import Login from "../views/public/Login.vue";
+import Public from "../views/public/Public.vue";
+import Login from "../views/public/pages/Login.vue";
Vue.use(VueRouter);
const routes = [
{
path: "/",
- name: "Home",
- component: Home
+ name: "Main",
+ component: Main,
+ children: [
+ {
+ path: "",
+ name: "BookmarkTree",
+ component: BookmarkTree
+ },
+ {
+ path: "personSpakce/userInfo",
+ name: "UserInfo",
+ component: UserInfo
+ }
+ ]
},
{
- path: "/public/login",
- name: "Login",
- component: Login
+ path: "/public",
+ name: "Public",
+ component: Public,
+ children: [
+ {
+ path: "login",
+ name: "Login",
+ component: Login
+ }
+ ]
}
];
diff --git a/bookmark_front/src/store/index.js b/bookmark_front/src/store/index.js
index adde8c5..0132f59 100644
--- a/bookmark_front/src/store/index.js
+++ b/bookmark_front/src/store/index.js
@@ -1,6 +1,6 @@
import Vue from "vue";
import Vuex from "vuex";
-import count from "./modules/count";
+import globalConfig from "./modules/globalConfig";
Vue.use(Vuex);
@@ -9,6 +9,6 @@ export default new Vuex.Store({
mutations: {},
actions: {},
modules: {
- count
+ globalConfig
}
});
diff --git a/bookmark_front/src/store/modules/globalConfig.js b/bookmark_front/src/store/modules/globalConfig.js
new file mode 100644
index 0000000..cb05578
--- /dev/null
+++ b/bookmark_front/src/store/modules/globalConfig.js
@@ -0,0 +1,28 @@
+/**
+ * 存储全局配置
+ */
+const state = {
+ /**
+ * 是否处于登录、注册页
+ */
+ isLogReg: false
+};
+
+const getters = {};
+
+const actions = {};
+
+const mutations = {
+ setCount(oState, isLogReg) {
+ // eslint-disable-next-line no-param-reassign
+ oState.isLogReg = isLogReg;
+ }
+};
+
+export default {
+ namespaced: true,
+ state,
+ getters,
+ actions,
+ mutations
+};
diff --git a/bookmark_front/src/store/modules/globalHeader.js b/bookmark_front/src/store/modules/globalHeader.js
deleted file mode 100644
index ddf419c..0000000
--- a/bookmark_front/src/store/modules/globalHeader.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const state = {
- isLogin: 0
-};
-
-const getters = {};
-
-const actions = {
- asyncAdd({ commit }, data) {
- return new Promise(resolve => {
- setTimeout(() => {
- commit("setCount", data);
- resolve();
- }, 2000);
- });
- }
-};
-
-const mutations = {
- setCount(state1, data) {
- // eslint-disable-next-line no-param-reassign
- state1.count += data;
- }
-};
-
-export default {
- namespaced: true,
- state,
- getters,
- actions,
- mutations
-};
diff --git a/bookmark_front/src/views/Home.vue b/bookmark_front/src/views/Home.vue
deleted file mode 100644
index d6d1f7a..0000000
--- a/bookmark_front/src/views/Home.vue
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/bookmark_front/src/views/main/Main.vue b/bookmark_front/src/views/main/Main.vue
new file mode 100644
index 0000000..6bbc027
--- /dev/null
+++ b/bookmark_front/src/views/main/Main.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bookmark_front/src/views/main/pages/personSpace/UserInfo.vue b/bookmark_front/src/views/main/pages/personSpace/UserInfo.vue
new file mode 100644
index 0000000..078a841
--- /dev/null
+++ b/bookmark_front/src/views/main/pages/personSpace/UserInfo.vue
@@ -0,0 +1,11 @@
+
+ 个人空间
+
+
+
+
+
diff --git a/bookmark_front/src/views/main/pages/things/BookmarkTree.vue b/bookmark_front/src/views/main/pages/things/BookmarkTree.vue
new file mode 100644
index 0000000..ea1c1b8
--- /dev/null
+++ b/bookmark_front/src/views/main/pages/things/BookmarkTree.vue
@@ -0,0 +1,11 @@
+
+ 书签树
+
+
+
+
+
diff --git a/bookmark_front/src/views/public/Login.vue b/bookmark_front/src/views/public/Public.vue
similarity index 57%
rename from bookmark_front/src/views/public/Login.vue
rename to bookmark_front/src/views/public/Public.vue
index c10f48c..1c8d271 100644
--- a/bookmark_front/src/views/public/Login.vue
+++ b/bookmark_front/src/views/public/Public.vue
@@ -1,17 +1,15 @@
+
-
+
@@ -19,14 +17,21 @@ export default {
@import "../../global.less";
.main {
width: 100%;
- height: 100%;
+ height: 100vh;
display: flex;
justify-content: center;
align-items: center;
+
+ .ico {
+ position: fixed;
+ left: 5%;
+ top: 5%;
+ width: 2rem;
+ }
.main-body {
width: 5rem;
- height: 3.5rem;
- background-color: @loginBgColor;
+ min-height: 3.5rem;
+ background-color: @contentBgColor;
border-radius: 5px;
padding: 0.1rem;
}
diff --git a/bookmark_front/src/views/public/pages/Login.vue b/bookmark_front/src/views/public/pages/Login.vue
new file mode 100644
index 0000000..7d38ea5
--- /dev/null
+++ b/bookmark_front/src/views/public/pages/Login.vue
@@ -0,0 +1,11 @@
+
+ 登录页面
+
+
+
+
+