Browse Source

fix:搜索限制修改

duxin 2 năm trước cách đây
mục cha
commit
38bcafd56f
1 tập tin đã thay đổi với 9 bổ sung8 xóa
  1. 9 8
      services/action.go

+ 9 - 8
services/action.go

@@ -28,15 +28,16 @@ func (this *LeadGeneration) GetDate() {
 		t, _ := this.GetInt("dType")
 		rData := map[string]interface{}{}
 
-		//获取超前项目
-		if aheadData := mananger.JyAheadManager.GetData(userId, keyWords, isNewUser, t); aheadData != nil && len(aheadData) > 0 {
-			rData["ahead"] = aheadData
+		if t != 1 || keyWords != "" {
+			//获取超前项目
+			if aheadData := mananger.JyAheadManager.GetData(userId, keyWords, isNewUser, t); aheadData != nil && len(aheadData) > 0 {
+				rData["ahead"] = aheadData
+			}
+			//获取定制化报告数据
+			if customData := mananger.JyCustomManager.GetData(userId, keyWords, isNewUser); customData != nil && len(customData) > 0 {
+				rData["custom"] = customData
+			}
 		}
-		//获取定制化报告数据
-		if customData := mananger.JyCustomManager.GetData(userId, keyWords, isNewUser); customData != nil && len(customData) > 0 {
-			rData["custom"] = customData
-		}
-
 		return rData, nil
 	}()
 	if errMsg != nil {