|
@@ -142,6 +142,12 @@ func (m *Front) PcAjaxReq() {
|
|
|
notkey = util.If(strings.Contains(m.GetString("notkey"), ","), strings.ReplaceAll(m.GetString("notkey"), ",", " "), m.GetString("notkey")).(string)
|
|
|
city = m.GetString("city")
|
|
|
}
|
|
|
+ if userId == "" {
|
|
|
+ //未登录用户访问全部信息类型 需要过滤掉 拟建和采购意向
|
|
|
+ if subtype == "" {
|
|
|
+ subtype = "招标预告,招标公告,招标结果,招标信用信息"
|
|
|
+ }
|
|
|
+ }
|
|
|
m.SetSession("selectType", selectType)
|
|
|
//只有前20条 有全字段,
|
|
|
if subtype != "拟建" && currentPage != 1 {
|
|
@@ -199,7 +205,7 @@ func (m *Front) PcAjaxReq() {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-func getLastNewsData(searchvalue, area, city, publishtime, subtype, industry, minprice, maxprice, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, tabularflag string, start int, isGetCount bool, highlight bool, notkey string, bidField string) (count int64, list *[]map[string]interface{}) {
|
|
|
+func getLastNewsData(searchvalue, area, city, publishtime, subtype, industry, minprice, maxprice, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, tabularflag string, start int, isGetCount bool, highlight bool, notkey string, bidField string, limit int) (count int64, list *[]map[string]interface{}) {
|
|
|
//最新招标信息
|
|
|
findfields := `"title"`
|
|
|
qstr := bidsearch.GetSearchQuery(searchvalue, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, fileExists, findfields, bidsearch.GetBidSearchQuery(area, city, publishtime, subtype, "", buyerclass), notkey, false, bidField)
|
|
@@ -208,7 +214,7 @@ func getLastNewsData(searchvalue, area, city, publishtime, subtype, industry, mi
|
|
|
}
|
|
|
if !(isGetCount && start == 0) || count > 0 {
|
|
|
if tabularflag == "Y" {
|
|
|
- repl := elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, bidSearch_field, start, 50, 115, highlight)
|
|
|
+ repl := elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, bidSearch_field, start, limit, 115, highlight)
|
|
|
if repl != nil && *repl != nil && len(*repl) > 0 {
|
|
|
public.BidListConvert(industry, repl)
|
|
|
list = repl
|
|
@@ -218,7 +224,7 @@ func getLastNewsData(searchvalue, area, city, publishtime, subtype, industry, mi
|
|
|
if bidField != "" {
|
|
|
field = bidSearch_domain_field_1
|
|
|
}
|
|
|
- repl := elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, field, start, 50, 115, highlight)
|
|
|
+ repl := elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, field, start, limit, 115, highlight)
|
|
|
if repl != nil && *repl != nil && len(*repl) > 0 {
|
|
|
public.BidListConvert(industry, repl)
|
|
|
list = repl
|