فهرست منبع

Merge branch 'cygx_12.0' into debug

ziwen 1 سال پیش
والد
کامیت
de8a8344b6
2فایلهای تغییر یافته به همراه11 افزوده شده و 0 حذف شده
  1. 10 0
      controllers/yanxuan_special.go
  2. 1 0
      models/cygx_yanxuan_special.go

+ 10 - 0
controllers/yanxuan_special.go

@@ -64,6 +64,16 @@ func (this *YanxuanSpecialController) List() {
 		if hasImg {
 			v.ContentHasImg = 1
 		}
+		if v.DocUrl != "" {
+			var docs []models.Doc
+			err := json.Unmarshal([]byte(v.DocUrl), &docs)
+			if err != nil {
+				br.Msg = "参数解析异常!"
+				br.ErrMsg = "参数解析失败,Err:" + err.Error()
+				return
+			}
+			v.Docs = docs
+		}
 	}
 	resp := new(models.SpecialListResp)
 

+ 1 - 0
models/cygx_yanxuan_special.go

@@ -47,6 +47,7 @@ type CygxYanxuanSpecialItem struct {
 	MyCollectNum  int
 	IsCollect     int
 	ContentHasImg int //正文是否包含图片 1包含 0不包含
+	Docs []Doc
 }
 
 type CygxYanxuanSpecialResp struct {