Jelajahi Sumber

Merge branch 'cygx_9.3.1_0' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 2 tahun lalu
induk
melakukan
b1343cf819
1 mengubah file dengan 2 tambahan dan 3 penghapusan
  1. 2 3
      controllers/activity.go

+ 2 - 3
controllers/activity.go

@@ -309,7 +309,7 @@ func (this *ActivityCoAntroller) Detail() {
 		return
 	}
 	resp := new(models.CygxActivityResp)
-	var hasPermission int
+
 	activityInfo, err := models.GetAddActivityInfoByIdShow(uid, activityId)
 	if err != nil && err.Error() != utils.ErrNoRow() {
 		br.Msg = "获取信息失败"
@@ -334,6 +334,7 @@ func (this *ActivityCoAntroller) Detail() {
 		if services.GetShowSustainable() && strings.Contains(activityInfo.ChartPermissionName, "研选") {
 			activityInfo.IsShowSustainable = true
 		}
+		resp.HasPermission = 1
 		configCode := "description_of_research"
 		detail, err := models.GetConfigByCode(configCode)
 		if err != nil {
@@ -516,8 +517,6 @@ func (this *ActivityCoAntroller) Detail() {
 	if collectCount1+collectCount2 > 0 {
 		resp.Detail.IsCollect = true
 	}
-
-	resp.HasPermission = hasPermission
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "获取成功"