ziwen 1 year ago
parent
commit
90163a150d
1 changed files with 4 additions and 12 deletions
  1. 4 12
      controllers/yanxuan_special.go

+ 4 - 12
controllers/yanxuan_special.go

@@ -5,7 +5,6 @@ import (
 	"hongze/hongze_cygx/models"
 	"hongze/hongze_cygx/services"
 	"hongze/hongze_cygx/utils"
-	"strings"
 	"time"
 )
 
@@ -166,20 +165,13 @@ func (this *YanxuanSpecialController) Detail() {
 		resp.Docs = docs
 	}
 	if item.CompanyTags != "" {
-		cTagList := strings.Split(item.CompanyTags, ",")
-		for _, s := range cTagList {
-			resp.CompanyTags = append(resp.CompanyTags, s)
-		}
-	} else {
-		resp.CompanyTags = []string{}
+		item.Tags += item.CompanyTags
 	}
 	if item.IndustryTags != "" {
-		iTagList := strings.Split(item.IndustryTags, ",")
-		for _, s := range iTagList {
-			resp.IndustryTags = append(resp.IndustryTags, s)
+		if item.Tags != "" {
+			item.Tags += ","
 		}
-	} else {
-		resp.IndustryTags = []string{}
+		item.Tags += item.IndustryTags
 	}
 
 	go services.AddSpecialRecord(this.User, specialId)