diff --git a/controllers/PageController.go b/controllers/PageController.go index 9851316..ffbde7c 100644 --- a/controllers/PageController.go +++ b/controllers/PageController.go @@ -24,3 +24,13 @@ func (this *PageController) Blog() { func (this *PageController) IframeNote() { this.TplName = "iframe/note.html" } + +// @router /404 [get] +func (this *PageController) PageNotFound() { + this.TplName = "404.html" +} + +// @router /500 [get] +func (this *PageController) ServerError() { + this.TplName = "500.html" +} diff --git a/controllers/UserController.go b/controllers/UserController.go index 41e150f..1b70433 100644 --- a/controllers/UserController.go +++ b/controllers/UserController.go @@ -23,6 +23,10 @@ func (u *UserController) RegistPage() { u.TplName = "regist.html" } +func (u *UserController) PersonBlog() { + u.TplName = "ublogs.html" +} + func (this *UserController) Login() { username := this.GetString("username") userpwd := this.GetString("userpwd") diff --git a/data/beeblog.db b/data/beeblog.db index ad8228a..b7c8412 100644 Binary files a/data/beeblog.db and b/data/beeblog.db differ diff --git a/routers/UserRouter.go b/routers/UserRouter.go index 755a83c..a41acfd 100644 --- a/routers/UserRouter.go +++ b/routers/UserRouter.go @@ -11,4 +11,9 @@ func init() { beego.Router("/login", &controllers.UserController{}, "post:Login") beego.Router("/regist", &controllers.UserController{}, "post:Regist") beego.Router("/regist", &controllers.UserController{}, "get:RegistPage") + + + + beego.Router("/me/blog", &controllers.UserController{}, "get:PersonBlog") + } diff --git a/static/css/me.css b/static/css/me.css new file mode 100644 index 0000000..a740f99 --- /dev/null +++ b/static/css/me.css @@ -0,0 +1,17 @@ +.me-menu{ + position: fixed; + top: 60px; + left: 20px; + width: 260px; + height: 100%; + background-color: #f9f9f9; +} + +.me-blog-root{ + height: 100%; + margin: 50px 4% 0 4%; +} + +.me-blog-list{ + margin-left: 300px; +} diff --git a/views/404.html b/views/404.html new file mode 100644 index 0000000..bb5d2c8 --- /dev/null +++ b/views/404.html @@ -0,0 +1,10 @@ + + + + + Title + + +

404

+ + \ No newline at end of file diff --git a/views/blog.html b/views/blog.html index ca28d7c..cbda630 100644 --- a/views/blog.html +++ b/views/blog.html @@ -48,8 +48,9 @@
{{str2html .Blog.BlogHtml}}
+ {{template "footer"}} - + \ No newline at end of file diff --git a/views/ublogs.html b/views/ublogs.html new file mode 100644 index 0000000..df884bb --- /dev/null +++ b/views/ublogs.html @@ -0,0 +1,45 @@ +{{template "header"}} +博客 - 个人随笔 + + + +
+{{template "nav" .}} +
+
+ 头像 + {{.Blog.User.NickName}} +
+
+
+
+ 文章: + {{.Blog.User.BlogCount}} +
+
+ 访问: + {{.Blog.User.BlogBrowes}} +
+
+
+
+ 评论: + {{.Blog.User.BlogComment}} +
+
+ 喜欢: + {{.Blog.User.BlogLike}} +
+
+
+
+
+
+

vue webpack方式调用amap高德地图及其UI组件

+
+ {{template "footer"}} +
+
+ + + \ No newline at end of file