|
@ -47,10 +47,11 @@ func (this *BlogController) Save() { |
|
|
title := this.GetString("title") |
|
|
title := this.GetString("title") |
|
|
blogHtml := this.GetString("blogHtml") |
|
|
blogHtml := this.GetString("blogHtml") |
|
|
blogDesc := this.GetString("blogDesc") |
|
|
blogDesc := this.GetString("blogDesc") |
|
|
|
|
|
blogValue := this.GetString("blogValue") |
|
|
catory := this.GetString("catory") |
|
|
catory := this.GetString("catory") |
|
|
catoryId, _ := strconv.ParseInt(catory, 10, 64) |
|
|
catoryId, _ := strconv.ParseInt(catory, 10, 64) |
|
|
labels := this.GetStrings("labels[]") |
|
|
labels := this.GetStrings("labels[]") |
|
|
blog := &models.Blog{Title: title, BlogHtml: blogHtml, CategoryId: catoryId, UserId: uid.(int64), BlogDesc: blogDesc} |
|
|
blog := &models.Blog{Title: title, BlogHtml: blogHtml, BlogValue: blogValue,CategoryId: catoryId, UserId: uid.(int64), BlogDesc: blogDesc} |
|
|
err := blogService.SaveBlog(blog, labels) |
|
|
err := blogService.SaveBlog(blog, labels) |
|
|
if err == nil { |
|
|
if err == nil { |
|
|
this.Data["json"] = models.ReurnData("", blog.Id) |
|
|
this.Data["json"] = models.ReurnData("", blog.Id) |
|
|