|
@@ -52,7 +52,7 @@ func (this PcIndex) ProductIndex() error {
|
|
|
return this.Render("/frontRouter/pc/serviceSystem/free/index.html")
|
|
|
}
|
|
|
|
|
|
-//剑鱼标讯pc首页
|
|
|
+// 剑鱼标讯pc首页
|
|
|
func (m *PcIndex) NewSordfish(flag string) error {
|
|
|
ispc, _ := m.GetInteger("ispc")
|
|
|
pageSize, _ := m.GetInteger("pageSize")
|
|
@@ -97,12 +97,22 @@ func (m *PcIndex) NewSordfish(flag string) error {
|
|
|
} else if flag == "tmp" {
|
|
|
return m.Render("/pc/index_tmp.html", &m.T)
|
|
|
} else {
|
|
|
+ //按地区、信息类型、热门招标
|
|
|
+ for k, v := range RegionAndInformationAndTender() {
|
|
|
+ m.T[k] = v
|
|
|
+ }
|
|
|
+ //热门标的物
|
|
|
+ m.T["hotSubject"] = HotSubjectMatter()
|
|
|
+ //实用内容推荐
|
|
|
+ m.T["recommend"] = ContentRecommendation()
|
|
|
+ //推荐标讯专区
|
|
|
+ m.T["recommendBeacon"] = RecommendationBeacon()
|
|
|
return m.Render("/pc/index.html", &m.T)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//剑鱼标讯pc首页-统计
|
|
|
+// 剑鱼标讯pc首页-统计
|
|
|
func (m *PcIndex) NewSordfishC() error {
|
|
|
var shareid = m.GetString("id")
|
|
|
if len(shareid) == 0 {
|
|
@@ -122,7 +132,7 @@ func (m *PcIndex) NewSordfishC() error {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//最新公告信息
|
|
|
+// 最新公告信息
|
|
|
func GetNewArticle(typ int, pageSize int) (list []map[string]interface{}) {
|
|
|
if typ == 0 {
|
|
|
typ = 1
|
|
@@ -170,7 +180,7 @@ func GetNewArticle(typ int, pageSize int) (list []map[string]interface{}) {
|
|
|
return list
|
|
|
}
|
|
|
|
|
|
-//前端跳转地址
|
|
|
+// 前端跳转地址
|
|
|
func GetLabUrl(typ int) interface{} {
|
|
|
if typ == 1 { //地区
|
|
|
areaM := map[string]interface{}{}
|
|
@@ -228,7 +238,7 @@ func GetLabUrl(typ int) interface{} {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
-//招标搜索数量
|
|
|
+// 招标搜索数量
|
|
|
func GetInfoNum() (one map[string]interface{}) {
|
|
|
defer util.Catch()
|
|
|
redis_obj := redis.Get("other", "pcsw_index")
|
|
@@ -254,7 +264,7 @@ func GetInfoNum() (one map[string]interface{}) {
|
|
|
return one
|
|
|
}
|
|
|
|
|
|
-//标签查询
|
|
|
+// 标签查询
|
|
|
func (f *PcIndex) SearchResult(at, name string) error {
|
|
|
defer util.Catch()
|
|
|
if at == "stype" && name == "NJ" {
|
|
@@ -577,7 +587,7 @@ func getstypeMap() []map[string][]map[string]interface{} {
|
|
|
return m2
|
|
|
}
|
|
|
|
|
|
-//给前端格式化数据结构
|
|
|
+// 给前端格式化数据结构
|
|
|
func stypeformat(k int, v string, m map[string]interface{}, m1 []map[string][]map[string]interface{}, arr []string) []map[string][]map[string]interface{} {
|
|
|
for _, vv := range arr {
|
|
|
vvstr := vv
|
|
@@ -626,7 +636,6 @@ func getkeysMap() []map[string][]map[string]interface{} {
|
|
|
return mar
|
|
|
}
|
|
|
|
|
|
-//
|
|
|
func getstype(stype string) string {
|
|
|
switch stype {
|
|
|
case "招标公告":
|
|
@@ -646,7 +655,6 @@ func getstype(stype string) string {
|
|
|
return stype
|
|
|
}
|
|
|
|
|
|
-//
|
|
|
func NumberFormat(i int) string {
|
|
|
str := strconv.Itoa(i)
|
|
|
length := len(str)
|
|
@@ -665,8 +673,9 @@ func NumberFormat(i int) string {
|
|
|
return strings.Join(arr, ".") //将一系列字符串连接为一个字符串,之间用sep来分隔。
|
|
|
}
|
|
|
|
|
|
-/* 判断是否入库
|
|
|
- 单独存一张表 用于记录是否是已保存过seo数据
|
|
|
+/*
|
|
|
+判断是否入库
|
|
|
+单独存一张表 用于记录是否是已保存过seo数据
|
|
|
*/
|
|
|
func InSeoContent(arr *[]map[string]interface{}) {
|
|
|
for _, v := range *arr {
|