修复登录用户能搜索的私有项目的BUG

This commit is contained in:
Minho
2017-05-05 15:04:31 +08:00
parent da2dbf7146
commit 906191624c
7 changed files with 50 additions and 30 deletions

View File

@@ -222,6 +222,7 @@ func (c *ManagerController) EditBook() {
description := strings.TrimSpace(c.GetString("description",""))
comment_status := c.GetString("comment_status")
tag := strings.TrimSpace(c.GetString("label"))
order_index ,_ := c.GetInt("order_index",0)
if strings.Count(description,"") > 500 {
c.JsonResult(6004,"项目描述不能大于500字")
@@ -241,6 +242,7 @@ func (c *ManagerController) EditBook() {
book.Description = description
book.CommentStatus = comment_status
book.Label = tag
book.OrderIndex = order_index
if err := book.Update();err != nil {
c.JsonResult(6006,"保存失败")