|
@@ -508,8 +508,7 @@ func (m *Front) PcAjaxReq() {
|
|
|
secondKWS = jy.HttpEs(s_word, "ik_smart", public.DbConf.Elasticsearch.Main.Address)
|
|
|
findfields := `"title"`
|
|
|
qstr := getSearchQuery(secondKWS, industry, minprice, maxprice, findfields, getBidSearchQuery(area, publishtime, subtype))
|
|
|
- secondLimit := 2*pc_pageSize - int(count)
|
|
|
- secRel := elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, bidSearch_field, 0, secondLimit, 0, false)
|
|
|
+ secRel := elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, bidSearch_field, 0, 2*pc_pageSize, 0, false)
|
|
|
if secRel != nil {
|
|
|
public.BidListConvert(industry, secRel)
|
|
|
}
|
|
@@ -565,6 +564,9 @@ func (m *Front) PcAjaxReq() {
|
|
|
if secondFlag != "" {
|
|
|
if len(*list) > pc_pageSize {
|
|
|
secondList = (*list)[pc_pageSize:]
|
|
|
+ if len(secondList) > pc_pageSize {
|
|
|
+ secondList = secondList[:pc_pageSize]
|
|
|
+ }
|
|
|
*list = (*list)[:pc_pageSize]
|
|
|
totalPage = 2
|
|
|
} else {
|
|
@@ -875,8 +877,7 @@ func (m *Front) WxsearchlistPaging() {
|
|
|
secondKWS = jy.HttpEs(s_word, "ik_smart", public.DbConf.Elasticsearch.Main.Address)
|
|
|
findfields := `"title"`
|
|
|
qstr := getSearchQuery(secondKWS, industry, minprice, maxprice, findfields, getBidSearchQuery(scope, publishtime, subtype))
|
|
|
- secondLimit := 2*pc_pageSize - listSize
|
|
|
- secRel = elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, filed, 0, secondLimit, 0, false)
|
|
|
+ secRel = elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, filed, 0, 2*pc_pageSize, 0, false)
|
|
|
if secRel != nil && len(*secRel) > 0 {
|
|
|
public.BidListConvert(industry, secRel)
|
|
|
for _, v := range *secRel {
|
|
@@ -890,6 +891,9 @@ func (m *Front) WxsearchlistPaging() {
|
|
|
secondFlag = "T"
|
|
|
if len(*list) > pc_pageSize && selectType == "title" {
|
|
|
secondList = (*list)[pc_pageSize:]
|
|
|
+ if len(secondList) > pc_pageSize {
|
|
|
+ secondList = secondList[:pc_pageSize]
|
|
|
+ }
|
|
|
*list = (*list)[:pc_pageSize]
|
|
|
}
|
|
|
} else {
|