|
@@ -93,6 +93,8 @@ onceAgain:
|
|
|
PageNum: 1, //当前页码
|
|
|
IsSearch: true, //是否进行bidding数据查询
|
|
|
}
|
|
|
+ isInfoList bool // 是否是在列表页面
|
|
|
+
|
|
|
)
|
|
|
areaList, areaToCode, cityToCode, areaToCity = jyutil.GetAllArea()
|
|
|
infoTypeList, topMap = jyutil.GetInfoType()
|
|
@@ -141,6 +143,7 @@ onceAgain:
|
|
|
biddingInfo.PageFormat(codes[1])
|
|
|
prevPage = fmt.Sprintf("%s_%d", codes[0], biddingInfo.PageNum-1)
|
|
|
nextPage = fmt.Sprintf("%s_%d", codes[0], biddingInfo.PageNum+1)
|
|
|
+ isInfoList = true
|
|
|
}
|
|
|
}
|
|
|
case jyutil.Label["industry"]: //行业
|
|
@@ -160,6 +163,7 @@ onceAgain:
|
|
|
prevPage = fmt.Sprintf("%s_%s_%d", codes[0], codes[1], biddingInfo.PageNum-1)
|
|
|
nextPage = fmt.Sprintf("%s_%s_%d", codes[0], codes[1], biddingInfo.PageNum+1)
|
|
|
}
|
|
|
+ isInfoList = true
|
|
|
} else if name == "home" {
|
|
|
biddingInfo.IsEffective = true
|
|
|
biddingInfo.IsSearch = false
|
|
@@ -179,6 +183,7 @@ onceAgain:
|
|
|
})
|
|
|
biddingInfo.IsSearch = false
|
|
|
hasIndustryNav = true
|
|
|
+ isInfoList = true
|
|
|
case jyutil.Label["winner"]: //中标单位
|
|
|
biddingInfo.IsEffective = true
|
|
|
biddingInfo.PageFormat(name)
|
|
@@ -191,6 +196,7 @@ onceAgain:
|
|
|
biddingInfo.IsSearch = false
|
|
|
hasIndustryNav = true
|
|
|
title = fmt.Sprintf("%s%s", "中标企业", suffix)
|
|
|
+ isInfoList = true
|
|
|
case jyutil.Label["home"]: //首页
|
|
|
if name == types {
|
|
|
biddingInfo.IsEffective = true
|
|
@@ -208,14 +214,7 @@ onceAgain:
|
|
|
goto onceAgain
|
|
|
}
|
|
|
//信息类型
|
|
|
- if biddingInfo.PageNum == 1 {
|
|
|
- prevPage = ""
|
|
|
- }
|
|
|
- if biddingInfo.PageNum == (biddingInfo.Total-1)/biddingInfo.PageSize+1 {
|
|
|
- nextPage = ""
|
|
|
- }
|
|
|
- tg.T["prevPage"] = qu.If(prevPage != "", fmt.Sprintf("/jyapp/tags/%s/%s.html", types, prevPage), "").(string)
|
|
|
- tg.T["nextPage"] = qu.If(nextPage != "", fmt.Sprintf("/jyapp/tags/%s/%s.html", types, nextPage), "").(string)
|
|
|
+
|
|
|
if len(currentLocation) > 0 {
|
|
|
currentLocation[len(currentLocation)-1].Url = ""
|
|
|
}
|
|
@@ -229,6 +228,14 @@ onceAgain:
|
|
|
if biddingInfo.IsSearch {
|
|
|
tg.T["biddingList"] = biddingInfo.GetBiddingInfo(types, name, currentLocation)
|
|
|
}
|
|
|
+ if biddingInfo.PageNum == 1 {
|
|
|
+ prevPage = ""
|
|
|
+ }
|
|
|
+ if biddingInfo.PageNum == (biddingInfo.Total-1)/biddingInfo.PageSize+1 {
|
|
|
+ nextPage = ""
|
|
|
+ }
|
|
|
+ tg.T["prevPage"] = qu.If(prevPage != "", fmt.Sprintf("/jyapp/tags/%s/%s.html", types, prevPage), "").(string)
|
|
|
+ tg.T["nextPage"] = qu.If(nextPage != "", fmt.Sprintf("/jyapp/tags/%s/%s.html", types, nextPage), "").(string)
|
|
|
tg.T["totalPage"] = (biddingInfo.Total-1)/biddingInfo.PageSize + 1
|
|
|
tg.T["pageNum"] = biddingInfo.PageNum
|
|
|
tg.T["hotArea"] = jyutil.GetHotArea()
|
|
@@ -253,6 +260,7 @@ onceAgain:
|
|
|
tg.T["areaTopTip"] = areaTopTip
|
|
|
tg.T["title"] = title
|
|
|
tg.T["Home"] = "/jyapp/tags/home/home.html"
|
|
|
+ tg.T["isInfoList"] = isInfoList
|
|
|
//模板redis缓存
|
|
|
content, _ := tg.Render4Cache("/tags/index.html", &tg.T)
|
|
|
redis.Put("seoCache", tagsMobileKey, string(content), qu.IntAll(config.Seoconfig["contentCache"]))
|