Browse Source

Merge branch 'cygx_12.0.1' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 1 year ago
parent
commit
7eba2f8926
1 changed files with 5 additions and 4 deletions
  1. 5 4
      controllers/yanxuan_special.go

+ 5 - 4
controllers/yanxuan_special.go

@@ -194,8 +194,8 @@ func (this *YanxuanSpecialController) Detail() {
 	}
 	resp.ExamineStatus = item.Status
 
+	//如果状态未审核通过,而且查看的不是本人,不是审核人员,就无法查看详情
 	var configCode string
-	//如果是研选的就推送给汪洋跟王芳,否则就推送给王芳
 	configCode = utils.TPL_MSG_WANG_FANG_WANG_YANG
 	cnf, err := models.GetConfigByCode(configCode)
 	if err != nil {
@@ -204,6 +204,7 @@ func (this *YanxuanSpecialController) Detail() {
 		return
 	}
 	if item.UserId != sysUser.UserId && item.Status != 3 && !strings.Contains(cnf.ConfigValue, sysUser.Mobile) {
+		resp.CygxYanxuanSpecialItem = *new(models.CygxYanxuanSpecialItem) // 如果内容不可见,就把内容置空
 		resp.HasPermission = 2
 	}
 
@@ -594,17 +595,17 @@ func (this *YanxuanSpecialController) Center() {
 	}
 
 	for _, v := range list {
+		//如果在web端有样式或者上传了文件,小程序就禁止编辑修改内容
 		hasStyle, err := utils.ArticleHasStyle(v.Content)
 		if err != nil {
 			return
 		}
-		v.ContentHasStyle = hasStyle
 		hasImg, err := utils.ArticleHasImgUrl(v.Content)
 		if err != nil {
 			return
 		}
-		if hasImg {
-			v.ContentHasStyle = hasImg
+		if hasStyle || len(v.Docs) > 0 || hasImg {
+			v.ContentHasStyle = true
 		}
 	}