Browse Source

合并master 上的bug 处理

xingzai 3 years ago
parent
commit
10d13c6174
2 changed files with 35 additions and 1 deletions
  1. 34 0
      controllers/activity.go
  2. 1 1
      utils/config.go

+ 34 - 0
controllers/activity.go

@@ -91,6 +91,23 @@ func (this *ActivityCoAntroller) ActivityList() {
 	keyWord := this.GetString("KeyWord")
 	activeState := this.GetString("ActiveState")
 	label := this.GetString("Label")
+
+	//入参为 undefined 时的处理
+	if chartPermissionIds == "undefined" {
+		chartPermissionIds = ""
+	}
+	if activityTypeIds == "undefined" {
+		activityTypeIds = ""
+	}
+	if whichDay == "undefined" {
+		whichDay = ""
+	}
+	if activeState == "undefined" {
+		activeState = ""
+	}
+	if label == "undefined" {
+		label = ""
+	}
 	//更新用户的搜索信息
 	itemSearch := new(models.CygxActivityUserSearchContent)
 	itemSearch.UserId = uid
@@ -1643,6 +1660,23 @@ func (this *ActivityCoAntroller) LabelList() {
 	isShowJurisdiction, _ := this.GetInt("IsShowJurisdiction")
 	activeState := this.GetString("ActiveState")
 	label := this.GetString("Label")
+
+	//入参为 undefined 时的处理
+	if chartPermissionIds == "undefined" {
+		chartPermissionIds = ""
+	}
+	if activityTypeIds == "undefined" {
+		activityTypeIds = ""
+	}
+	if whichDay == "undefined" {
+		whichDay = ""
+	}
+	if activeState == "undefined" {
+		activeState = ""
+	}
+	if label == "undefined" {
+		label = ""
+	}
 	var userType int
 	var permissionStr string
 	if user.CompanyId <= 1 {

+ 1 - 1
utils/config.go

@@ -86,7 +86,7 @@ func init() {
 		WxPublicAppId = "wx4a844c734d8c8e56"
 		WxPublicAppSecret = "26c586e7ccb3c575433f0f37797b3eeb"
 		WxPublicId = "gh_b67e0049fb8c"
-		IndexName = "cygx_article_v0813"
+		IndexName = "cygx_article_v0906"
 
 		//接收附件邮箱
 		EmailTechnology = "mlluo@hzinsights.com;jxu@hzinsights.com;agne@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;jhwang@hzinsights.com" //科技行业专家邮箱