|
@@ -428,7 +428,7 @@ func (f *PcIndex) SearchResult(at, name string) error {
|
|
|
*datas = (*datas)[0:limitcount]
|
|
|
}
|
|
|
}
|
|
|
- if len(*datas) > 0 && datas != nil {
|
|
|
+ if datas != nil && len(*datas) > 0 {
|
|
|
for _, v := range *datas {
|
|
|
v["_id"] = util.EncodeArticleId2ByCheck(util.ObjToString(v["_id"]))
|
|
|
}
|
|
@@ -439,8 +439,10 @@ func (f *PcIndex) SearchResult(at, name string) error {
|
|
|
b, _ := json.Marshal(list)
|
|
|
json.Unmarshal(b, &datas)
|
|
|
}
|
|
|
- public.BidListConvert(industry, datas)
|
|
|
- res = searchresulthtml(datas)
|
|
|
+ if datas != nil && len(*datas) > 0 {
|
|
|
+ public.BidListConvert(industry, datas)
|
|
|
+ res = searchresulthtml(datas)
|
|
|
+ }
|
|
|
f.T["res"] = res
|
|
|
f.T["area"] = area
|
|
|
f.T["stype"] = stype
|