|
@@ -269,11 +269,11 @@ func GetIndustry(industryHref string) []map[string]interface{} {
|
|
|
|
|
|
type BuyerList struct {
|
|
|
Name string `json:"name"`
|
|
|
- Id string `json:"id"`
|
|
|
+ Url string `json:"url"`
|
|
|
}
|
|
|
|
|
|
// 热门采购单位
|
|
|
-func HotBuyerList() []*BuyerList {
|
|
|
+func HotBuyerList(entIsNew bool) []*BuyerList {
|
|
|
// 使用当前时间作为随机数生成器的种子
|
|
|
randGen := rand.New(rand.NewSource(time.Now().UnixNano()))
|
|
|
// 获取一个范围在 [0, 100) 的随机整数
|
|
@@ -284,9 +284,10 @@ func HotBuyerList() []*BuyerList {
|
|
|
if len(*data) > 0 {
|
|
|
var buyerList []*BuyerList
|
|
|
for _, b := range *data {
|
|
|
+ name := qu.ObjToString(b["name"])
|
|
|
buyerList = append(buyerList, &BuyerList{
|
|
|
- Name: qu.ObjToString(b["name"]),
|
|
|
- Id: encrypt.EncodeArticleId2ByCheck(qu.ObjToString(b["_id"])),
|
|
|
+ Name: name,
|
|
|
+ Url: qu.If(entIsNew, fmt.Sprintf("/entpc/unit_portrayal/%s", name), fmt.Sprintf("/swordfish/page_big_pc/unit_portrayal/%s", name)).(string),
|
|
|
})
|
|
|
}
|
|
|
return buyerList
|