Browse Source

weixin chaojisousuo

[wangkaiyue] 8 years ago
parent
commit
c04f121140

+ 2 - 1
src/config.json

@@ -99,5 +99,6 @@
             "bodymsg": "剑鱼-招标信息打赏",
             "detailmsg": "招标推送信息[%s] 打赏%s元钱"
         }
-    }
+    },
+	"industry":"分类综合测试"
 }

+ 56 - 0
src/jfw/front/entsearch.go

@@ -0,0 +1,56 @@
+package front
+
+import (
+	"fmt"
+	"jfw/jylabutil"
+	"log"
+	//"math/rand"
+	"qfw/util"
+	//"qfw/util/redis"
+
+	"time"
+
+	"jfw/jyutil"
+	//"regexp"
+	//"strconv"
+	//"strings"
+	//"sync"
+
+	"github.com/go-xweb/xweb"
+
+	//. "github.com/thinxer/go-word2vec"
+	//"gopkg.in/mgo.v2/bson"
+)
+
+type Entsearch struct {
+	*xweb.Action
+	bidsearchforent xweb.Mapper `xweb:"/jylab/bidsearchforent"`
+}
+
+func init() {
+	xweb.AddAction(&Entsearch{})
+}
+
+func (e *Entsearch) Bidsearchforent() error {
+	log.Println("-------中标企业搜索:")
+
+	list := []map[string]interface{}{}
+	list = jylabutil.GetProjectByEntName("", "", 0, 0, 1, 10)
+	jyutil.BidListConvert("", &list)
+
+	for k, v := range list {
+		v["k"] = k + 1
+		t1 := time.Unix(util.Int64All(v["createtime"]), 0)
+		v["time1"] = util.TimeDiff(t1)
+		t2 := time.Unix(util.Int64All(v["zbtime"]), 0)
+		v["time2"] = util.TimeDiff(t2)
+
+		fmt.Println(v["industry"])
+		//for i,z := range v{
+		//	fmt.Println(i)
+		//	fmt.Println(z)
+		//}
+	}
+	e.T["list"] = list
+	return e.Render("/pc/biddingsearch_enterprise.html", &e.T)
+}

+ 0 - 111
src/jfw/front/entserach.go

@@ -1,111 +0,0 @@
-package front
-
-import (
-	"fmt"
-	"log"
-	"qfw/util"
-	"qfw/util/redis"
-	"github.com/go-xweb/xweb"
-	"time"
-	"math/rand"
-	//"regexp"
-	//"strconv"
-	//"strings"
-	//"sync"
-
-	//. "github.com/thinxer/go-word2vec"
-	//"gopkg.in/mgo.v2/bson"
-)
-
-type Entsearch struct {
-	*xweb.Action
-	bidsearchforent xweb.Mapper `xweb:"/jylab/bidsearchforent"`
-}
-
-func init() {
-	xweb.AddAction(&Entsearch{})
-}
-
-func (m *Entsearch) Bidsearchforent() error {
-	log.Println("-------中标企业搜索:")
-
-	//keywords := m.GetString("keywords")
-
-	searchvalue := m.GetString("searchvalue")
-	area := m.GetString("area")
-	publishtime := m.GetString("publishtime")
-	industry := m.GetString("industry")
-	//toptype := m.GetString("toptype")
-	subtype := m.GetString("subtype")
-	//selectType := m.GetString("selectType")
-	//selectTypesess := m.GetSession("selectType")
-
-	var list *[]map[string]interface{}
-	pages := make([]interface{}, 0)
-	//var status = 2
-	//var count int64
-	intns := make([]int, 0)
-	for i := 0; i < 10; i++ {
-		if len(intns) == 0 {
-			intns = append(intns, rand.Intn(100))
-		} else {
-			for {
-				v := rand.Intn(intns[(i-1)] + 100)
-				if v-intns[(i-1)] >= 30 {
-					intns = append(intns, v)
-					break
-				}
-			}
-		}
-	}
-	//for i := 0; i < 10; i++ {
-		_, list = getLastNewsData(searchvalue, area, publishtime, subtype, industry, 0, true)
-		fmt.Println(list)
-		for k, v := range *list {
-			//v["k"] = (k + 1) + i*50
-			v["k"] = (k + 1) + 1*50
-			t := time.Unix(util.Int64All(v["publishtime"]), 0)
-			v["timetemp"] = fmt.Sprint(util.Int64All(v["publishtime"]))
-			v["_id"] = util.EncodeArticleId2ByCheck(v["_id"].(string))
-			v["time"] = util.TimeDiff(t)
-			var stp = ""
-			if v["subtype"] != nil {
-				stp, _ = v["subtype"].(string)
-			} else {
-				stp = ""
-			}
-			if stp == "" && v["toptype"] != nil {
-				stp, _ = v["toptype"].(string)
-			}
-			area, _ := v["area"].(string)
-			v["stypeadd"], v["areaadd"] = classify(stp, area)
-		}
-		pages = append(pages, list)
-	//}
-	m.DisableHttpCache()
-	redis.Put("other", "index_list", pages, 60*60*2)
-
-	//if status == 2 && m.Method() == "GET" {
-	//	pages := redis.Get("other", "index_list").([]interface{})
-	//	p := util.IntAll(p)
-	//	if p <= 0 || p > 10 {
-	//		p = 1
-	//	}
-	//
-	//	if p-1 <= 0 {
-	//		m.T["prev"] = 1
-	//	} else {
-	//		m.T["prev"] = p - 1
-	//	}
-	//	if p+1 >= 11 {
-	//		m.T["next"] = 10
-	//	} else {
-	//		m.T["next"] = p + 1
-	//	}
-	//	m.T["cur"] = p
-	//	m.T["list"] = pages[p-1]
-	//
-	//	return m.Render("/pc/biddingsearch_enterprise.html", &m.T)
-	//}
-	return m.Render("/pc/biddingsearch_enterprise.html", &m.T)
-}

+ 49 - 28
src/jfw/front/supsearch.go

