diff --git a/front/.editorconfig b/front/.editorconfig
index 53894cc..cae20a1 100644
--- a/front/.editorconfig
+++ b/front/.editorconfig
@@ -1,5 +1,6 @@
-root = true
-[*]
-end_of_line = lf
-insert_final_newline = true
-tab_width = 2
\ No newline at end of file
+root = true
+[*]
+end_of_line = lf
+insert_final_newline = true
+tab_width = 2
+indent_size = 2
diff --git a/front/.gitignore b/front/.gitignore
index 66c8e91..0f14cec 100644
--- a/front/.gitignore
+++ b/front/.gitignore
@@ -22,4 +22,5 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
.vscode
-yarn.lock
\ No newline at end of file
+yarn.lock
+.idea
diff --git a/front/src/App.jsx b/front/src/App.jsx
index 9f5f561..92ac89a 100644
--- a/front/src/App.jsx
+++ b/front/src/App.jsx
@@ -1,11 +1,12 @@
-import React, { Component } from "react";
-import { Route, Switch, Redirect } from "react-router-dom";
-import { message } from "antd";
-import { withRouter } from "react-router-dom";
-import { Provider } from "react-redux";
+import React, {Component} from "react";
+import {Route, Switch, Redirect} from "react-router-dom";
+import {message} from "antd";
+import {withRouter} from "react-router-dom";
+import {Provider} from "react-redux";
import ClipboardJS from "clipboard";
import store from "./redux";
import NotFound from "./pages/public/notFound/NotFound";
+import UserSpace from './pages/userSpace';
import Login from "./pages/public/Login";
import RegisterOrReset from "./pages/public/RegisterOrReset";
@@ -22,11 +23,11 @@ class App extends Component {
componentDidMount() {
//初始化clipboard
let clipboard = new ClipboardJS(".copy-to-board", {
- text: function(trigger) {
+ text: function (trigger) {
return window.copyUrl;
}
});
- clipboard.on("success", function(e) {
+ clipboard.on("success", function (e) {
message.success("复制成功");
e.clearSelection();
});
@@ -40,16 +41,20 @@ class App extends Component {
-
-
+ {/*书签管理页面*/}
+
+
+
+ {/*个人中心页面*/}
+
{/* 公共页面 */}
-
-
-
-
+
+
+
+
{/* 当前面的路由都匹配不到时就会重定向到/404 */}
-
+
diff --git a/front/src/global.less b/front/src/global.less
index d817c53..315ddf0 100644
--- a/front/src/global.less
+++ b/front/src/global.less
@@ -1 +1,2 @@
-@mainBgColor: #ffffff;
+@mainBgColor: #f6f6f6;
+@mainContentColor: #ffffff;
diff --git a/front/src/layout/MainLayout/index.jsx b/front/src/layout/MainLayout/index.jsx
index c01c082..80cd5b8 100644
--- a/front/src/layout/MainLayout/index.jsx
+++ b/front/src/layout/MainLayout/index.jsx
@@ -55,6 +55,9 @@ class MainLayout extends React.Component {
onClick = e => {
const { history } = this.props;
switch (e.key) {
+ case "personSpace":
+ history.push("/userSpace");
+ break;
case "logout":
this.props.logout();
history.replace("/");
@@ -68,7 +71,9 @@ class MainLayout extends React.Component {
return (
-
+
+
+
{this.renderUserArea()}
diff --git a/front/src/layout/MainLayout/index.module.less b/front/src/layout/MainLayout/index.module.less
index aef2c4c..1e3a535 100644
--- a/front/src/layout/MainLayout/index.module.less
+++ b/front/src/layout/MainLayout/index.module.less
@@ -8,6 +8,7 @@
justify-content: space-between;
align-items: center;
padding: 0.1rem 0.5rem;
+ background-color: @mainContentColor;
}
.content {
@@ -18,7 +19,7 @@
@media screen {
width: 98%;
@media (min-width: 768px) {
- width: 80%;
+ width: 60%;
}
@media (max-width: 768px) {
diff --git a/front/src/pages/manage/OverView/index.jsx b/front/src/pages/manage/OverView/index.jsx
index 64a8b6e..aaf0258 100644
--- a/front/src/pages/manage/OverView/index.jsx
+++ b/front/src/pages/manage/OverView/index.jsx
@@ -104,6 +104,7 @@ class OverView extends React.Component {
收起
) : null}
+
使用帮助
{isEdit ? (
diff --git a/front/src/pages/manage/OverView/index.module.less b/front/src/pages/manage/OverView/index.module.less
index d12144b..d793bbe 100644
--- a/front/src/pages/manage/OverView/index.module.less
+++ b/front/src/pages/manage/OverView/index.module.less
@@ -1,5 +1,9 @@
+@import "../../../global.less";
+
.main {
- min-height: 100%;
+ // min-height: 100%;
+ background-color: @mainContentColor;
+ padding: 20px;
.header {
display: flex;
@@ -15,6 +19,11 @@
line-height: 1.3em;
font-weight: 600;
}
+
+ .help {
+ font-size: 0.6em;
+ align-self: flex-end;
+ }
}
}
diff --git a/front/src/pages/userSpace/index.jsx b/front/src/pages/userSpace/index.jsx
new file mode 100644
index 0000000..02b1be3
--- /dev/null
+++ b/front/src/pages/userSpace/index.jsx
@@ -0,0 +1,20 @@
+import React from "react";
+import styles from "./index.module.less";
+import MainLayout from "../../layout/MainLayout";
+
+class UserSpace extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {};
+ }
+
+ render() {
+ return (
+
+ 你好
+
+ );
+ }
+}
+
+export default UserSpace;
diff --git a/front/src/pages/userSpace/index.module.less b/front/src/pages/userSpace/index.module.less
new file mode 100644
index 0000000..2183220
--- /dev/null
+++ b/front/src/pages/userSpace/index.module.less
@@ -0,0 +1,3 @@
+.main{
+
+}