Browse Source

活动标签产业与标的的展示

xingzai 2 years ago
parent
commit
d6c338265e
2 changed files with 8 additions and 4 deletions
  1. 1 1
      controllers/activity.go
  2. 7 3
      services/activity.go

+ 1 - 1
controllers/activity.go

@@ -4309,7 +4309,7 @@ func (this *ActivityCoAntroller) LabelTypeListV6Pc() {
 		if activeState != "" {
 			condition += ` AND art.active_state  IN (` + activeState + `)`
 		} else {
-			condition += ` AND art.active_state  IN (1)`
+			condition += ` AND art.active_state  IN (1,2)`
 		}
 		if (userType == 2 || userType == 3 || userType == 4) && strings.Contains(permissionStr, "专家") {
 			conditionOr += ` OR (  art.is_limit_people = 1 AND art.customer_type_ids LIKE '%4%'	 ` + condition + `) `

+ 7 - 3
services/activity.go

@@ -592,10 +592,14 @@ func LabelStr(label string) (labelNew string) {
 //5.3版本活动标签字符串处理
 func LabelStrV5(label string, isShowSubjectName int) (labelNew string) {
 	slicebr := strings.Split(label, "-")
-	if len(slicebr) < 2 || isShowSubjectName == 0 {
-		labelNew = label
+	if len(slicebr) > 1 {
+		if isShowSubjectName == 1 {
+			labelNew = slicebr[1]
+		} else {
+			labelNew = slicebr[0]
+		}
 	} else {
-		labelNew = slicebr[1]
+		labelNew = label
 	}
 	return labelNew
 }