diff --git a/models/DataInit.go b/models/DataInit.go index 01e4b7b..0d2512c 100644 --- a/models/DataInit.go +++ b/models/DataInit.go @@ -23,6 +23,6 @@ func RegistDB() { //orm.RegisterDriver(_SQLITE3_DRIVER,orm.DRSqlite) //orm.RegisterDataBase("default",_SQLITE3_DRIVER,_DB_NAME,10) - orm.RegisterModel(new(Attachment),new(User),new(Blog),new(NLabel),new(Note),new(NoteColl),new(Category),new(Like),new(Comment)) + orm.RegisterModel(new(User),new(Blog),new(NLabel),new(Note),new(NoteColl),new(Category),new(Like),new(Comment)) orm.RegisterDataBase("default", "mysql", "root:booszy@tcp(127.0.0.1:3306)/beeblog?charset=utf8&loc=Local", 30) } \ No newline at end of file diff --git a/service/BlogService.go b/service/BlogService.go index d03a6e4..ac18441 100644 --- a/service/BlogService.go +++ b/service/BlogService.go @@ -156,7 +156,7 @@ func SaveBlog(blog *models.Blog, strs []string) error { func EditBlog(blog *models.Blog, strs []string) error { o := orm.NewOrm() o.Begin() - id, eror := o.Update(blog) + _, eror := o.Update(blog) if eror != nil { o.Rollback() return eror @@ -165,7 +165,7 @@ func EditBlog(blog *models.Blog, strs []string) error { if strs != nil && len(strs) > 0 { nlabels := make([]*models.NLabel, len(strs)) for i := 0; i < len(strs); i++ { - nlabels[i] = &models.NLabel{Title: strs[i], BlogId: id, UserId: blog.UserId} + nlabels[i] = &models.NLabel{Title: strs[i], BlogId: blog.Id, UserId: blog.UserId} } if _, err := o.InsertMulti(len(nlabels), nlabels); err != nil { o.Rollback() diff --git a/static/css/me.css b/static/css/me.css index 2cc2b68..24b9ca4 100644 --- a/static/css/me.css +++ b/static/css/me.css @@ -65,6 +65,12 @@ height: 110px; padding: 0 4%; } + +.me-blog-footer{ + height: 110px; + padding: 0 4%; + margin-left: 290px; +} .info-header{ flex: 1; } diff --git a/views/ublogs.html b/views/ublogs.html index a77af82..465a948 100644 --- a/views/ublogs.html +++ b/views/ublogs.html @@ -49,7 +49,7 @@ - diff --git a/views/ulike.html b/views/ulike.html index 5bb9045..5031a9e 100644 --- a/views/ulike.html +++ b/views/ulike.html @@ -48,7 +48,7 @@ -