ziwen před 1 rokem
rodič
revize
b610f6059a

+ 5 - 5
controllers/cygx/yanxuan_special.go

@@ -62,7 +62,7 @@ func (this *YanxuanSpecialController) Add() {
 		ModifyTime: time.Now(),
 		HeadImg:    utils.CYGX_YANXUAN_SPECIAL_HEAD_IMG_URL + strconv.Itoa(rnd) + ".png",
 		BgImg:      utils.CYGX_YANXUAN_SPECIAL_BG_IMG_URL + strconv.Itoa(rnd) + "a.png",
-		BgImgDown:      utils.CYGX_YANXUAN_SPECIAL_BG_IMG_URL + strconv.Itoa(rnd) + "b.png",
+		BgImgDown:  utils.CYGX_YANXUAN_SPECIAL_BG_IMG_URL + strconv.Itoa(rnd) + "b.png",
 		BgImgPc:    utils.CYGX_YANXUAN_SPECIAL_BG_IMG_URL_PC + strconv.Itoa(rnd) + ".png",
 		Status:     1,
 	}
@@ -202,7 +202,7 @@ func (this *YanxuanSpecialController) List() {
 		if err != nil {
 			return
 		}
-		if hasImg{
+		if hasImg {
 			v.ContentHasImg = 1
 		}
 		if v.DocUrl != "" {
@@ -216,9 +216,9 @@ func (this *YanxuanSpecialController) List() {
 			v.Docs = docs
 		}
 		if v.Type == 1 {
-			v.Title = "【笔记】"+v.Title
+			v.Title = "【笔记】" + v.Title
 		} else if v.Type == 2 {
-			v.Title = "【观点】"+v.Title
+			v.Title = "【观点】" + v.Title
 		}
 	}
 
@@ -277,4 +277,4 @@ func (this *YanxuanSpecialController) Enable() {
 	br.Msg = "审批成功"
 	br.Ret = 200
 	br.Success = true
-}
+}

+ 1 - 1
models/cygx/cygx_yanxuan_special.go

@@ -64,7 +64,7 @@ JOIN cygx_yanxuan_special_author AS b ON a.user_id = b.user_id
 	if condition != "" {
 		sql += condition
 	}
-	sql += `ORDER BY a.create_time `
+	sql += `ORDER BY a.publish_time `
 	_, err = o.Raw(sql, pars).QueryRows(&items)
 	return
 }