@@ -3,6 +3,7 @@ package front
 import (
 	"fmt"
 	"jfw/config"
+	"jfw/jyutil"
 	"log"
 	"math/rand"
 	"qfw/util"
@@ -52,34 +53,9 @@ func (p *Pcsearch) PcSearchIndex() error {
 	if len(shareid) == 0 {
 		shareid = fmt.Sprintf("%s%d", config.Seoconfig["jysslby"].(string)+fmt.Sprintf("%d", time.Now().UnixNano())[8:14], rand.Intn(9))
 	}
-	industryData, ok := mongodb.Find("rc_rule", `{"s_name":{$ne:null}}`, `{"i_order":1}`, `{"_id":1,"s_name":1}`, false, -1, -1)
-	if ok && industryData != nil && len(*industryData) > 0 {
-		industry := map[string][]string{}
-		sortArray := []string{}
-		for _, v := range *industryData {
-			fatFlag := 0
-			//childFlag := 0
-			industryname, _ := v["s_name"].(string)
-			if strings.Contains(industryname, "_") {
-				fat := strings.Split(industryname, "_")[0]
-				child := strings.Split(industryname, "_")[1]
-				if len(industry[fat]) == 0 {
-					sortArray = append(sortArray, fat)
-				}
-				for _, fv := range industry[fat] {
-					if fv == strings.Trim(child, " ") {
-						fatFlag = 1
-						break
-					}
-				}
-				if fatFlag != 1 {
-					industry[fat] = append(industry[fat], child)
-				}
-			}
-		}
-		p.T["industry"] = industry
-		p.T["sortArray"] = sortArray
-	}
+	industry, sortArray := getindustrys()
+	p.T["industry"] = industry
+	p.T["sortArray"] = sortArray
 	p.DisableHttpCache()
 	Newbids()
 	data := redis.Get("other", "index_list").([]interface{})
@@ -88,6 +64,50 @@ func (p *Pcsearch) PcSearchIndex() error {
 	return p.Render("/pc/supsearch.html", &p.T)
 }
 
+//
+func getindustrys() (industry map[string][]string, sortArray []string) {
+	industry = map[string][]string{}
+	sortArray = []string{}
+	industryname := config.Sysconfig["industry"].(string)
+	classdata, ok1 := mongodb.FindOneByField("rc_task", `{"s_name":"`+industryname+`"}`, `{"s_class":1}`)
+	if ok1 && len(*classdata) > 0 {
+		classid := ""
+		if util.ObjToString((*classdata)["s_class"]) != "" {
+			classids := strings.Split(util.ObjToString((*classdata)["s_class"]), ",")
+			for k, v := range classids {
+				if k > 0 {
+					classid += `,`
+				}
+				classid += `"` + v + `"`
+			}
+		}
+		industryData, ok := mongodb.Find("rc_rule", `{"s_pid":{"$ne":""},"s_classid":{"$in":[`+classid+`]}}`, `{"i_order":1}`, `{"_id":1,"s_name":1}`, false, -1, -1)
+		if ok && industryData != nil && len(*industryData) > 0 {
+			for _, v := range *industryData {
+				fatFlag := 0
+				industryname, _ := v["s_name"].(string)
+				if strings.Contains(industryname, "_") {
+					fat := strings.Split(industryname, "_")[0]
+					child := strings.Split(industryname, "_")[1]
+					if len(industry[fat]) == 0 {
+						sortArray = append(sortArray, fat)
+					}
+					for _, fv := range industry[fat] {
+						if fv == strings.Trim(child, " ") {
+							fatFlag = 1
+							break
+						}
+					}
+					if fatFlag != 1 {
+						industry[fat] = append(industry[fat], child)
+					}
+				}
+			}
+		}
+	}
+	return industry, sortArray
+}
+
 //
 func Newbids() {
 	var list *[]map[string]interface{}
@@ -109,6 +129,7 @@ func Newbids() {
 		}
 		for i := 0; i < 10; i++ {
 			_, list = getLastNewsData("", "", "", "", "", intns[i], true)
+			jyutil.BidListConvert("", list)
 			for k, v := range *list {
 				v["k"] = (k + 1) + i*50
 				t := time.Unix(util.Int64All(v["publishtime"]), 0)

+ 49 - 97
src/jfw/front/swordfish.go

@@ -6,6 +6,7 @@ import (
 	"fmt"
 	"html/template"
 	"jfw/config"
+	"jfw/jyutil"
 	"jfw/tools"
 	"jfw/wx"
 	"log"
@@ -140,7 +141,7 @@ func (m *Front) NewSordfish() error {
 			m.DisableHttpCache()
 			lastBids := elastic.GetPage("bidding", "bidding", "{}", bidSearch_sort, `"_id","title","publishtime","toptype","subtype","type","area","href","biddingcontent"`, 0, 18)
 			if lastBids != nil && len(*lastBids) > 0 {
-				bidListConvert("", lastBids)
+				jyutil.BidListConvert("", lastBids)
 				lbnHtml, olHtml := structureLastBidsHtml(lastBids)
 				m.T["lbnHtml"] = lbnHtml
 				m.T["olHtml"] = olHtml
@@ -422,7 +423,7 @@ func (m *Front) PcAjaxReq() {
 	//获取最新招标信息
 	if reqType == "lastBids" {
 		ls := elastic.GetPage(INDEX, TYPE, "{}", bidSearch_sort, bidSearch_field_1, 0, 18)
-		bidListConvert("", ls)
+		jyutil.BidListConvert("", ls)
 		m.ServeJson(map[string]interface{}{
 			"list": ls,
 		})
@@ -456,8 +457,9 @@ func (m *Front) PcAjaxReq() {
 			count, list = getLastNewsData(searchvalue, area, publishtime, subtype, industry, 0, true)
 		}
 	} else if reqType == "bidSearch" {
-		_, list = getBidSearchData(searchvalue, area, publishtime, subtype, industry, start, false, selectType)
+		count, list = getBidSearchData(searchvalue, area, publishtime, subtype, industry, start, true, selectType)
 	} else if reqType == "lastNews" {
+		log.Println("zuixin:", area)
 		_, list = getLastNewsData(searchvalue, area, publishtime, subtype, industry, start, false)
 	}
 	if list != nil && len(*list) > 0 {
@@ -508,7 +510,7 @@ func getBidSearchData(searchvalue, area, publishtime, subtype, industry string,
 			repl = elastic.GetByNgram(INDEX, TYPE, searchvalue, query, `"title"` /*FINDF*/, bidSearch_sort, bidSearch_field, start, bidSearch_pageSize)
 		}
 		if repl != nil && *repl != nil && len(*repl) > 0 {
-			bidListConvert(industry, repl)
+			jyutil.BidListConvert(industry, repl)
 			list = repl
 		}
 	}
@@ -533,7 +535,7 @@ func getLastNewsData(searchvalue, area, publishtime, subtype, industry string, s
 		}
 		repl := elastic.GetByNgramOther(INDEX, TYPE, searchvalue, query, `"title","detail"` /*FINDF*/, bidSearch_sort, bidSearch_field, start, bidSearch_pageSize, true, false, 115)
 		if repl != nil && *repl != nil && len(*repl) > 0 {
-			bidListConvert(industry, repl)
+			jyutil.BidListConvert(industry, repl)
 			list = repl
 		}
 	}
@@ -847,58 +849,58 @@ func (m *Front) WxsearchlistPaging() {
 		industry := m.GetString("industry")
 		list = getWxsearchlistData(searchvalue, searchname, scope, publishtime, subtype, industry, pageNum, selectType)
 
-	//历史记录和订阅查询
-	if userId := m.GetSession("userId"); userId != nil {
-		one, _ := mongodb.FindOneByField("user", bson.M{"_id": bson.ObjectIdHex(userId.(string))}, `{"o_jy":1}`)
-		history := redis.GetStr("other", "s_"+userId.(string))
-		arrs := strings.Split(history, ",")
+		//历史记录和订阅查询
+		if userId := m.GetSession("userId"); userId != nil {
+			one, _ := mongodb.FindOneByField("user", bson.M{"_id": bson.ObjectIdHex(userId.(string))}, `{"o_jy":1}`)
+			history := redis.GetStr("other", "s_"+userId.(string))
+			arrs := strings.Split(history, ",")
 
-		if history == "" {
-			arrs = make([]string, 0)
-		}
-		var historyFlag = 0
-		for _, v := range arrs {
-			if v == strings.Trim(searchvalue, " ") {
-				historyFlag = 1
-				break
+			if history == "" {
+				arrs = make([]string, 0)
 			}
-		}
-		if historyFlag != 1 {
-			arrs = append(arrs, searchvalue)
-			if len(arrs) > 5 {
-				arrs = arrs[1:6]
+			var historyFlag= 0
+			for _, v := range arrs {
+				if v == strings.Trim(searchvalue, " ") {
+					historyFlag = 1
+					break
+				}
 			}
-			redis.Del("other", "s_"+userid.(string))
-			redis.Put("other", "s_"+userid.(string), strings.Join(arrs, ","), -1)
-		}
-		l := len(arrs) - 1
-		for i := 0; i < len(arrs)/2; i++ {
-			tmp := arrs[l-i]
-			arrs[l-i] = arrs[i]
-			arrs[i] = tmp
-		}
-		m.T["history"] = arrs
-
+			if historyFlag != 1 {
+				arrs = append(arrs, searchvalue)
+				if len(arrs) > 5 {
+					arrs = arrs[1:6]
+				}
+				redis.Del("other", "s_"+userid.(string))
+				redis.Put("other", "s_"+userid.(string), strings.Join(arrs, ","), -1)
+			}
+			l := len(arrs) - 1
+			for i := 0; i < len(arrs)/2; i++ {
+				tmp := arrs[l-i]
+				arrs[l-i] = arrs[i]
+				arrs[i] = tmp
+			}
+			m.T["history"] = arrs
 
-		if one != nil && len(*one) > 0 {
-			o_jy, _ := (*one)["o_jy"].(map[string]interface{})
-			a_key, _ := o_jy["a_key"].([]interface{})
-			var keys []interface{}
-			for _, v := range a_key {
-				keyMap, _ := v.(map[string]interface{})
-				key, _ := keyMap["key"].([]interface{})
-				keys = append(keys, key)
+			if one != nil && len(*one) > 0 {
+				o_jy, _ := (*one)["o_jy"].(map[string]interface{})
+				a_key, _ := o_jy["a_key"].([]interface{})
+				var keys []interface{}
+				for _, v := range a_key {
+					keyMap, _ := v.(map[string]interface{})
+					key, _ := keyMap["key"].([]interface{})
+					keys = append(keys, key)
+				}
+				m.T["msgset"] = keys
 			}
-			m.T["msgset"] = keys
 		}
 	}
-	}
+
 
 	m.ServeJson(map[string]interface{}{
 		"list":        list,
 		"hasNextPage": list != nil && len(*list) == wx_pageSize && pageNum < wx_maxPageNum,
-		"history":   m.T["history"],
-		"msgset": m.T["msgset"],
+		"history":     m.T["history"],
+		"msgset":      m.T["msgset"],
 	})
 }
 
@@ -929,7 +931,7 @@ func getWxsearchlistData(keywords, searchvalue, scope, publishtime, subtype, ind
 		}
 
 		if list != nil {
-			bidListConvert("", list)
+			jyutil.BidListConvert("", list)
 			for _, v := range *list {
 				v["_id"] = util.EncodeArticleId2ByCheck(util.ObjToString(v["_id"]))
 			}
@@ -2177,53 +2179,3 @@ func (m *Front) Subscribe() error {
 	m.T["signature"] = wx.SignJSSDK(m.Site() + m.Url())
 	return m.Render("/pc/subscribe.html", &m.T)
 }
-
-/*
- * 结果列表转换,目前只换行行业字段
- * 所有的招标搜索都要调用此方法,列表中有展示行业的也可以用
- * industry 搜索条件中的行业,默认为空
- */
-func bidListConvert(industry string, list *[]map[string]interface{}) {
-	if list == nil {
-		return
-	}
-	commonSubstring := func(v string) (value string) {
-		bcs := strings.Split(v, "_")
-		if len(bcs) == 1 {
-			value = bcs[0]
-		} else if len(bcs) == 2 {
-			value = bcs[1]
-			if strings.TrimSpace(value) == "" {
-				value = bcs[0]
-			}
-		}
-		return
-	}
-	for _, v := range *list {
-		value := ""
-		biddingcontent, _ := v["biddingcontent"].([]interface{})
-		bct := util.ObjArrToStringArr(biddingcontent)
-		if bct == nil || len(bct) == 0 {
-			continue
-		}
-		//搜索条件中没有行业的话,取查询结果中第一个行业
-		if industry == "" {
-			value = commonSubstring(bct[0])
-		} else { //搜索条件中有行业的话,取行业中和搜索条件相对应的第一个
-			industrys := strings.Split(industry, ",")
-		L:
-			for _, bc := range bct {
-				for _, is := range industrys {
-					if bc == is {
-						value = commonSubstring(bc)
-						break L
-					}
-				}
-			}
-		}
-		if strings.TrimSpace(value) == "" {
-			continue
-		}
-		v["industry"] = value
-	}
-}

+ 1 - 1
src/jfw/jylabutil/entsearch.go

@@ -44,7 +44,7 @@ func GetProjectByEntName(entname string, area string, lower, upper, pagenum, pag
 	list := *elastic.GetByNgram(
 		"projectset", "projectset",
 		entname, mastquery,
-		`"winner"`,
+		`"winner","biddingcontent"`,
 		`{"createtime":-1}`, ``, (pagenum-1)*pagesize, pagesize,
 	)
 	return list

+ 50 - 0
src/jfw/jyutil/jyutil.go

@@ -85,3 +85,53 @@ func ReplaceSymbol(con string, rep []string) string {
 	}
 	return con
 }
+
+/*
+ * 结果列表转换,目前只换行行业字段
+ * 所有的招标搜索都要调用此方法,列表中有展示行业的也可以用
+ * industry 搜索条件中的行业,默认为空
+ */
+func BidListConvert(industry string, list *[]map[string]interface{}) {
+	if list == nil {
+		return
+	}
+	commonSubstring := func(v string) (value string) {
+		bcs := strings.Split(v, "_")
+		if len(bcs) == 1 {
+			value = bcs[0]
+		} else if len(bcs) == 2 {
+			value = bcs[1]
+			if strings.TrimSpace(value) == "" {
+				value = bcs[0]
+			}
+		}
+		return
+	}
+	for _, v := range *list {
+		value := ""
+		biddingcontent, _ := v["biddingcontent"].([]interface{})
+		bct := util.ObjArrToStringArr(biddingcontent)
+		if bct == nil || len(bct) == 0 {
+			continue
+		}
+		//搜索条件中没有行业的话,取查询结果中第一个行业
+		if industry == "" {
+			value = commonSubstring(bct[0])
+		} else { //搜索条件中有行业的话,取行业中和搜索条件相对应的第一个
+			industrys := strings.Split(industry, ",")
+		L:
+			for _, bc := range bct {
+				for _, is := range industrys {
+					if bc == is {
+						value = commonSubstring(bc)
+						break L
+					}
+				}
+			}
+		}
+		if strings.TrimSpace(value) == "" {
+			continue
+		}
+		v["industry"] = value
+	}
+}

+ 1 - 0
src/jfw/modules/entsesearch/src/search/entsesearch.go

@@ -24,6 +24,7 @@ func init() {
 }
 
 func (e *EntSeSearch) ToSearch() error{
+	e.T["pageSize"] = "10"
 	return e.Render("/weixin/entseSearch.html", &e.T)
 }
 

+ 22 - 4
src/jfw/modules/entsesearch/src/web/templates/weixin/entseSearch.html

@@ -251,7 +251,7 @@
 <body>
 <!-->顶部搜索<-->
 <div id="searchDiv">
-	<form class="searchform" id="searchform" method="post" action="/swordfish/searchlist" target="listf">
+	<form class="searchform" id="searchform" method="post" target="listf">
 	<div class="wxhead">
 	<input class="form-control searchname" id="searchname" name="searchname" maxlength ="50" value="{{if .T.shname}}{{.T.shname}}{{end}}" placeholder="中标企业名称"/>
 
@@ -388,6 +388,16 @@
 <div class="tip_m">提示:为了获得更佳的体验,推荐使用电脑浏览器访问剑鱼网站jianyu360.com查看数据表格。</div>
 </body>
 <script>
+	var pageSize = {{.T.pageSize}};
+	var pageNum = "1";
+	//查询参数
+    var reqParam = {
+        "searchname": $.trim($(".searchname").val()),
+        "money_from": $.trim($("#money_from").val()),
+        "money_to": $.trim($("#money_to").val()),
+        "scope": "",
+        "pageNum": pageNum
+    };
 	$(function () {
         $(".qc").addClass("hidden");
         $(".tubiao").addClass("hidden");
@@ -502,6 +512,14 @@
             $(".money").addClass("hidden");
             $(".jydq-dialog").removeClass("hidden");
         })
+
+        $('#searchList').dropload({
+            scrollArea: window.top.isIOS ? window.top : window,
+            loadDownFn: function (me) {
+                alert(111);
+            }
+        });
+
     });
 
     //企业推荐列表
@@ -543,7 +561,6 @@
         //金额
         if($(".money .btn.active_m").first().length>0){
             money = $(".money .btn.active_m").first().text();
-            console.log(money);
         }
         var money_from = $.trim($("#money_from").val());
         var money_to = $.trim($("#money_to").val());
@@ -562,6 +579,7 @@
             });
             return scope.join(",");
         };
+        reqParam["scope"] = this.setScope();
         dataObj["searchname"] = searchname;
         dataObj["scope"] = this.setScope();
         dataObj["money"] = money;
@@ -578,9 +596,9 @@
 
         $.post("/jylab/entsesearch/proList",dataObj,function(r){
             if(r){
-                console.log(r);
                 if(typeof (r.proList)!="undefined"){
                     var proList = r.proList;
+                    //$("#searchList tbody tr").remove();
                     for(var i=0;i<proList.length;i++){
                         var bidamount = proList[i].bidamount;
                         var projectname = proList[i].projectname;
@@ -588,7 +606,7 @@
                         var sourceinfoid = proList[i].sourceinfoid;
                         var projectcode = proList[i].projectcode;
                         var obj =$("<tr onclick=\"toDetail('"+sourceinfoid+"','"+projectcode+"','"+projectname+"')\"><td>"+(i+1)+"</td><td>"+zbtime+"</td><td>"+projectname+"</td><td>"+bidamount+"</td></tr>");
-                        $("#searchlist tbody").append(obj);
+                        $("#searchList tbody").append(obj);
                     }
                 }
                 shaixuanHide();

+ 7 - 7
src/jfw/modules/followent/src/followent/followent.go

@@ -19,13 +19,13 @@ var mongodb = tools.MQFW
 type FollowEnt struct {
 	*xweb.Action
 
-	entList  xweb.Mapper `xweb:"/jylab/followent/entList"`           //获取关注企业列表
-	addEnt   xweb.Mapper `xweb:"/jylab/followent/addEnt"`            //添加关注企业页面
-	newInfo  xweb.Mapper `xweb:"/jylab/followent/newInfo/(.*)/(.*)"` //企业最新信息
-	recList  xweb.Mapper `xweb:"/jylab/followent/recList"`           //获取推荐企业列表
-	saveEnt  xweb.Mapper `xweb:"/jylab/followent/saveEnt"`           //保存关注企业
-	qgFollow xweb.Mapper `xweb:"/jylab/followent/qgFollow"`          //取消关注
-	visited  xweb.Mapper `xweb:"/jylab/followent/notice/visited"`    //用是否已查看
+	entList  xweb.Mapper `xweb:"/jylab/followent/entList"`        //获取关注企业列表
+	addEnt   xweb.Mapper `xweb:"/jylab/followent/addEnt"`         //添加关注企业页面
+	newInfo  xweb.Mapper `xweb:"/jylab/followent/newInfo/(.*)"`   //企业最新信息
+	recList  xweb.Mapper `xweb:"/jylab/followent/recList"`        //获取推荐企业列表
+	saveEnt  xweb.Mapper `xweb:"/jylab/followent/saveEnt"`        //保存关注企业
+	qgFollow xweb.Mapper `xweb:"/jylab/followent/qgFollow"`       //取消关注
+	visited  xweb.Mapper `xweb:"/jylab/followent/notice/visited"` //用是否已查看
 }
 
 func init() {

+ 3 - 1
src/seo.json

@@ -297,6 +297,8 @@
 	"source":{
 		"baiduSEM":"百度SEM",
 		"360SEM":"360SEM",
-		"QQqun":"QQ群广告"
+		"QQqun":"QQ群广告",
+		"BDwangmeng":"百度网盟",
+		"PCwailian":"PC端外链"
 	}
 }

+ 3 - 3
src/web/staticres/css/dev2/biddingSearch.css

@@ -66,7 +66,7 @@
   font-size: 16px;
 }
 
-#searchInner .searchHeader .searchHeader-container .searchInput form input[type='submit'] {
+#searchInner .searchHeader .searchHeader-container .searchInput form input[type='button'] {
   float: left;
   width: 106px;
   height: 42px;
@@ -649,7 +649,7 @@ width:1160px;
 }
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene li .luce-left {
   float: left;
-  width: 860px;
+  width: 854px;
 }
 
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene li .luce-left em {
@@ -661,7 +661,7 @@ width:1160px;
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene li .luce-left .left-title {
   float: left;
   line-height: 30px;
-    width: 818px
+    width: 810px
 }
 
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene li .luce-left .left-title a {

+ 37 - 0
src/web/staticres/css/dev2/biddingSearch1.css

@@ -12,4 +12,41 @@
 }
 .active{
 	background-color: #2cb7ca;
+}
+.hasNoData{
+	border-bottom: 1px solid #e0e0e0;
+    height: 400px;
+	text-align: center;
+	padding-top: 30px;
+	margin-bottom:60px;
+}
+.searchInner{
+	line-height:1px;
+}
+.lucene-table tbody>tr>td:nth-child(1) div{
+	width:35px;
+}
+.lucene-table tbody>tr>td:nth-child(2) div{
+	width:88px;
+}
+.lucene-table tbody>tr>td:nth-child(3) div{
+	width:71px;
+}
+.lucene-table tbody>tr>td:nth-child(4) div{
+	width:168px;
+}
+.lucene-table tbody>tr>td:nth-child(5) div{
+	width:308px;
+}
+.lucene-table tbody>tr>td:nth-child(6) div{
+	width:60px;
+}
+.lucene-table tbody>tr>td:nth-child(7) div{
+	width:88px;
+}
+.lucene-table tbody>tr>td:nth-child(8) div{
+	width:161px;
+}
+.lucene-table tbody>tr>td:nth-child(9) div{
+	width:63px;
 }

+ 1 - 1
src/web/staticres/css/dev2/reset_pc.css

@@ -21,7 +21,7 @@ vertical-align: baseline;
 outline: 0; 
 } 
 body { 
-line-height: 1; 
+/*line-height: 1; */
 /*color: black; 
 background: white; */
 font-family: "Microsoft YaHei",sans-serif;

+ 2 - 0
src/web/staticres/js/biddingSearch.js

@@ -121,6 +121,7 @@ $(function() {
 			} else {
 				$prevNode.removeClass("active").addClass("secondActice");
 			}
+
 		});
 		$parentNode.on('click', function() {
 			$(this).toggleClass("active").removeClass("secondActice");
@@ -139,6 +140,7 @@ $(function() {
 			} else {
 				$induAll.addClass("active");
 			}
+
 		})
 		/*全部点击*/
 		$induAll.on("click", function() {

+ 10 - 0
src/web/staticres/js/entsearchscript.js

@@ -0,0 +1,10 @@
+$(function () {
+    $("#regionBtn").on("click",function () {
+        //alert($(this).text())
+    })
+    $(".region-content>font").on("click",function () {
+        //alert($(this).text())
+    })
+})
+
+

+ 218 - 36
src/web/staticres/js/superSearch.js

@@ -1,6 +1,9 @@
 var pageSize = 50;
 var nbflag = false;//是否显示的是最新招标数据
 var currentPage = 1;
+var submitflag = true;
+var searchvalue = "";
+var searchvalueArray = searchvalue.split("+");
 
 $(function() {
 	$("#minprice").click(function(){
@@ -22,6 +25,7 @@ $(function() {
 	$(".Price-content").find("span:first-child").click(function(){
 		$(this).addClass("active");
 		$(".pricefat").removeClass("active");
+		beforeSubmit();
 	})
 	$(".timer").find("ul li:first-child").click(function(){
 		$(this).addClass("active");
@@ -42,6 +46,7 @@ $(function() {
 		$(".pricefat").addClass("active");
 		$(".Price-content").find("span:first-child").removeClass("active");
 		$(".pricefat").removeClass("customtime-active");
+		beforeSubmit()
 	})
 	//
 	$("#timebut").click(function(){
@@ -50,6 +55,7 @@ $(function() {
 		$(".timerInput").removeClass("customtime-active");
 		$(".timer").find("ul li:first-child").removeClass("active");
 		$(".release-time .timer li").removeClass("active");
+		beforeSubmit()
 	})
 	//
 	$(".nbprev").click(function(){
@@ -62,25 +68,39 @@ $(function() {
 	})
 	//筛选关闭和打开
 	//根据cookie值设置筛选是否显示
-	var rsw = $.cookie("orshow");
-	if(typeof(rsw)=="undefined"){
+	var rsw = localStorage.getItem("hideorshow");
+	if(rsw==null){
 		setTimeout(function(){
 			$(".searchTender").stop(false,true).slideDown(1000);
-			$.cookie("orshow","T",{expires:360,path:"/" });
+			localStorage.setItem("hideorshow", "D");
 		},500);
+	}else{
+		if(rsw=="U"){
+			$("#screenBtn").addClass("down");
+			$(".searchTender").hide();
+		}else{
+			$("#screenBtn").removeClass("down");
+			$(".searchTender").show();
+		}
 	}
-	/////////////////
-//	$(".right-tabBtn button:nth-child(1)").click(function(){
-//		tol="L"
-//		getNewBiddings(1)
-//	})
-//	$(".right-tabBtn button:nth-child(2)").click(function(){
-//		tol="T"
-//		getNewBiddings(1)
-//	})
+	//记录用户刷选按钮状态
+	$("#screenBtn").click(function(){
+		if($(this).attr("class").indexOf("down")>0){
+			localStorage.setItem("hideorshow", "U");
+		}else{
+			localStorage.setItem("hideorshow", "D");
+		}
+	})
+	//
+	$("#zbSeatchT input[type='button']").click(function(){
+		beforeSubmit()
+	})
 })
 //
 function next(){
+	if($(".nbnext").hasClass("disabled")){
+		return false;
+	}
 	var page = parseInt($(".pagination-inner").find("span").text())+parseInt(1)
 	if(!nbflag&&page<11){
 		if(page==10){
@@ -92,6 +112,9 @@ function next(){
 	}
 }
 function prev(){
+	if($(".nbprev").hasClass("disabled")){
+		return false;
+	}
 	var page = parseInt($(".pagination-inner").find("span").text())-parseInt(1)
 	if(!nbflag&&page>0){
 		if(page==1){
@@ -104,11 +127,38 @@ function prev(){
 }
 ////最新招标信息
 function getNewBiddings(page){
-	currentPage = page;
-	$.post("/jylab/supsearch/getNewBids",{pageNumber: page},function(data){
-		if(data&&data.list.length>0){
-			$(".pagination-inner").find("span").text(page)
-			appendDatas(data.list,false);
+	currentPage = page
+	if(page==1){
+		$(".nbprev").addClass("disabled");
+	}
+	var param = {
+				pageNumber: currentPage,
+				reqType: "lastNews",
+				searchvalue: $("#zbSeatchT [name='searchvalue']").val(),
+				area: $("#zbSeatchT [name='area']").val(),
+				subtype: $("#zbSeatchT [name='subtype']").val(),
+				publishtime: $("#zbSeatchT [name='publishtime']").val(),
+				selectType : $("#zbSeatchT [name='selectType']").val(),
+				minprice : $("#zbSeatchT [name='minprice']").val(),
+				maxprice : $("#zbSeatchT [name='maxprice']").val(),
+				industry : $("#zbSeatchT [name='industry']").val(),
+			};
+	$.post("/front/pcAjaxReq",param,function(r){
+		if(r&&r.list!=null&&r.list.length>0){
+			$(".tabContainer").show();
+			$(".pagination").show();
+			$(".hasNoData").hide();
+			$(".pagination-inner").find("span").text(page);
+			if(r.list.length<pageSize||page==10){
+				$(".nbnext").addClass("disabled");
+			}else{
+				$(".nbnext").removeClass("disabled");
+			}
+			appendDatas(r.list,false);
+		}else{
+			$(".tabContainer").hide();
+			$(".pagination").hide();
+			$(".hasNoData").show();
 		}
 	})
 }
@@ -152,6 +202,9 @@ function appendDatas(datas,flag){
 		if(!flag){
 				$("#allnews").hide();
 				$(".tabContainer-2").show();
+			}else{
+				$("#allnews").show();
+				$(".tabContainer-2").hide();
 			}
 			listHtml += '<li>'
 						+'<div class="liLuceneList">'
@@ -176,7 +229,12 @@ function appendDatas(datas,flag){
 				listHtml += '<a href="#" style="display:none;"></a>';
 			}
 			//
-			listHtml += '<a href="/list/stype/'+datas[i].stypeadd+'.html">建筑工程</a>';
+			if(typeof(datas[i].industry) != "undefined" && datas[i].industry != null && datas[i].industry != ""){
+				listHtml += '<a href="#">'+datas[i].industry+'</a>';
+			}else{
+				listHtml += '<a href="#" style="display:none;"></a>';
+			}
+			
 			//
 			if(typeof(datas[i].publishtime) != "undefined" && datas[i].publishtime != null && datas[i].publishtime != ""){
 				var diff = timeDiff(new Date(Number(datas[i].publishtime+"000")));
@@ -186,53 +244,66 @@ function appendDatas(datas,flag){
 			}
 			listHtml += '</div></li>';
 			tableHtml +='<tr>'
-					+'<td>'+index+'</td>'
+					+'<td><div>'+index+'</div></td>'
 			if(typeof(datas[i].publishtime) != "undefined" && datas[i].publishtime != null && datas[i].publishtime != ""){
 				var diff = formatDate(Number(datas[i].publishtime),"s");
 				if(diff != null){
-					tableHtml += '<td>'+diff+'</td>';
+					tableHtml += '<td><div>'+diff+'</div></td>';
 				}
 			}else{
-				tableHtml += '<td></td>';
+				tableHtml += '<td><div></div></td>';
 			}
 			if(typeof(type) != "undefined" && type != null && type != ""){
-				tableHtml += '<td>'+type+'公告</td>';
+				tableHtml += '<td><div>'+type+'公告</div></td>';
 			}else{
-				tableHtml += '<td></td>';
+				tableHtml += '<td><div></div></td>';
 			}
 			if(typeof(datas[i].agency) != "undefined" && datas[i].agency != null && datas[i].agency != ""){
-				tableHtml += '<td class="tt-l">'+datas[i].agency+'</td>';
+				tableHtml += '<td class="tt-l"><div>'+datas[i].agency+'</div></td>';
 			}else{
-				tableHtml += '<td class="tt-l"></td>';
+				tableHtml += '<td class="tt-l"><div></div></td>';
 			}
 			if(typeof(datas[i].projectname) != "undefined" && datas[i].projectname != null && datas[i].projectname != ""){
-				tableHtml += '<td class="tt-l">'+datas[i].projectname+'</td>';
+				tableHtml += '<td class="tt-l"><div>'+datas[i].projectname+'</div></td>';
 			}else{
-				tableHtml += '<td class="tt-l"></td>';
+				tableHtml += '<td class="tt-l"><div></div></td>';
 			}
 			if(typeof(datas[i].budget) != "undefined" && datas[i].budget != null && datas[i].budget != ""){
 				var budget =parseInt(datas[i].budget)/10000
-				
-				tableHtml += '<td class="tt-r">'+budget+'</td>';
+				if(budget.toString().length>6){
+					if(budget.toString().indexOf(".")==5){
+						budget=budget.toString().substr(0,7)
+					}else{
+						budget=budget.toString().substr(0,6)
+					}
+				}
+				tableHtml += '<td class="tt-r"><div>'+budget+'</div></td>';
 			}else{
-				tableHtml += '<td class="tt-r"></td>';
+				tableHtml += '<td class="tt-r"><div></div></td>';
 			}
 			if(typeof(datas[i].bidopentime) != "undefined" && datas[i].bidopentime != null && datas[i].bidopentime != ""){
 				var diff = formatDate(Number(datas[i].publishtime),"l");
-				tableHtml += '<td>'+diff+'</td>';
+				tableHtml += '<td><div>'+diff+'</div></td>';
 			}else{
-				tableHtml += '<td></td>';
+				tableHtml += '<td><div></div></td>';
 			}
 			if(typeof(datas[i].winner) != "undefined" && datas[i].winner != null && datas[i].winner != ""){
-				tableHtml += '<td class="tt-l">'+datas[i].winner+'</td>';
+				tableHtml += '<td class="tt-l"><div>'+datas[i].winner+'</div></td>';
 			}else{
-				tableHtml += '<td class="tt-l"></td>';
+				tableHtml += '<td class="tt-l"><div></div></td>';
 			}
 			if(typeof(datas[i].bidamount) != "undefined" && datas[i].bidamount != null && datas[i].bidamount != ""){
 				var bidamount = parseInt(datas[i].bidamount)/10000
-				tableHtml += '<td class="tt-r">'+bidamount+'</td>';
+				if(bidamount.toString().length>6){
+					if(bidamount.toString().indexOf(".")==5){
+						bidamount=bidamount.toString().substr(0,7)
+					}else{
+						bidamount=bidamount.toString().substr(0,6)
+					}
+				}
+				tableHtml += '<td class="tt-r"><div>'+bidamount+'</div></td>';
 			}else{
-				tableHtml += '<td class="tt-r"></td>';
+				tableHtml += '<td class="tt-r"><div></div></td>';
 			}
 				tableHtml+='</tr>'
 	}
@@ -302,4 +373,115 @@ function getInputTime(){
 		endtime = "";
 	}
 	return [starttime,endtime]
+}
+///
+function beforeSubmit(){
+	setTimeout(function(){
+		//时间
+		var publishtime = null;
+		var timeslot = getInputTime().join("_");
+		if($(".timerInput").hasClass("active")){
+			if(timeslot != "_"){
+				$("#zbSeatchT [name='publishtime']").val(timeslot);
+			}else{
+				$("#zbSeatchT [name='publishtime']").val("");
+			}
+		}else{
+			publishtime = $(".timer .active").attr("data-value");
+			if(typeof(publishtime) != "undefined"){
+				$("#zbSeatchT [name='publishtime']").val(publishtime);
+			}else{
+				$("#zbSeatchT [name='publishtime']").val("");
+			}
+		}
+		if(timeslot != "_"){
+			$("#zbSeatchT [name='timeslot']").val(timeslot);	
+		}else{
+			$("#zbSeatchT [name='timeslot']").val("");
+		}
+		//地区
+		var selectAreas = "";
+		$(".region-content .active:not(.parent-node)").each(function(){
+			var thisText = $(this).text();
+			if(thisText != "全国"){
+				if(selectAreas != ""){
+					selectAreas += ",";
+				}
+				selectAreas += thisText;
+			}
+		});
+		$("#zbSeatchT [name='area']").val(selectAreas);
+		//类型
+		var selectSubTypes = "";
+		$(".info-content .active:not(.parent-node)").each(function(){
+			if($(this).attr("id") == "whole"||$(this).attr("id") == "infoBtn"){
+				return true;
+			}
+			var thisText = $(this).attr("data-value");
+			if(selectSubTypes != ""){
+				selectSubTypes += ",";
+			}
+			selectSubTypes += thisText;
+		});
+		$("#zbSeatchT [name='subtype']").val(selectSubTypes);
+		//行业
+		var selectIndustrys = "";
+		$(".industry-content .active:not(.parent-node)").each(function(){
+			if($(this).attr("id") == "induAll"){
+				return true;
+			}
+			var thisText = $(this).attr("data-value");
+			if(selectIndustrys != ""){
+				selectIndustrys += ",";
+			}
+			selectIndustrys += thisText;
+		});
+		$("#zbSeatchT [name='industry']").val(selectIndustrys);
+		//价格
+		var selectMinPrices = $(".PriceInput [name='minprice']").val();
+		var selectMaxPrices =  $(".PriceInput [name='maxprice']").val();
+		$("#zbSeatchT [name='minprice']").val(selectMinPrices);
+		$("#zbSeatchT [name='maxprice']").val(selectMaxPrices);
+		//搜索关键词
+		var searchname = $("#zbSeatchT input[name='keywords']").val();
+		$("#zbSeatchT input[name='searchvalue']").val($.trim(searchname))
+		if(submitflag){	
+			if($.trim(searchname)==""){
+				getNewBiddings(1)
+				nbflag = false;
+				console.log(nbflag+"-----")
+			}else{
+				searchOnsubmit();
+				nbflag = true;
+				console.log("2222")
+			}
+			submitflag=false;
+		}	
+		setTimeout(function(){
+			submitflag=true
+		},200);
+		return true
+	},200)
+}
+//
+function searchOnsubmit(){
+	var param = {
+				pageNumber: currentPage,
+				reqType: "bidSearch",
+				searchvalue: $("#zbSeatchT [name='searchvalue']").val(),
+				area: $("#zbSeatchT [name='area']").val(),
+				subtype: $("#zbSeatchT [name='subtype']").val(),
+				publishtime: $("#zbSeatchT [name='publishtime']").val(),
+				selectType : $("#zbSeatchT [name='selectType']").val(),
+				minprice : $("#zbSeatchT [name='minprice']").val(),
+				maxprice : $("#zbSeatchT [name='maxprice']").val(),
+				industry : $("#zbSeatchT [name='industry']").val(),
+			};
+	$.post("/front/pcAjaxReq",param,function(r){
+		if(r.list == null || r.list.length == 0){
+			
+		}else{
+			appendDatas(r.list,true)
+		}
+	});
 }

+ 145 - 109
src/web/templates/pc/biddingsearch_enterprise.html

@@ -1,13 +1,28 @@
-<!doctype html>
-<html lang="zh-cn">
 
+<html lang="zh-cn">
 	<head>
-		<meta charset="UTF-8" />
-		<link rel="stylesheet" type="text/css" href="/css/dev2/reset_pc.css" />
-		<link rel="stylesheet" type="text/css" href="/css/dev2/biddingSearch.css" />
-		<title>招标搜索</title>
+		<title>{{Msg "seo" "qfw.swordfishsl.title"}}</title>
+		<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
+		<meta name="Keywords" content="{{Msg "seo" "qfw.swordfishsl.key"}}"/>
+		<meta name="Description" content="{{Msg "seo" "qfw.swordfishsl.description"}}"/>
+		<meta name="renderer" content="webkit">
+		<meta content="telephone=no" name="format-detection"/>
 		{{include "/common/pnc.html"}}
 		<link href="/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+		<link href="/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+		<link href="/css/dev2/biddingSearch.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+		<link href="/css/dev2/biddingSearch1.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+		<script src="/js/jquery.cookie.js"></script>
+		<script src="/js/jquery-3.2.1.min.js?v={{Msg "seo" "version"}}"></script>
+		<script src="/js/biddingSearch.js?v={{Msg "seo" "version"}}"></script>
+		<script type="text/javascript" src="/js/entsearchscript.js"></script>
+		<script language="javascript" type="text/javascript" src="/My97DatePicker/WdatePicker.js"></script>
+		
+		<style type="text/css">
+			a{
+				text-decoration: none !important;
+			}
+		</style>
 	</head>
 
 	<body>
@@ -23,11 +38,11 @@
 					</div>
 					<!--搜索-->
 					<div class="searchInput clearfix">
-						<form action="" method="" class="clearfix">
-							<input  autocomplete="off" type="search" name="" id="search" value="" placeholder="高速公路" />
+						<form action="" method="post" id="zbSeatchT" class="clearfix" onsubmit="return true">
+							<input class="searchname" autocomplete="off" type="search" name="keywords" id="searchinput" value="" placeholder="高速公路" />
 
-							<input type="submit" value="搜索" />
-							<div class="searchSlideText">
+							<input type="button" value="搜索" />
+							<!--<div class="searchSlideText">
 								<ul>
 									<li>大连<i>万达集团</i>股份有限公司北京投资管理分公司</li>
 									<li>滁州市<i>万达集团</i>公司</li>
@@ -42,7 +57,11 @@
 									<li>大连<i>万达集团</i>股份有限公司天津共享服务分公司</li>
 									<li>大连<i>万达集团</i>股份有限公司北京投资管理分公司</li>
 								</ul>
-							</div>
+							</div>-->
+							<input type="hidden" name="searchvalue" value="{{.T.searchvalue}}">
+							<input type="hidden" name="area" value="{{.T.area}}">
+							<input type="hidden" name="minprice" value="">
+							<input type="hidden" name="maxprice" value="">
 						</form>
 						<!--筛选-->
 						<div id="screenBtn" class="screen up">
@@ -72,12 +91,14 @@
 						</div>
 						<div class="Price-content clearfix">
 							<span class="active">全部</span>
-							<div class="PriceInput">
-								<input type="text" name="" id="" value="" placeholder="最低价              万元" />
-								<span></span>
-								<input type="text" name="" id="" value="" placeholder="最高价              万元" />
+							<div class="pricefat">
+								<div class="PriceInput">
+									<input type="text" name="minprice" id="minprice" value="{{.T.lower}}" placeholder="最低价             万元" />
+									<span></span>
+									<input type="text" name="maxprice" id="maxprice" value="{{.T.upper}}" placeholder="最高价             万元" />
+								</div>
+								<button class="pricebut" style="display:none;">确定</button>
 							</div>
-							<button>确定</button>
 						</div>
 					</div>
 					<!--项目地区-->
@@ -86,7 +107,7 @@
 							项目地区:
 						</div>
 						<div class="region-content">
-							<span id="regionBtn" class=" active">全国</span>
+							<span id="regionBtn" class="active">全国</span>
 							<i class="diver"></i>
 							<font class="parent-node">华北地区</font>
 							<font>北京</font>
@@ -154,81 +175,23 @@
 						<!--全文搜索 列表-->
 						<div class="lucene">
 							<ul>
+								{{range $k,$v:= .T.list}}
 								<li>
 									<div class="liLuceneList">
 										<div class="luce-left">
 											<div class="left-title">
-												<a href="#"> <em>1-1.</em>开封县高速公路建设指挥部高速压坏地方公路建设项目招标公告河南</a>
-											</div>
-										</div>
-										<div class="luce-right">
-											<a href="#">河南</a>
-											<a href="#">中标</a>
-											<a href="#">建筑工程</a>
-											<span>43分钟前</span>
-										</div>
-									</div>
-								</li>
-								<li>
-									<div class="liLuceneList">
-										<div class="luce-left">
-											<div class="left-title">
-												<a href="#"> <em>2.</em>开封县高速公路建设指挥部高速压坏地方公路建设项目招标公告河南</a>
-											</div>
-										</div>
-										<div class="luce-right">
-											<a href="#">河南</a>
-											<a href="#">中标</a>
-											<a href="#">建筑工程</a>
-											<span>43分钟前</span>
-										</div>
-									</div>
-								</li>
-								<li>
-									<div class="liLuceneList">
-										<div class="luce-left">
-											<div class="left-title">
-												<a href="#"> <em>3.</em>开封县高速公路建设指挥部高速压坏地方公路建设项目招标公告河南</a>
-											</div>
-										</div>
-										<div class="luce-right">
-											<a href="#">河南</a>
-											<a href="#">中标</a>
-											<a href="#">建筑工程</a>
-											<span>43分钟前</span>
-										</div>
-									</div>
-								</li>
-								<li>
-									<div class="liLuceneList">
-										<div class="luce-left">
-											<div class="left-title">
-												<a href="#"> <em>4.</em>开封县高速公路建设指挥部高速压坏地方公路建设项目招标公告河南</a>
+												<a href="#"> <em>{{$v.k}}</em>{{$v.projectname}}</a>
 											</div>
 										</div>
 										<div class="luce-right">
-											<a href="#">河南</a>
-											<a href="#">中标</a>
-											<a href="#">建筑工程</a>
-											<span>43分钟前</span>
-										</div>
-									</div>
-								</li>
-								<li>
-									<div class="liLuceneList">
-										<div class="luce-left">
-											<div class="left-title">
-												<a href="#"> <em>5.</em>开封县高速公路建设指挥部高速压坏地方公路建设项目招标公告河南</a>
-											</div>
-										</div>
-										<div class="luce-right">
-											<a href="#">河南</a>
-											<a href="#">中标</a>
-											<a href="#">建筑工程</a>
-											<span>43分钟前</span>
+											<a href="#">{{$v.area}}</a>
+											<a href="#">{{$v.bidtype}}</a>
+											<a href="#">{{$v.industry}}</a>
+											<span>{{$v.time1}}</span>
 										</div>
 									</div>
 								</li>
+								{{end}}
 							</ul>
 						</div>
 						<!--全文搜索 表格-->
@@ -243,30 +206,14 @@
 									</tr>
 								</thead>
 								<tbody>
+								{{range $k,$v:= .T.list}}
 									<tr>
-										<td>1</td>
-										<td>2017-6-15 </td>
-										<td class="tt-l">高速压坏地方公路建设项目</td>
-										<td class="tt-r">1000</td>
-									</tr>
-									<tr>
-										<td>1</td>
-										<td>2017-6-15 </td>
-										<td class="tt-l">高速压坏地方公路建设项目</td>
-										<td class="tt-r">1000</td>
-									</tr>
-									<tr>
-										<td>1</td>
-										<td>2017-6-15 </td>
-										<td class="tt-l">高速压坏地方公路建设项目</td>
-										<td class="tt-r">1000</td>
-									</tr>
-									<tr>
-										<td>1</td>
-										<td>2017-6-15 </td>
-										<td class="tt-l">高速压坏地方公路建设项目</td>
-										<td class="tt-r">1000</td>
+										<td>{{$v.k}}</td>
+										<td>{{$v.time2}} </td>
+										<td class="tt-l">{{$v.projectname}}</td>
+										<td class="tt-r">{{$v.bidamount}}</td>
 									</tr>
+								{{end}}
 								</tbody>
 							</table>
 						</div>
@@ -283,14 +230,103 @@
 				</div>
 			</div>
 			<!--招标搜索页面 END-->
-
-
-
 		</section>
-		<script type="text/javascript" src="/js/jquery-3.2.1.min.js"></script>
-		<script type="text/javascript" src="/js/biddingSearch.js"></script>
+		<script type="text/javascript">
+//			$(function(){
+				//价格
+//				$("#lower").click(function(){
+//					if(!$(".PriceInput").hasClass("price-active")){
+//						$(".PriceInput").addClass("price-active");
+//					}
+//				})
+//				$("#upper").click(function(){
+//					if(!$(".PriceInput").hasClass("price-active")){
+//						$(".PriceInput").addClass("price-active");
+//					}
+//				})
+//				$("#priceBtn").click(function(){
+//					var lower = $("#lower").val();
+//					var upper = $("#upper").val();	
+//				})
+				
+				
+//			)
+		</script>
+
 	{{include "/common/pcbottom.html"}}
 	{{include "/common/baiducc.html"}}
+	<script>
+		var mainList = {{.T.list}};
+		$(function(){
+			haslogin({{.T.logid}});
+			//价格
+			$("#minprice").click(function(){
+				$(".pricebut").show();
+				$(".pricefat").addClass("customtime-active");
+			})
+			$("#maxprice").click(function(){
+				$(".pricebut").show();
+				$(".pricefat").addClass("customtime-active");
+			})
+			$(".Price-content").find("span:first-child").click(function(){
+				$(this).addClass("active");
+				$(".pricefat").removeClass("active");
+			})
+			$(".pricebut").click(function(){
+				var minp = $("#minprice").val();
+				var maxp = $("#maxprice").val();
+				if (minp==""||maxp==""){
+					return false;
+				}
+				if (minp>maxp){
+					$("#minprice").val(maxp);
+					$("#maxprice").val(minp);
+				}
+				$(this).hide();
+				$(".pricefat").addClass("active");
+				$(".Price-content").find("span:first-child").removeClass("active");
+				$(".pricefat").removeClass("customtime-active");
+			})
+			
+			
+			
+			
+//		    for(var i=0;i<mainList.length;i++){
+//		        alert(mainList[i])
+//			}
+
+        });
+		function beforeSubmit(){			
+			//地区
+			var selectAreas = "";
+			$(".region-content .active:not(.parent-node)").each(function(){
+				var thisText = $(this).text();
+				if(thisText != "全国"){
+					if(selectAreas != ""){
+						selectAreas += ",";
+					}
+					selectAreas += thisText;
+				}
+			});
+			$("#zbSeatchT [name='area']").val(selectAreas);
+			
+			//价格
+			var selectMinPrices = $(".PriceInput [name='minprice']").val();
+			var selectMaxPrices =  $(".PriceInput [name='maxprice']").val();
+			$("#zbSeatchT [name='minprice']").val(selectMinPrices);
+			$("#zbSeatchT [name='maxprice']").val(selectMaxPrices);
+			//搜索关键词
+			var searchname = $("#zbSeatchT input[name='keywords']").val();
+			console.log("----"+searchname)
+			$("#zbSeatchT input[name='searchvalue']").val($.trim(searchname))
+			searchOnsubmit();
+			return true
+		}
+//
+function searchOnsubmit(){
+	$("#zbSeatchT").submit();
+}
+	</script>
 	</body>
 
 </html>

+ 45 - 125
src/web/templates/pc/supsearch.html

@@ -112,7 +112,7 @@ $(function(){
 			industryhtml+='<i class="diver"></i>'
 					+'<font class="parent-node ">'+fat+'</font>'
 			for (var j in childlist){
-				industryhtml+='<font>'+childlist[j]+'</font>'
+				industryhtml+='<font data-value="'+fat+'_'+childlist[j]+'">'+childlist[j]+'</font>'
 			}
 		}
 		$(".industry-content").html(industryhtml)
@@ -135,10 +135,10 @@ $(function(){
 			</div>
 			<!--搜索-->
 			<div class="searchInput clearfix">
-				<form action="" method="" class="clearfix">
-					<input class="searchname" autocomplete="off" type="search" name="" id="searchinput" value="" name="keywords" placeholder="高速公路" />
+				<form action="" method="post"  id="zbSeatchT" class="clearfix" onsubmit="return true">
+					<input class="searchname" autocomplete="off" type="search" id="searchinput" value="" name="keywords" placeholder="高速公路" />
 
-					<input type="submit" value="搜索" />
+					<input type="button" value="搜索" />
 <!--					<div class="searchSlideText">
 						<ul>
 							<li>大连<i>万达集团</i>股份有限公司北京投资管理分公司</li>
@@ -155,6 +155,15 @@ $(function(){
 							<li>大连<i>万达集团</i>股份有限公司北京投资管理分公司</li>
 						</ul>
 					</div>-->
+					<input type="hidden" name="searchvalue" value="{{.T.searchvalue}}">
+					<input type="hidden" name="publishtime" value="{{.T.publishtime}}">
+					<input type="hidden" name="timeslot" value="{{.T.timeslot}}">
+					<input type="hidden" name="area" value="{{.T.area}}">
+					<input type="hidden" name="subtype" value="{{.T.subtype}}">
+					<input type="hidden" name="minprice" value="{{.T.minprice}}">
+					<input type="hidden" name="maxprice" value="{{.T.maxprice}}">
+					<input type="hidden" name="industry" value="{{.T.selectIndustry}}">
+					<input type="hidden" name="selectType" value="all">
 				</form>
 				<!--筛选-->
 				<div id="screenBtn" class="screen up">
@@ -208,7 +217,7 @@ $(function(){
 					价格区间:
 				</div>
 				<div class="Price-content clearfix">
-					<span class="active">全部</span>
+					<span id="priceAll" class="active">全部</span>
 					<div class="pricefat">
 						<div class="PriceInput">
 							<input type="text" name="minprice" id="minprice" value="" placeholder="最低价              万元" />
@@ -226,10 +235,10 @@ $(function(){
 				</div>
 				<div class="fl timer">
 					<ul>
-						<li class="active">全部</li>
-						<li>最近七天</li>
-						<li>最近30天</li>
-						<li>去年</li>
+						<li id="timerAll" class="active" data-value="">全部</li>
+						<li data-value="lately-7">最近七天</li>
+						<li data-value="lately-30">最近30天</li>
+						<li data-value="thisyear">去年</li>
 					</ul>
 				</div>
 				<div class="timerInput fl">
@@ -302,30 +311,32 @@ $(function(){
 					<span id="infoBtn" class=" active">全部</span>
 					<i class="diver"></i>
 					<font class="parent-node infoFist">拟建项目</font>
-					<a><img class="q-mark" id="q-mark"  src="/images/biddingSearch/info-icon1.png" alt="" /></a>
+					<font data-value="拟建" class="hidden">拟建</font>
+					<a id="whole"><img class="q-mark" id="q-mark"  src="/images/biddingSearch/info-icon1.png" alt="" /></a>
 					<i class="diver"></i>
 					<font class="parent-node">招标预告</font>
+					<font data-value="预告" class="hidden">预告</font>
 					<i class="diver"></i>
 					<font class="parent-node">招标公告</font>
-					<font>招标</font>
-					<font>邀标</font>
-					<font>询价</font>
-					<font>竞谈</font>
-					<font>单一</font>
-					<font>竞价</font>
-					<font>变更</font>
-					<font>其他</font>
+					<font data-value="招标">招标</font>
+					<font data-value="邀标">邀标</font>
+					<font data-value="询价">询价</font>
+					<font data-value="竞谈">竞谈</font>
+					<font data-value="单一">单一</font>
+					<font data-value="竞价">竞价</font>
+					<font data-value="变更">变更</font>
+					<font data-value="其他">其他</font>
 					<i class="diver"></i>
 					<font class="parent-node">招标结果</font>
-					<font>中标</font>
-					<font>成交</font>
-					<font>废标</font>
-					<font>流标</font>
+					<font data-value="中标">中标</font>
+					<font data-value="成交">成交</font>
+					<font data-value="废标">废标</font>
+					<font data-value="流标">流标</font>
 					<i class="diver"></i>
 					<font class="parent-node">招标信用信息</font>
-					<font>合同</font>
-					<font>验收</font>
-					<font>违规</font>
+					<font data-value="合同">合同</font>
+					<font data-value="验收">验收</font>
+					<font data-value="违规">违规</font>
 				</div>
 				<span class="remind" style="display:none;">
 					<span class="remindone"></span>
@@ -378,58 +389,11 @@ $(function(){
 								<td width="65">预算<br>(万元)</td>
 								<td width="100">开标时间</td>
 								<td width="180">中标单位</td>
-								<td>中标金额(万元)</td>
+								<td>中标金额<br>(万元)</td>
 							</tr>
 						</thead>
 						<tbody>
-							<tr>
-								<td>1-1</td>
-								<td>2017-6-15</td>
-								<td>中标公告</td>
-								<td class="tt-l"><i>高速</i>公路管理处管理处</td>
-								<td class="tt-l"><i>高速</i>压坏地方<i>公路</i>建设项目</td>
-								<td class="tt-r">1000</td>
-								<td>2017-7-15 9:30</td>
-								<td class="tt-l">河南同济路桥工程技术 有限公司
-								</td>
-								<td class="tt-r">1200</td>
-							</tr>
-							<tr>
-								<td>2</td>
-								<td>2017-6-15</td>
-								<td>中标公告</td>
-								<td class="tt-l"><i>高速</i>公路管理处管理处</td>
-								<td class="tt-l"><i>高速</i>压坏地方<i>公路</i>建设项目</td>
-								<td class="tt-r">1000</td>
-								<td>2017-7-15 9:30</td>
-								<td class="tt-l">河南同济路桥工程技术 有限公司
-								</td>
-								<td class="tt-r">1200</td>
-							</tr>
-							<tr>
-								<td>3</td>
-								<td>2017-6-15</td>
-								<td>中标公告</td>
-								<td class="tt-l"><i>高速</i>公路管理处管理处</td>
-								<td class="tt-l"><i>高速</i>压坏地方<i>公路</i>建设项目</td>
-								<td class="tt-r">1000</td>
-								<td>2017-7-15 9:30</td>
-								<td class="tt-l">河南同济路桥工程技术 有限公司
-								</td>
-								<td class="tt-r">1200</td>
-							</tr>
-							<tr>
-								<td>4</td>
-								<td>2017-6-15</td>
-								<td>中标公告</td>
-								<td class="tt-l"><i>高速</i>公路管理处管理处</td>
-								<td class="tt-l"><i>高速</i>压坏地方<i>公路</i>建设项目</td>
-								<td class="tt-r">1000</td>
-								<td>2017-7-15 9:30</td>
-								<td class="tt-l">河南同济路桥工程技术 有限公司
-								</td>
-								<td class="tt-r">1200</td>
-							</tr>
+							
 						</tbody>
 					</table>
 				</div>
@@ -437,13 +401,13 @@ $(function(){
 			<!--tab切换内容-->
 			<div class="tabContainer tabContainer-2" style="display: none;">
 				<!--全文搜索 列表-->
-				<div class="lucene" style="display: none;">
+				<div class="lucene">
 					<ul>
 						
 					</ul>
 				</div>
 				<!--全文搜索 表格-->
-				<div class="lucene-table">
+				<div class="lucene-table" style="display: none;">
 					<table>
 						<thead>
 							<tr>
@@ -455,62 +419,18 @@ $(function(){
 								<td width="65">预算<br>(万元)</td>
 								<td width="100">开标时间</td>
 								<td width="180">中标单位</td>
-								<td>中标金额(万元)</td>
+								<td>中标金额<br>(万元)</td>
 							</tr>
 						</thead>
 						<tbody>
-							<tr>
-								<td>2-1</td>
-								<td>2017-6-15</td>
-								<td>中标公告</td>
-								<td class="tt-l"><i>高速</i>公路管理处管理处</td>
-								<td class="tt-l"><i>高速</i>压坏地方<i>公路</i>建设项目</td>
-								<td class="tt-r">1000</td>
-								<td>2017-7-15 9:30</td>
-								<td class="tt-l">河南同济路桥工程技术 有限公司
-								</td>
-								<td class="tt-r">1200</td>
-							</tr>
-							<tr>
-								<td>2</td>
-								<td>2017-6-15</td>
-								<td>中标公告</td>
-								<td class="tt-l"><i>高速</i>公路管理处管理处</td>
-								<td class="tt-l"><i>高速</i>压坏地方<i>公路</i>建设项目</td>
-								<td class="tt-r">1000</td>
-								<td>2017-7-15 9:30</td>
-								<td class="tt-l">河南同济路桥工程技术 有限公司
-								</td>
-								<td class="tt-r">1200</td>
-							</tr>
-							<tr>
-								<td>3</td>
-								<td>2017-6-15</td>
-								<td>中标公告</td>
-								<td class="tt-l"><i>高速</i>公路管理处管理处</td>
-								<td class="tt-l"><i>高速</i>压坏地方<i>公路</i>建设项目</td>
-								<td class="tt-r">1000</td>
-								<td>2017-7-15 9:30</td>
-								<td class="tt-l">河南同济路桥工程技术 有限公司
-								</td>
-								<td class="tt-r">1200</td>
-							</tr>
-							<tr>
-								<td>4</td>
-								<td>2017-6-15</td>
-								<td>中标公告</td>
-								<td class="tt-l"><i>高速</i>公路管理处管理处</td>
-								<td class="tt-l"><i>高速</i>压坏地方<i>公路</i>建设项目</td>
-								<td class="tt-r">1000</td>
-								<td>2017-7-15 9:30</td>
-								<td class="tt-l">河南同济路桥工程技术 有限公司
-								</td>
-								<td class="tt-r">1200</td>
-							</tr>
+							
 						</tbody>
 					</table>
 				</div>
 			</div>
+			<div class="hasNoData" style="display: none;">
+				<img src="/images/pc_12.png" id="hasNoData">
+			</div>
 		</div>
 		<!--分页-->
 		<div class="pagination clearfix w">