瀏覽代碼

Merge branch 'dev2.0.1' of http://192.168.3.207:10080/qmx/jy into dev2.0.1

wangshan 7 年之前
父節點
當前提交
5cab5b803d
共有 35 個文件被更改,包括 1074 次插入767 次删除
  1. 38 14
      src/jfw/front/supsearch.go
  2. 34 37
      src/jfw/front/swordfish.go
  3. 1 1
      src/jfw/modules/followent/src/seo.json
  4. 18 18
      src/jfw/modules/followent/src/web/staticres/jylab/followent/css/follow.css
  5. 3 0
      src/jfw/modules/followent/src/web/templates/weixin/add.html
  6. 6 10
      src/jfw/modules/followent/src/web/templates/weixin/set.html
  7. 3 2
      src/jfw/modules/push/src/config.json
  8. 2 1
      src/jfw/modules/push/src/qfw/push/cf.go
  9. 10 4
      src/jfw/modules/push/src/qfw/push/dopush/dopushes.go
  10. 1 0
      src/jfw/modules/push/src/qfw/push/weixincall.go
  11. 6 4
      src/jfw/modules/pushent/src/config.json
  12. 2 1
      src/jfw/modules/pushent/src/followpush/followpush.go
  13. 313 165
      src/jfw/modules/pushent/src/followpush/push.go
  14. 1 0
      src/jfw/modules/pushent/src/main.go
  15. 4 2
      src/jfw/modules/pushproject/src/config.json
  16. 2 1
      src/jfw/modules/pushproject/src/followpush/followpush.go
  17. 45 24
      src/jfw/modules/pushproject/src/followpush/push.go
  18. 1 0
      src/jfw/modules/pushproject/src/main.go
  19. 1 1
      src/jfw/modules/weixin/src/config.json
  20. 2 1
      src/jfw/modules/weixin/src/jrpc/jrpc.go
  21. 35 14
      src/web/staticres/css/dev2/biddingSearch.css
  22. 0 27
      src/web/staticres/css/dev2/superSearch.css
  23. 26 2
      src/web/staticres/css/follow.css
  24. 61 0
      src/web/staticres/css/wxsearch.css
  25. 10 0
      src/web/staticres/js/common.js
  26. 24 22
      src/web/staticres/js/proproject.js
  27. 46 36
      src/web/staticres/js/superSearch.js
  28. 0 22
      src/web/staticres/js/wxEntsesearch.js
  29. 54 34
      src/web/staticres/js/wxSupersearch.js
  30. 0 3
      src/web/templates/common/pcbottom.html
  31. 71 67
      src/web/templates/pc/classifylist.html
  32. 51 91
      src/web/templates/pc/proproject.html
  33. 73 64
      src/web/templates/pc/supsearch.html
  34. 13 12
      src/web/templates/weixin/follow/set.html
  35. 117 87
      src/web/templates/weixin/search/mainSearch.html

+ 38 - 14
src/jfw/front/supsearch.go

@@ -7,6 +7,7 @@ import (
 	"math/rand"
 	"qfw/util"
 	"qfw/util/redis"
+	"regexp"
 	"strconv"
 	"strings"
 	"time"
@@ -29,6 +30,7 @@ type Pcsearch struct {
 var industrylist map[string][]string
 var sortArray []string
 var industryname string
+var matchSpace = regexp.MustCompile("\\s+")
 
 //
 func init() {
@@ -45,8 +47,7 @@ func (p *Pcsearch) ProposedProject() error {
 	if len(shareid) == 0 {
 		shareid = fmt.Sprintf("%s%d", config.Seoconfig["jynjxmy"].(string)+fmt.Sprintf("%d", time.Now().UnixNano())[8:14], rand.Intn(9))
 	}
-	keywords := p.GetString("keywords") //关键词
-	searchvalue := FilteKey(p.GetString("searchvalue"))
+	b_word, _, s_word := InterceptSearchKW(p.GetString("keywords"), false, true)
 	area := p.GetString("area")               //地区
 	publishtime := p.GetString("publishtime") //发布时间
 	subtype := p.GetString("subtype")         //信息类型
@@ -56,9 +57,9 @@ func (p *Pcsearch) ProposedProject() error {
 	var totalPage int64
 	var list *[]map[string]interface{}
 	var status = 1
-	if len(searchvalue) > 0 {
+	if len(s_word) > 0 {
 		status = 2
-		_, totalPage, list = getBidSearchData(searchvalue, area, publishtime, subtype, "", "", "", 0, true, "", "")
+		_, totalPage, list = getBidSearchData(s_word, area, publishtime, subtype, "", "", "", 0, true, "", "")
 	} else {
 		p.DisableHttpCache()
 		p.T["list"] = Newbids("nijian")[0]
@@ -89,10 +90,10 @@ func (p *Pcsearch) ProposedProject() error {
 	p.T["publishtime"] = publishtime
 	p.T["timeslot"] = p.GetString("timeslot")
 	p.T["totalPage"] = totalPage
-	p.T["keywords"] = keywords
-	p.T["searchvalue"] = searchvalue
+	p.T["keywords"] = b_word
+	p.T["searchvalue"] = s_word
 	p.T["login"] = p.Session().Get("user")
-	p.SetSession("paramkey", keywords)
+	p.SetSession("paramkey", b_word)
 	if publishtime == "lately-7" {
 		p.SetSession("parampublishtime", "最近7天")
 	} else if publishtime == "lately-30" {
@@ -151,8 +152,6 @@ func (p *Pcsearch) PcSearchIndex() error {
 		}
 	}
 	p.T["supstatus"] = supstatus
-	keywords := p.GetString("keywords") //关键词
-	searchvalue := FilteKey(p.GetString("searchvalue"))
 	area := p.GetString("area")                            //地区
 	publishtime := p.GetString("publishtime")              //发布时间
 	toptype := p.GetString("toptype")                      //信息类型
@@ -169,12 +168,13 @@ func (p *Pcsearch) PcSearchIndex() error {
 	//if selectType == "" {
 	selectType = "title"
 	//}
+	b_word, _, s_word := InterceptSearchKW(p.GetString("keywords"), false, true)
 	var list *[]map[string]interface{}
 	var status = 1
 	var count, totalPage int64
-	if len(searchvalue) > 0 || len(industry) > 0 {
+	if len(s_word) > 0 || len(industry) > 0 {
 		status = 2
-		count, totalPage, list = getBidSearchData(searchvalue, area, publishtime, subtype, industry, minprice, maxprice, 0, true, selectType, "")
+		count, totalPage, list = getBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, 0, true, selectType, "")
 	} else {
 		p.DisableHttpCache()
 		p.T["list"] = Newbids("")[0]
@@ -206,8 +206,8 @@ func (p *Pcsearch) PcSearchIndex() error {
 	p.T["timeslot"] = p.GetString("timeslot")
 	p.T["toptype"] = toptype
 	p.T["subtype"] = subtype
-	p.T["keywords"] = keywords
-	p.T["searchvalue"] = searchvalue
+	p.T["keywords"] = b_word
+	p.T["searchvalue"] = s_word
 	p.T["selectType"] = selectType
 	p.T["industry"] = industry
 	p.T["minprice"] = minprice
@@ -215,7 +215,7 @@ func (p *Pcsearch) PcSearchIndex() error {
 	p.T["login"] = p.Session().Get("user")
 	p.T["totalPage"] = totalPage
 	p.T["count"] = count
-	p.SetSession("paramkey", keywords)
+	p.SetSession("paramkey", b_word)
 	if publishtime == "lately-7" {
 		p.SetSession("parampublishtime", "最近7天")
 	} else if publishtime == "lately-30" {
@@ -349,3 +349,27 @@ func (p *Pcsearch) Qr(t string) error {
 	_, err := w.Write(pngdat)
 	return err
 }
+
+//超过20个字,截断
+//返回截取后的字符串和截取掉中的前3个字
+func InterceptSearchKW(word string, isIntercept, isFilter bool) (b_word, a_word, s_word string) {
+	if isFilter {
+		word = FilteKey(word)
+	}
+	word = matchSpace.ReplaceAllString(strings.TrimSpace(word), " ")
+	words := []rune(word)
+	if len(words) > 20 && isIntercept {
+		b_word = string(words[:20])
+		b_word = strings.TrimSpace(b_word)
+		if len(words) > 23 {
+			a_word = string(words[20:23])
+		} else {
+			a_word = string(words[20:])
+		}
+	} else {
+		b_word = word
+	}
+	a_word = strings.TrimSpace(a_word)
+	s_word = matchSpace.ReplaceAllString(b_word, "+")
+	return
+}

+ 34 - 37
src/jfw/front/swordfish.go

@@ -492,7 +492,6 @@ func (m *Front) PcAjaxReq() {
 	start := (currentPage - 1) * pc_pageSize
 	area := m.GetString("area")
 	subtype := m.GetString("subtype")
-	searchvalue := FilteKey(m.GetString("searchvalue"))
 	publishtime := m.GetString("publishtime")
 	selectType := m.GetString("selectType")
 	industry := strings.TrimSpace(m.GetString("industry"))
@@ -502,20 +501,21 @@ func (m *Front) PcAjaxReq() {
 	if selectType == "" {
 		selectType = "all"
 	}
+	_, a_word, s_word := InterceptSearchKW(m.GetString("searchvalue"), selectType == "all", true)
 	var list *[]map[string]interface{}
 	var count, totalPage int64
 	status, _ := m.GetInteger("status")
-	if len(searchvalue) > 0 || len(industry) > 0 {
+	if len(s_word) > 0 || len(industry) > 0 {
 		if reqType == "filter" {
 			if status == 1 {
-				count, totalPage, list = getBidSearchData(searchvalue, area, publishtime, subtype, industry, minprice, maxprice, 0, true, selectType, tabularflag)
+				count, totalPage, list = getBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, 0, true, selectType, tabularflag)
 			} else if status == 2 {
 				//count, list = getLastNewsData(searchvalue, area, publishtime, subtype, industry, minprice, maxprice, tabularflag, 0, true, true)
 			}
 		} else if reqType == "bidSearch" {
-			count, totalPage, list = getBidSearchData(searchvalue, area, publishtime, subtype, industry, minprice, maxprice, start, true, selectType, tabularflag)
+			count, totalPage, list = getBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, start, true, selectType, tabularflag)
 		} else if reqType == "lastNews" {
-			_, list = getLastNewsData(searchvalue, area, publishtime, subtype, industry, minprice, maxprice, tabularflag, start, false, true)
+			_, list = getLastNewsData(s_word, area, publishtime, subtype, industry, minprice, maxprice, tabularflag, start, false, true)
 		}
 	}
 	if list != nil && len(*list) > 0 {
@@ -541,9 +541,11 @@ func (m *Front) PcAjaxReq() {
 		}
 	}
 	m.ServeJson(map[string]interface{}{
-		"list":      list,
-		"count":     count,
-		"totalPage": totalPage,
+		"list":          list,
+		"count":         count,
+		"totalPage":     totalPage,
+		"interceptWord": a_word,
+		"searchvalue":   s_word,
 	})
 }
 
@@ -843,8 +845,7 @@ func (m *Front) Wxsearch() error {
 //剑鱼微信查询结果页面
 func (m *Front) Wxsearchlist() error {
 	defer util.Catch()
-	keywords := m.GetString("searchname")
-	searchvalue := m.GetString("searchvalue")
+	keywords := strings.TrimSpace(m.GetString("searchname"))
 	toptype := m.GetString("toptype")
 	subtype := m.GetString("subtype")
 	industry := strings.TrimSpace(m.GetString("industry"))
@@ -862,13 +863,13 @@ func (m *Front) Wxsearchlist() error {
 	m.SetSession("scope", scope)
 	m.SetSession("publishtime", publishtime)
 	var list *[]map[string]interface{}
+	var s_word string
 	if userid := m.GetSession("userId"); userid != nil {
 		if len(keywords) > 0 {
 			if selectType == "" { //默认设置为全文搜索
 				selectType = "all"
 			}
-			list = getWxsearchlistData(keywords, searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, 1, selectType, bidSearch_field)
-
+			list, _, _, s_word = getWxsearchlistData(keywords, scope, publishtime, subtype, industry, minprice, maxprice, 1, selectType, bidSearch_field)
 			r := redis.GetStr("other", "s_"+userid.(string))
 			arrs := strings.Split(r, ",")
 			if r == "" {
@@ -894,7 +895,7 @@ func (m *Front) Wxsearchlist() error {
 	m.T["list"] = list
 	m.T["pageSize"] = wx_pageSize
 	m.T["keywords"] = keywords
-	m.T["searchvalue"] = searchvalue
+	m.T["searchvalue"] = s_word
 	m.T["toptype"] = toptype
 	m.T["subtype"] = subtype
 	m.T["scope"] = scope
@@ -923,21 +924,21 @@ func (m *Front) WxsearchlistPaging() {
 		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, ",")
-		searchvalue := strings.Trim(m.GetString("searchvalue"), " ")
+		searchvalue := strings.TrimSpace(m.GetString("searchvalue"))
+		var b_word, a_word string
 		if searchvalue != "" {
-			searchname := strings.Replace(strings.Replace(searchvalue, " ", "+", -1), "++", "+", -1)
+			selectType := m.GetString("selectType")
 			subtype := m.GetString("subtype")
 			scope := m.GetString("scope")
 			publishtime := m.GetString("publishtime")
-			selectType := m.GetString("selectType")
 			industry := strings.TrimSpace(m.GetString("industry"))
 			m.SetSession("industry", industry)
 			minprice := m.GetString("minprice")
 			maxprice := m.GetString("maxprice")
 			if open_supersearch {
-				list = getWxsearchlistData(searchvalue, searchname, scope, publishtime, subtype, industry, minprice, maxprice, pageNum, selectType, bidSearch_field)
+				list, b_word, a_word, _ = getWxsearchlistData(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, pageNum, selectType, bidSearch_field)
 			} else {
-				list = getWxsearchlistData(searchvalue, searchname, scope, publishtime, subtype, "", "", "", pageNum, selectType, bidSearch_field)
+				list, b_word, a_word, _ = getWxsearchlistData(searchvalue, scope, publishtime, subtype, "", "", "", pageNum, selectType, bidSearch_field)
 			}
 			//新增历史记录
 			if history == "" {
@@ -970,10 +971,12 @@ func (m *Front) WxsearchlistPaging() {
 			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"],
+			"list":          list,
+			"hasNextPage":   list != nil && len(*list) == wx_pageSize && pageNum < wx_maxPageNum,
+			"history":       m.T["history"],
+			"msgset":        m.T["msgset"],
+			"interceptWord": a_word,
+			"keyWord":       b_word,
 		})
 	}
 }
@@ -994,22 +997,16 @@ func (m *Front) DelWxHistorySearch() {
 }
 
 //微信端搜索
-func getWxsearchlistData(keywords, searchvalue, scope, publishtime, subtype, industry, minprice, maxprice string, pageNum int, selectType, field string) (list *[]map[string]interface{}) {
-	//scope是地区对应传进的areas, stype是类型对应scope
-	if len(industry) > 0 {
-		keywords = strings.TrimSpace(keywords)
-	} else {
-		keywords = FilteKey(keywords)
-	}
-	if len(keywords) == 0 {
-		return list
+func getWxsearchlistData(keywords, scope, publishtime, subtype, industry, minprice, maxprice string, pageNum int, selectType, field string) (list *[]map[string]interface{}, b_word, a_word, s_word string) {
+	b_word, a_word, s_word = InterceptSearchKW(keywords, selectType == "all", len(industry) == 0)
+	if len(b_word) == 0 {
+		return list, b_word, a_word, s_word
 	}
-	fmt.Print("keywords>>>", keywords, "searchvalue>>", searchvalue)
 	findfields := `"title"`
 	if selectType == "all" {
 		findfields = `"title","detail"`
 	}
-	qstr := getSearchQuery(searchvalue, industry, minprice, maxprice, findfields, getBidSearchQuery(scope, publishtime, subtype))
+	qstr := getSearchQuery(s_word, industry, minprice, maxprice, findfields, getBidSearchQuery(scope, publishtime, subtype))
 	if selectType == "all" { //全文搜索
 		list = elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, field, (pageNum-1)*wx_pageSize, wx_pageSize, 100, true)
 	} else { //标题搜索
@@ -1022,7 +1019,7 @@ func getWxsearchlistData(keywords, searchvalue, scope, publishtime, subtype, ind
 			v["_id"] = util.EncodeArticleId2ByCheck(util.ObjToString(v["_id"]))
 		}
 	}
-	return list
+	return list, b_word, a_word, s_word
 }
 
 //查看原文跳转
@@ -1847,7 +1844,7 @@ func searhWebContentblog(querymap map[string]string) (*[]map[string]interface{},
 	    "bool": {
 			"must":[{"term":{"s_contenttype":"` + contentType + `"}}],
 	      	"should": [` + str + `],
-	      	"minimum_should_match": 1
+	      	"minimum_should_match": 0
 	    }
 	  }}`
 	var query = tempQuery[:len(tempQuery)-1] +
@@ -1899,7 +1896,7 @@ func searhWebContentblog(querymap map[string]string) (*[]map[string]interface{},
 			res[i]["l_createdate"] = util.TimeDiff(time.Unix(util.Int64All(tmpdate.(float64)), 0))
 			tmpdate1, _ := res[i]["releasetime"]
 			res[i]["releasetime"] = util.TimeDiff(time.Unix(util.Int64All(tmpdate1.(float64)), 0))
-			res[i]["_id"] = se.EncodeString(res[i]["_id"].(string))
+			res[i]["_id"] = se.EncodeString(hit.Id)
 			res[i]["s_pic"] = config.Seoconfig["jyadd"].(string) + res[i]["s_pic"].(string)
 			res[i]["s_pic1"] = config.Seoconfig["jyadd"].(string) + res[i]["s_pic1"].(string)
 		}
@@ -2170,7 +2167,7 @@ func (f *Front) SearchResult(at, name string) error {
 		} else if industry != "" {
 			query1 += `{"term":{"industry":"` + industry + `"}}`
 		}
-		query1 += `],"should": [],"minimum_should_match": 1}}}`
+		query1 += `],"should": [],"minimum_should_match": 0}}}`
 		query := getLastNewsQuery(area, "", stype, industry)
 		var datas *[]map[string]interface{}
 		if list == nil {

+ 1 - 1
src/jfw/modules/followent/src/seo.json

@@ -265,7 +265,7 @@
 	},
 	"jyadd":"http://127.0.0.1",
 	"limitcount":20,
-	"ZBADDRESS":"http://ws.jy.com",
+	"ZBADDRESS":"http://webwcj.qmx.top",
 	"jysy":"10",
 	"jydyy":"11",
 	"jysslby":"12",

+ 18 - 18
src/jfw/modules/followent/src/web/staticres/jylab/followent/css/follow.css

@@ -118,6 +118,7 @@
 .setpage ul{
 	padding-left: 10px;
 	padding-right: 10px;
+	padding-top: 55px;
 }
 .setpage li{
 	position: relative;
@@ -426,35 +427,34 @@
 }
 .qy-followcancel{
 	background-color: #FE737A;
-    color: #FFFFFF;
-    line-height: 45px;
-    margin-left: 15px;
-    margin-right: 15px;
-    border-radius: 3px;
-    font-size: 18px;
-    margin-top: 20px;
-    text-align: center;
-	margin-bottom: 20px;
-
 }
 .gz-followcancel{
 	background-color: #2cb7ca;
+}
+.com-followcancel{
+	position: absolute;
     color: #FFFFFF;
-    line-height: 45px;
-    margin-left: 15px;
-    margin-right: 15px;
     border-radius: 3px;
-    font-size: 18px;
-    margin-top: 20px;
-    text-align: center;
-	margin-bottom: 20px;
+	top: 50%;
+	right: 10px;
+	margin-top: -15px;
+	width: 78px;
+	height: 30px;
+	line-height: 30px;
+	text-align: center;
+	font-weight: normal;
 }
 .setpage .noticehead{
 	background-color: #F8F8F8;	
 	border-bottom: 1px solid #ddd;
-	padding:10px;
+	padding: 15px 95px 15px 10px;
 	line-height: 24px;
 	font-weight: 600;
+	position: fixed;
+	top: 0px;
+	left: 0px;
+	right: 0px;
+	z-index: 1;
 }
 .setpage .noticenew{
     padding: 1px 2px 2px 3px;

+ 3 - 0
src/jfw/modules/followent/src/web/templates/weixin/add.html

@@ -39,6 +39,9 @@
 		line-height: 35px;
 		font-size: 13px;
 	}
+	.rec:last-child{
+		border-bottom-width: 0px;
+	}
 .highLight{
     color: #2cb7ca;
 }

+ 6 - 10
src/jfw/modules/followent/src/web/templates/weixin/set.html

@@ -35,7 +35,7 @@ if(sessionStorage){
 				window.location.reload(true);
 			}
 	    });
-		
+		$(".qyxx").css("padding-top",$(".noticehead").outerHeight());
 		//解决样式回显问题
 		$.post(
 			"/jylab/followent/ajaxSearch",
@@ -59,7 +59,6 @@ if(sessionStorage){
 		//}
 		
 		var easyPopup = new EasyPopup("easypopup");
-		$(".noticehead").html(winner);
 		if(data.length > 0){
 			for(var i = 0; i < data.length; i++){
 				var noticetime = '';
@@ -212,9 +211,12 @@ function myRedirect(zbadd,link,sid){
 </script>
 </head>
 <body class="setpage">
-	<div class="noticehead"></div>
+	<div class="noticehead">
+		{{.T.winner}}
+		<div class="com-followcancel qy-followcancel hidden">取消关注</div>
+		<div class="com-followcancel gz-followcancel hidden">关注</div>
+	</div>
 	<ul class="qyxx">
-		<li id="notice">企业最新信息</li>
 		<li class="jynotice">	
 		</li>
 	</ul>
@@ -222,12 +224,6 @@ function myRedirect(zbadd,link,sid){
 		<img src="/jylab/followent/images/wx/nullxx.png" style="margin-top:80px;width:150px;"/>
 		<div style="margin-top:38px">该企业暂时没有招投标信息</div>
 	</div>
-	<div class="qy-followcancel hidden">
-		取消企业关注
-	</div>
-	<div class="gz-followcancel hidden">
-		关注此企业
-	</div>
 	<div class="easypopup" id="easypopup">
 		<div class="easypopup-main" style="margin-top: -77.5px;">
 			<div class="easypopup-header">提示信息</div>

+ 3 - 2
src/jfw/modules/push/src/config.json

@@ -1,10 +1,10 @@
 {
-    "StartTime": "2017-09-19 13:40:02",
+    "StartTime": "",
     "bidViewDomain": "https://wblmjy.qmx.top",
     "durationMinutes": 10,
     "elasticPoolSize": 10,
     "elasticsearch": "http://192.168.3.18:9200",
-    "lastid": "59c0adb2f0c367251336c5ff",
+    "lastid": "",
     "mail_content": "\u003ctr\u003e\u003ctd\u003e\u003cnum\u003e%d\u003c/num\u003e\u003c/td\u003e\u003ctd\u003e\u003cdiv class='tit'\u003e\u003ca style='color: #000;text-decoration: none;' href='%s?mail' \u003e%s\u003c/a\u003e\u003c/div\u003e\u003c/td\u003e\u003ctd style='float: right;' class='infos' \u003e\u003cspan class='%s'\u003e%s\u003c/span\u003e\u003cspan class='%s'\u003e%s\u003c/span\u003e\u003cspan class='%s'\u003e%s\u003c/span\u003e\u003cspan class='time'\u003e%s\u003c/span\u003e\u003c/td\u003e\u003c/tr\u003e",
     "mail_html": "\u003cbody\u003e\u003cstyle\u003e *,body,html{margin:0;padding:0;font-family: tahoma, arial, 'Hiragino Sans GB', 'Microsoft YaHei', 宋体, sans-serif;font-size:16px; }#all{margin:0 auto;width:1024px;overflow:hidden;}.head{margin:5x;margin-top:20px;}.des{padding-bottom:15px;border-bottom:1px solid #e8ecee;color: #686868;}td a:hover {color: #fe7379;text-decoration: underline;} .tit{width:560px;overflow: hidden;    white-space: nowrap;text-overflow: ellipsis;}.area {background-color: #2cb7ca;border-radius: 3px;color: #fff;padding: 1px 2px;}.type {background-color: #ffba00;border-radius: 3px;color: #fff;padding: 1px 2px;margin-left:5px;}.industry {background-color: #25c78c;border-radius: 3px;color: #fff;padding: 1px 2px;margin-left:5px;}.infos span{display:inline-block;margin-left:5px;}td{padding-top:8px;padding-bottom:8px;height:20px;line-height:20px;}num{padding:0 5px 0 0; font-size:16px;color:#2cb7ca;font-weight:bolder;}.keys{color:blue;} \u003c/style\u003e\u003cdiv id='all'\u003e\u003cdiv class='head'\u003e\u003cIMG width='100px' src=http://www.zhaobiao.info/images/swordfish/sf_01.png /\u003e\u003c/div\u003e\u003cdiv class='head des'\u003e根据您设置的关键词 :\u003cspan class='keys'\u003e%s\u003c/span\u003e,剑鱼为您推送30天之内的信息。点击标题可查看详情信息\u003c/div\u003e\u003ctable cellpadding='0' cellspacing='0'\u003e%s\u003c/table\u003e\u003c/div\u003e \u003c/body\u003e",
     "mail_title": "您有新的%s信息-剑鱼招标订阅",
@@ -62,5 +62,6 @@
     "wxcontent": "剑鱼推送",
     "wxgroup": "%s信息",
     "wxtitle": "您有新的%s信息!",
+	"wxcolor": "#2cb7ca",
 	"maxSearch":10000
 }

+ 2 - 1
src/jfw/modules/push/src/qfw/push/cf.go

@@ -11,7 +11,7 @@ var se util.SimpleEncrypt
 var Re *regexp.Regexp
 var MAXLen = 200
 var TitleLen, ContentLen, GroupLen int
-var WxTitle, WxContent, WxGroup string
+var WxTitle, WxContent, WxColor, WxGroup string
 var GmailMap *mail.GmailAuth
 var Domain = ""
 var (
@@ -30,6 +30,7 @@ func Inits() {
 	WxTitle = util.ObjToString(PushConfig["wxtitle"])
 	//正文
 	WxContent = util.ObjToString(PushConfig["wxcontent"])
+	WxColor = util.ObjToString(PushConfig["wxcolor"])
 	//信息类型
 	WxGroup = util.ObjToString(PushConfig["wxgroup"])
 	se = util.SimpleEncrypt{Key: "topnet"}

+ 10 - 4
src/jfw/modules/push/src/qfw/push/dopush/dopushes.go

@@ -26,10 +26,10 @@ const (
 	DB             = "bidding"
 	IDRange        = `{"range":{"id":{"gt":"%s","lte":"%s"}}},{"range":{"publishtime":{"gt": %d}}}`
 	TimeRange      = `{"range":{"comeintime":{"gte":%d,"lte":%d}}}`
-	MaxId          = `{"query":{"filtered":{"filter":{"bool":{"must":{"range":{"id":{"gt":"%s"}}}}}}},"_source":["_id","comeintime"],"sort":{"id":"desc"},"from":0,"size":1}`
+	MaxId          = `{"query":{"bool":{"filter":{"range":{"id":{"gt":"%s"}}}}},"_source":["_id","comeintime"],"sort":{"id":"desc"},"from":0,"size":1}`
 	PushTitle      = `[<span class='area'>%s</span>]%s`
 	Infoformat     = `{"term":{"infoformat":%d}}`
-	FilterQuery    = `{"query": {"filtered": {"filter": {"bool": {"must": [%s]}}}}}`
+	FilterQuery    = `{"query": {"bool": {"filter": [%s]}}}`
 )
 
 var (
@@ -83,14 +83,20 @@ func PushInfoByEs(MaxPushSize int, Config *map[string]interface{}, i_ratemode in
 	log.Println("开始执行任务-i_ratemode-id-lasttime:", i_ratemode, _id, lastTime)
 	Now := time.Now()
 	//获取本次查询的最大id
-	resId := elastic.Get(DB, DB, fmt.Sprintf(MaxId, _id))
+	idQuery := ""
+	if _id == "" {
+		idQuery = strings.Replace(fmt.Sprintf(MaxId, _id), `"gt"`, `"gte"`, -1)
+	} else {
+		idQuery = fmt.Sprintf(MaxId, _id)
+	}
+	resId := elastic.Get(DB, DB, idQuery)
 	lastid := ""
 	var comeintime interface{}
 	if resId != nil && *resId != nil && len(*resId) == 1 {
 		lastid = util.ObjToString((*resId)[0]["_id"])
 		comeintime = (*resId)[0]["comeintime"]
 	} else {
-		log.Println("获取本次查询的最大id的时候,未查找到数据...", fmt.Sprintf(MaxId, _id))
+		log.Println("获取本次查询的最大id的时候,未查找到数据...", idQuery)
 		return false
 	}
 	a_p, s_p := InitUserCache(i_ratemode)

+ 1 - 0
src/jfw/modules/push/src/qfw/push/weixincall.go

@@ -31,6 +31,7 @@ func SendWeiXinNew(k *MemberInterest, str string, Remarks string, o_pushinfo map
 			Detail:  WxContent,
 			Date:    "",
 			Service: fmt.Sprintf(WxGroup, infoTypeName),
+			Color:   WxColor,
 			Url:     Domain + "/front/sess/" + se.EncodeString(k.Openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",wxpushlist") + "__" + wid,
 		}
 		client, err := rpc.DialHTTP("tcp", PushConfig["weixinRpcServer"].(string))

+ 6 - 4
src/jfw/modules/pushent/src/config.json

@@ -2,15 +2,17 @@
     "durationMinutes": "3",
     "elasticPoolSize": 30,
     "elasticsearch": "http://192.168.3.18:9200",
-    "lastid": "596f21935d11e1c7455ddc7f",
+    "lastid": "",
     "mongodbName": "qfw",
     "mongodbPoolSize": "20",
     "mongodbServers": "192.168.3.18:27080",
     "redisServers": "sso=192.168.3.14:1379,other=192.168.3.14:1379,push=192.168.3.14:3379",
     "rpcPort": "8759",
-    "viewDomain": "192.168.3.78",
-    "weixinRpcServer": "123.56.103.12:8202",
+    "viewDomain": "http://webwcj.qmx.top",
+    "weixinRpcServer": "127.0.0.1:8083",
     "wxcontent": "剑鱼推送",
     "wxgroup": "关注企业",
-    "wxtitle": "您关注的企业“%s”有新的公告信息!"
+    "wxtitle": "您关注的企业“%s”有新的公告信息!",
+	"wxcolor": "#25c78c",
+	"maxSearch": 10000
 }

+ 2 - 1
src/jfw/modules/pushent/src/followpush/followpush.go

@@ -14,7 +14,7 @@ const (
 
 //每次推前构建用户关注内存结构 项目名称和项目代码对应 用户组
 var Setting map[string]*[]*map[string]interface{}
-var WxTitle, WxContent, WxGroup, ViewDomain string
+var WxTitle, WxContent, WxGroup, WxColor, ViewDomain string
 var Lock = sync.Mutex{}
 
 //加密串
@@ -28,6 +28,7 @@ func init() {
 	WxTitle = util.ObjToString(Sysconfig["wxtitle"])
 	WxContent = util.ObjToString(Sysconfig["wxcontent"])
 	WxGroup = util.ObjToString(Sysconfig["wxgroup"])
+	WxColor = util.ObjToString(Sysconfig["wxcolor"])
 	ViewDomain = util.ObjToString(Sysconfig["viewDomain"])
 	LastLen = 200 - len([]rune(WxContent)) - len([]rune(WxGroup))
 }

+ 313 - 165
src/jfw/modules/pushent/src/followpush/push.go

@@ -20,27 +20,51 @@ import (
 )
 
 var (
-	MaxId     = `{"query":{"filtered":{"filter":{"bool":{"must":{"range":{"id":{"gt":"%s"}}}}}}},"_source":["_id","comeintime"],"sort":{"id":"desc"},"from":0,"size":1}`
-	Query     = `{ "query": { "bool": { "must": [%s], "should": [%s], "minimum_should_match": 1 } }, "_source": [ "_id","title","publishtime","area","type","toptype","subtype","winner","href","infoformat" ], "sort": [ { "publishtime": "desc" } ], "from": 0, "size": 50 }`
-	IDRange   = `{"range":{"id":{"gt":"%s","lte":"%s"}}}`
-	TERM      = `{"term":{"%s":"%s"}}`
-	DB        = "bidding"
-	KEEPCOUNT = 100
+	MaxId             = `{"query":{"bool":{"filter":{"range":{"id":{"gt":"%s"}}}}},"_source":["_id","comeintime"],"sort":{"id":"desc"},"from":0,"size":1}`
+	Query             = `{ "query": { "bool": { "must": [%s], "should": [%s], "minimum_should_match": 1 } }, "_source": [ %s ], "sort": [ %s ], "from": 0, "size": 50 }`
+	FilterQuery       = `{"query": {"bool": {"filter": [%s]}}}`
+	IDRange           = `{"range":{"id":{"gt":"%s","lte":"%s"}}}`
+	TERM              = `{"term":{"%s":"%s"}}`
+	SortQuery         = `{"publishtime":"desc"}`
+	ShowField         = `"_id","title","publishtime","area","type","toptype","subtype","winner","href","infoformat"`
+	DB                = "bidding"
+	KEEPCOUNT         = 100
+	MaxSearch         = 10000 //缓存中总共加载这么多条
+	OnceMax           = 400   //ES一次查询这么多条
+	searchpool        = make(chan bool, 8)
+	pushpool          = make(chan bool, 50)
+	findpool          = make(chan bool, 10)
+	eachpool          = make(chan bool, 100)
+	Pushlock          = sync.Mutex{}
+	searchWaitGroup   = &sync.WaitGroup{}
+	eachInfoWaitGroup = &sync.WaitGroup{}
 )
 
+type PushUser struct {
+	Id      interface{}
+	OpenId  string
+	EntName string
+	Title   string
+}
+
 //开始推送
 func pushByEs(_id string) bool {
 	defer util.Catch()
-	resId := elastic.Get(DB, DB, fmt.Sprintf(MaxId, _id))
+	idQuery := ""
+	if _id == "" {
+		idQuery = strings.Replace(fmt.Sprintf(MaxId, _id), `"gt"`, `"gte"`, -1)
+	} else {
+		idQuery = fmt.Sprintf(MaxId, _id)
+	}
+	resId := elastic.Get(DB, DB, idQuery)
 	lastid := ""
 	log.Println("push-lastid", _id, resId)
 	if resId != nil && *resId != nil && len(*resId) == 1 {
 		lastid = util.ObjToString((*resId)[0]["_id"])
 	} else {
-		log.Println("未查找到数据...", fmt.Sprintf(MaxId, _id))
+		log.Println("未查找到数据...", idQuery)
 		return false
 	}
-	idrange := fmt.Sprintf(IDRange, _id, lastid)
 	sess := tools.MQFW.GetMgoConn()
 	defer tools.MQFW.DestoryMongoConn(sess)
 	cur := sess.DB(tools.MQFW.DbName).C(FOLLOW_COLLECTION).Find(&map[string]interface{}{
@@ -57,23 +81,139 @@ func pushByEs(_id string) bool {
 		"_id":       1,
 	}).Iter()
 	j := 0
-	for tmp := make(map[string]interface{}); cur.Next(tmp); j++ {
-		util.Try(func() {
-			entname := util.ObjToString(tmp["s_entname"])
-			openid := util.ObjToString(tmp["s_openid"])
-			go FindData(tmp["_id"], util.ObjToString(tmp["s_title"]), entname, openid, idrange, true, true)
-		}, func(e interface{}) {
-			log.Println(e)
+	users := []*PushUser{}
+	for tmp := make(map[string]interface{}); cur.Next(tmp); {
+		entname := util.ObjToString(tmp["s_entname"])
+		openid := util.ObjToString(tmp["s_openid"])
+		if strings.TrimSpace(entname) == "" || strings.TrimSpace(openid) == "" {
+			continue
+		}
+		j++
+		users = append(users, &PushUser{
+			OpenId:  openid,
+			Id:      tmp["_id"],
+			Title:   util.ObjToString(tmp["s_title"]),
+			EntName: entname,
 		})
 		tmp = make(map[string]interface{})
 	}
-	log.Println("push-over,user-count:", j)
+	if len(users) == 0 {
+		log.Println("未查找到需要推送的用户...")
+		return false
+	}
+	initFlag, res := InitBiddingCache(_id, lastid)
+	if !initFlag {
+		log.Println("加载数据到内存中的时候,未查找到数据...")
+		return false
+	}
+	//遍历数据,挂到用户身上
+	userMap := EachAllBidInfo(&users, res)
+	//遍历用户,推送
+	for k, v := range *userMap {
+		pushpool <- true
+		func(tmp *[]map[string]interface{}) {
+			defer func() {
+				<-pushpool
+			}()
+			push(k.Id, k.EntName, k.Title, k.OpenId, v, true, true)
+		}(v)
+	}
+	log.Println("push-over")
 	Sysconfig["lastid"] = lastid
 	return true
 }
 
-var findpool = make(chan bool, 10)
-var Pushlock = sync.Mutex{}
+//遍历数据并执行推送操作
+func EachAllBidInfo(users *[]*PushUser, res *[]map[string]interface{}) *map[*PushUser]*[]map[string]interface{} {
+	var count int
+	userMap := map[*PushUser]*[]map[string]interface{}{}
+	for _, v := range *res {
+		eachpool <- true
+		eachInfoWaitGroup.Add(1)
+		count++
+		func(tmp map[string]interface{}) {
+			defer func() {
+				eachInfoWaitGroup.Done()
+				<-eachpool
+			}()
+			winner := util.ObjToString(tmp["winner"])
+			for _, user := range *users {
+				if winner != user.EntName {
+					continue
+				}
+				s := userMap[user]
+				if s == nil {
+					s = &[]map[string]interface{}{}
+					userMap[user] = s
+				}
+				*s = append(*s, tmp)
+				if len(*s) >= 50 {
+					break
+				}
+			}
+		}(v)
+		if count%500 == 0 {
+			log.Println("当前信息索引:", count)
+		}
+	}
+	eachInfoWaitGroup.Wait()
+	log.Println("数据遍历完成!")
+	return &userMap
+}
+
+//加载数据到内存中
+func InitBiddingCache(_id, lastid string) (bool, *[]map[string]interface{}) {
+	//filter全局查询
+	c_query := fmt.Sprintf(FilterQuery, fmt.Sprintf(IDRange, _id, lastid))
+	log.Println("es query:", c_query)
+	//testquery := `{"terms":{"_id":["59cefaa12cf26913ca07fd56"]}}`
+	//testquery := ``
+	//c_query = fmt.Sprintf(FilterQuery, testquery)
+	var res []map[string]interface{}
+	count := int(elastic.Count(DB, DB, c_query))
+	log.Println("本次推送共查到数据", count, "条")
+	if count == 0 {
+		return false, &res
+	}
+	if count > MaxSearch {
+		count = MaxSearch
+		log.Println("目前数据多于", MaxSearch, ",只加载了", MaxSearch, "条!")
+	}
+	if OnceMax > count {
+		OnceMax = count
+	}
+	totalPage := int((count + OnceMax - 1) / OnceMax)
+	log.Println("数据一共", totalPage, "页!")
+	//如果res长度和cout相差5条,重试
+	for t := 1; t <= 3; t++ {
+		res = []map[string]interface{}{}
+		for i := 0; i < totalPage; i++ {
+			searchpool <- true
+			searchWaitGroup.Add(1)
+			go func(start int) {
+				defer func() {
+					searchWaitGroup.Done()
+					<-searchpool
+				}()
+				r := elastic.GetAllByNgram(DB, DB, c_query, "", SortQuery, ShowField, start*OnceMax, OnceMax, 0, false)
+				res = append(res, *r...)
+				log.Println("第", start+1, "页数据加载完成!")
+			}(i)
+		}
+		searchWaitGroup.Wait()
+		if len(res) >= count-5 {
+			break
+		}
+		log.Println("第", t, "次加载数据完成,数据总数", len(res), ",由于数据量不够,重新加载!")
+	}
+	resLenght := len(res)
+	if resLenght == 0 {
+		return false, &res
+	}
+
+	log.Println(resLenght, "条数据已经加载完成!")
+	return true, &res
+}
 
 //不保存不推送-只保存不推送-保存推送
 func FindData(fid interface{}, title, sname, openid, idrange string, bsave, bpush bool) *Arr {
@@ -88,167 +228,175 @@ func FindData(fid interface{}, title, sname, openid, idrange string, bsave, bpus
 	}
 	var pushArray = &Arr{}
 	if len(q1) > 0 {
-		res := elastic.Get(DB, DB, fmt.Sprintf(Query, idrange, strings.Join(q1, ",")))
+		res := elastic.Get(DB, DB, fmt.Sprintf(Query, idrange, strings.Join(q1, ","), ShowField, SortQuery))
 		if res != nil && *res != nil && len(*res) > 0 {
 			//顺序处理,后序会有性能瓶颈,filterdata
-			util.Try(func() {
-				if !bsave {
-					for _, info := range *res {
-						tmp := map[string]interface{}{}
-						sid := util.BsonIdToSId(info["_id"])
-						if title != sid { //title在此处传的是关注信息id
-							tmp["s_id"] = sid
-							tmp["s_eid"] = util.EncodeArticleId2ByCheck(sid)
-							tmp["s_title"] = info["title"]
-							tmp["l_publishtime"] = info["publishtime"]
-							tmp["s_province"] = info["area"]
-							tmp["s_type"] = util.ObjToString(info["type"])
-							tmp["s_toptype"] = util.ObjToString(info["toptype"])
-							tmp["s_subtype"] = util.ObjToString(info["subtype"])
-							tmp["s_entname"] = util.ObjToString(info["winner"])
-							tmp["s_url"] = util.ObjToString(info["href"])
-							*pushArray = append(*pushArray, &tmp)
+			pushArray = push(fid, sname, title, openid, res, bsave, bpush)
+		}
+	}
+	return pushArray
+}
+
+//开始推送
+func push(fid interface{}, sname, title, openid string, res *[]map[string]interface{}, bsave, bpush bool) *Arr {
+	var pushArray = &Arr{}
+	util.Try(func() {
+		if !bsave {
+			for _, info := range *res {
+				tmp := map[string]interface{}{}
+				sid := util.BsonIdToSId(info["_id"])
+				if title != sid { //title在此处传的是关注信息id
+					tmp["s_id"] = sid
+					tmp["s_eid"] = util.EncodeArticleId2ByCheck(sid)
+					tmp["s_title"] = info["title"]
+					tmp["l_publishtime"] = info["publishtime"]
+					tmp["s_province"] = info["area"]
+					tmp["s_type"] = util.ObjToString(info["type"])
+					tmp["s_toptype"] = util.ObjToString(info["toptype"])
+					tmp["s_subtype"] = util.ObjToString(info["subtype"])
+					tmp["s_entname"] = util.ObjToString(info["winner"])
+					tmp["s_url"] = util.ObjToString(info["href"])
+					*pushArray = append(*pushArray, &tmp)
+				}
+			}
+		} else {
+			Pushlock.Lock()
+			defer Pushlock.Unlock()
+			filterData := &filterdata.FilterData{}
+			filterData.Start(openid)
+			defer filterData.End()
+			//1.组织信息、
+			//a_relationinfo s_id s_title s_projectname  s_projectcode  l_publishtime s_url
+			var ids []string
+			for _, info := range *res {
+				tmp := map[string]interface{}{}
+				sid := util.BsonIdToSId(info["_id"])
+				tmp["s_id"] = sid
+				tmp["s_eid"] = util.EncodeArticleId2ByCheck(sid)
+				tmp["s_title"] = info["title"]
+				tmp["l_publishtime"] = info["publishtime"]
+				tmp["s_province"] = info["area"]
+				tmp["s_type"] = util.ObjToString(info["type"])
+				tmp["s_toptype"] = util.ObjToString(info["toptype"])
+				tmp["s_subtype"] = util.ObjToString(info["subtype"])
+				tmp["s_entname"] = util.ObjToString(info["winner"])
+				tmp["s_url"] = util.ObjToString(info["href"])
+				if filterData.IsExists(sid) {
+					continue
+				}
+				ids = append(ids, sid)
+				*pushArray = append(*pushArray, &tmp)
+			}
+			go func() {
+				//2.推送、
+				if pushArray.Len() > 0 {
+					sort.Sort(pushArray)
+					//更新用户关注的a_relationinfo、保存到推送记录表、推送给用户
+					//log.Println(fid, ids)
+					//项目公告保留包括本身在内的最新100条
+					updateFlag := false
+					if fid != nil {
+						followObject, fok := tools.MQFW.FindOneByField(FOLLOW_COLLECTION, &bson.M{"_id": fid}, `{"l_publishtime":1,"a_relationinfo":1}`)
+						if fok && followObject != nil && len(*followObject) > 0 {
+							relationinfo, _ := (*followObject)["a_relationinfo"].([]interface{})
+							rLength := len(relationinfo)
+							pLength := pushArray.Len()
+							setMap := bson.M{"a_lastpushids": ids}
+							if bpush {
+								setMap["l_lastpushtime"] = (*((*pushArray)[0]))["l_publishtime"]
+							} else {
+								setMap["l_lastpushtime"] = (*followObject)["l_publishtime"]
+							}
+							updateMap := &bson.M{"$set": setMap}
+							if rLength > 0 && rLength+pLength > KEEPCOUNT { //保留100条
+								start := rLength + pLength - KEEPCOUNT
+								var relationinfoTemp []interface{}
+								if start < rLength {
+									relationinfoTemp = append(relationinfoTemp, relationinfo[start:]...)
+								}
+								for _, v := range *pushArray {
+									relationinfoTemp = append(relationinfoTemp, v)
+								}
+								setMap["a_relationinfo"] = relationinfoTemp
+							} else { //追加
+								(*updateMap)["$pushAll"] = bson.M{"a_relationinfo": pushArray}
+							}
+							updateFlag = tools.MQFW.Update(FOLLOW_COLLECTION, &bson.M{"_id": fid}, updateMap, false, false)
 						}
 					}
-				} else {
-					Pushlock.Lock()
-					defer Pushlock.Unlock()
-					filterData := &filterdata.FilterData{}
-					filterData.Start(openid)
-					defer filterData.End()
-					//1.组织信息、
-					//a_relationinfo s_id s_title s_projectname  s_projectcode  l_publishtime s_url
-					var ids []string
-					for _, info := range *res {
-						tmp := map[string]interface{}{}
-						sid := util.BsonIdToSId(info["_id"])
-						tmp["s_id"] = sid
-						tmp["s_eid"] = util.EncodeArticleId2ByCheck(sid)
-						tmp["s_title"] = info["title"]
-						tmp["l_publishtime"] = info["publishtime"]
-						tmp["s_province"] = info["area"]
-						tmp["s_type"] = util.ObjToString(info["type"])
-						tmp["s_toptype"] = util.ObjToString(info["toptype"])
-						tmp["s_subtype"] = util.ObjToString(info["subtype"])
-						tmp["s_entname"] = util.ObjToString(info["winner"])
-						tmp["s_url"] = util.ObjToString(info["href"])
-						if filterData.IsExists(sid) {
-							continue
+					if updateFlag && bpush {
+						//进入推送逻辑
+						tit := sname
+						if tit == "" {
+							tit = title
 						}
-						ids = append(ids, sid)
-						*pushArray = append(*pushArray, &tmp)
-					}
-					go func() {
-						//2.推送、
-						if pushArray.Len() > 0 {
-							sort.Sort(pushArray)
-							//更新用户关注的a_relationinfo、保存到推送记录表、推送给用户
-							//log.Println(fid, ids)
-							//项目公告保留包括本身在内的最新100条
-							updateFlag := false
-							if fid != nil {
-								followObject, fok := tools.MQFW.FindOneByField(FOLLOW_COLLECTION, &bson.M{"_id": fid}, `{"l_publishtime":1,"a_relationinfo":1}`)
-								if fok && followObject != nil && len(*followObject) > 0 {
-									relationinfo, _ := (*followObject)["a_relationinfo"].([]interface{})
-									rLength := len(relationinfo)
-									pLength := pushArray.Len()
-									setMap := bson.M{"a_lastpushids": ids}
-									if bpush {
-										setMap["l_lastpushtime"] = (*((*pushArray)[0]))["l_publishtime"]
-									} else {
-										setMap["l_lastpushtime"] = (*followObject)["l_publishtime"]
-									}
-									updateMap := &bson.M{"$set": setMap}
-									if rLength > 0 && rLength+pLength > KEEPCOUNT { //保留100条
-										start := rLength + pLength - KEEPCOUNT
-										var relationinfoTemp []interface{}
-										if start < rLength {
-											relationinfoTemp = append(relationinfoTemp, relationinfo[start:]...)
-										}
-										for _, v := range *pushArray {
-											relationinfoTemp = append(relationinfoTemp, v)
+						if tit != "" {
+							//go func() {
+							followid := util.BsonIdToSId(fid)
+							infoid := tools.MQFW.Save(FOLLOW_PUSH_LOG, &bson.M{
+								"s_openid":       openid,
+								"a_relationinfo": pushArray,
+								"l_date":         time.Now().Unix(),
+								"s_title":        title,
+								"s_entname":      sname,
+								"s_followid":     followid,
+							})
+							if infoid != "" {
+								lastTime := util.Int64All((*(*pushArray)[0])["l_publishtime"])
+								pushtt := fmt.Sprintf(WxTitle, tit)
+								Tip1 := ""
+								minute := time.Now().Unix() - lastTime
+								if minute > -1 && minute < 61 {
+									Tip1 = fmt.Sprintf("%d秒前发布的:\n", minute)
+								} else {
+									minute = minute / 60
+									if minute < 121 {
+										if minute < 1 {
+											minute = 1
 										}
-										setMap["a_relationinfo"] = relationinfoTemp
-									} else { //追加
-										(*updateMap)["$pushAll"] = bson.M{"a_relationinfo": pushArray}
+										Tip1 = fmt.Sprintf("%d分钟前发布的:\n", minute)
 									}
-									updateFlag = tools.MQFW.Update(FOLLOW_COLLECTION, &bson.M{"_id": fid}, updateMap, false, false)
 								}
-							}
-							if updateFlag && bpush {
-								//进入推送逻辑
-								tit := sname
-								if tit == "" {
-									tit = title
+								LastTip := ""
+								pushnum := len(*pushArray)
+								if pushnum > 1 {
+									LastTip = fmt.Sprintf("...(共%d条)", pushnum)
 								}
-								if tit != "" {
-									//go func() {
-									followid := util.BsonIdToSId(fid)
-									infoid := tools.MQFW.Save(FOLLOW_PUSH_LOG, &bson.M{
-										"s_openid":       openid,
-										"a_relationinfo": pushArray,
-										"l_date":         time.Now().Unix(),
-										"s_title":        title,
-										"s_entname":      sname,
-										"s_followid":     followid,
-									})
-									if infoid != "" {
-										lastTime := util.Int64All((*(*pushArray)[0])["l_publishtime"])
-										pushtt := fmt.Sprintf(WxTitle, tit)
-										Tip1 := ""
-										minute := time.Now().Unix() - lastTime
-										if minute > -1 && minute < 61 {
-											Tip1 = fmt.Sprintf("%d秒前发布的:\n", minute)
-										} else {
-											minute = minute / 60
-											if minute < 121 {
-												if minute < 1 {
-													minute = 1
-												}
-												Tip1 = fmt.Sprintf("%d分钟前发布的:\n", minute)
-											}
+								LastLen = LastLen - len([]rune(pushtt)) - len([]rune(Tip1))
+								Remark := ""
+								bshow := false
+								for n := 1; n < pushnum+1; n++ {
+									Remark += fmt.Sprintf("%d %s\n", n, (*(*pushArray)[n-1])["s_title"])
+									if len([]rune(Remark)) > LastLen {
+										if n == pushnum {
+											bshow = true
 										}
-										LastTip := ""
-										pushnum := len(*pushArray)
-										if pushnum > 1 {
-											LastTip = fmt.Sprintf("...(共%d条)", pushnum)
-										}
-										LastLen = LastLen - len([]rune(pushtt)) - len([]rune(Tip1))
-										Remark := ""
-										bshow := false
-										for n := 1; n < pushnum+1; n++ {
-											Remark += fmt.Sprintf("%d %s\n", n, (*(*pushArray)[n-1])["s_title"])
-											if len([]rune(Remark)) > LastLen {
-												if n == pushnum {
-													bshow = true
-												}
-												break
-											}
-										}
-										if bshow {
-											LastTip = ""
-										}
-										go log.Println("push", openid, pushnum, tit)
-										weixinrpc.SendWinXin(&qrpc.NotifyMsg{
-											Openid:  openid,
-											Title:   fmt.Sprintf(WxTitle, tit),
-											Remark:  Tip1 + Remark + LastTip,
-											Detail:  WxContent,
-											Service: WxGroup,
-											Url:     ViewDomain + "/front/sess/" + se.EncodeString(openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",newInfoFollow") + "__" + sname + "__",
-										})
+										break
 									}
-									//}()
 								}
-								//推送结束
+								if bshow {
+									LastTip = ""
+								}
+								go log.Println("push", openid, pushnum, tit)
+								weixinrpc.SendWinXin(&qrpc.NotifyMsg{
+									Openid:  openid,
+									Title:   fmt.Sprintf(WxTitle, tit),
+									Remark:  Tip1 + Remark + LastTip,
+									Detail:  WxContent,
+									Service: WxGroup,
+									Color:   WxColor,
+									Url:     ViewDomain + "/front/sess/" + se.EncodeString(openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",newInfoFollow") + "__" + sname + "__",
+								})
 							}
+							//}()
 						}
-					}()
+						//推送结束
+					}
 				}
-			}, func(e interface{}) {
-				log.Println("给用户推送关注信息时出错:", e)
-			})
+			}()
 		}
-	}
+	}, func(e interface{}) {
+		log.Println("给用户推送关注信息时出错:", e)
+	})
 	return pushArray
 }

+ 1 - 0
src/jfw/modules/pushent/src/main.go

@@ -19,6 +19,7 @@ import (
 func init() {
 	redis.InitRedisBySize(config.Sysconfig["redisServers"].(string), 200, 30, 300)
 	elastic.InitElasticSize(config.Sysconfig["elasticsearch"].(string), util.IntAllDef(config.Sysconfig["elasticPoolSize"], 30))
+	followpush.MaxSearch = util.IntAllDef(config.Sysconfig["maxSearch"], 10000)
 }
 
 func main() {

+ 4 - 2
src/jfw/modules/pushproject/src/config.json

@@ -8,9 +8,11 @@
     "mongodbServers": "192.168.3.18:27080",
     "redisServers": "sso=192.168.3.14:1379,other=192.168.3.14:1379,push=192.168.3.14:3379",
     "rpcPort": "8759",
-    "viewDomain": "192.168.3.78",
+    "viewDomain": "http://webwcj.qmx.top",
     "weixinRpcServer": "127.0.0.1:8083",
     "wxcontent": "剑鱼推送",
     "wxgroup": "关注项目",
-    "wxtitle": "您关注的项目《%s》有新的公告信息!"
+    "wxtitle": "您关注的项目《%s》有新的公告信息!",
+	"wxcolor": "#ffba00",
+	"maxSearch":10000
 }

+ 2 - 1
src/jfw/modules/pushproject/src/followpush/followpush.go

@@ -14,7 +14,7 @@ const (
 
 //每次推前构建用户关注内存结构 项目名称和项目代码对应 用户组
 var Setting map[string]*[]*map[string]interface{}
-var WxTitle, WxContent, WxGroup, ViewDomain string
+var WxTitle, WxContent, WxGroup, WxColor, ViewDomain string
 var Lock = sync.Mutex{}
 
 //加密串
@@ -28,6 +28,7 @@ func init() {
 	WxTitle = util.ObjToString(Sysconfig["wxtitle"])
 	WxContent = util.ObjToString(Sysconfig["wxcontent"])
 	WxGroup = util.ObjToString(Sysconfig["wxgroup"])
+	WxColor = util.ObjToString(Sysconfig["wxcolor"])
 	ViewDomain = util.ObjToString(Sysconfig["viewDomain"])
 	LastLen = 200 - len([]rune(WxContent)) - len([]rune(WxGroup))
 }

+ 45 - 24
src/jfw/modules/pushproject/src/followpush/push.go

@@ -20,23 +20,24 @@ import (
 )
 
 var (
-	MaxId           = `{"query":{"filtered":{"filter":{"bool":{"must":{"range":{"id":{"gt":"%s"}}}}}}},"_source":["_id","comeintime"],"sort":{"id":"desc"},"from":0,"size":1}`
-	Query           = `{ "query": { "bool": { "must": [%s], "should": [%s], "minimum_should_match": 1 } }, "_source": [ %s ], "sort": [ %s ], "from": 0, "size": 50 }`
-	FilterQuery     = `{"query": {"filtered": {"filter": {"bool": {"must": [%s]}}}}}`
-	IDRange         = `{"range":{"id":{"gt":"%s","lte":"%s"}}}`
-	TERM            = `{"term":{"%s":"%s"}}`
-	SortQuery       = `{"publishtime":"desc"}`
-	ShowField       = `"_id","title","publishtime","area","type","toptype","subtype","projectname","projectcode","href","infoformat"`
-	DB              = "bidding"
-	KEEPCOUNT       = 100
-	MaxSearch       = 10000 //缓存中总共加载这么多条
-	OnceMax         = 400   //ES一次查询这么多条
-	searchpool      = make(chan bool, 8)
-	pushpool        = make(chan bool, 50)
-	findpool        = make(chan bool, 10)
-	eachpool        = make(chan bool, 100)
-	Pushlock        = sync.Mutex{}
-	searchWaitGroup = &sync.WaitGroup{}
+	MaxId             = `{"query":{"bool":{"filter":{"range":{"id":{"gt":"%s"}}}}},"_source":["_id","comeintime"],"sort":{"id":"desc"},"from":0,"size":1}`
+	Query             = `{ "query": { "bool": { "must": [%s], "should": [%s], "minimum_should_match": 1 } }, "_source": [ %s ], "sort": [ %s ], "from": 0, "size": 50 }`
+	FilterQuery       = `{"query": {"bool": {"filter": [%s]}}}`
+	IDRange           = `{"range":{"id":{"gt":"%s","lte":"%s"}}}`
+	TERM              = `{"term":{"%s":"%s"}}`
+	SortQuery         = `{"publishtime":"desc"}`
+	ShowField         = `"_id","title","publishtime","area","type","toptype","subtype","projectname","projectcode","href","infoformat"`
+	DB                = "bidding"
+	KEEPCOUNT         = 100
+	MaxSearch         = 10000 //缓存中总共加载这么多条
+	OnceMax           = 400   //ES一次查询这么多条
+	searchpool        = make(chan bool, 8)
+	pushpool          = make(chan bool, 50)
+	findpool          = make(chan bool, 10)
+	eachpool          = make(chan bool, 100)
+	Pushlock          = sync.Mutex{}
+	searchWaitGroup   = &sync.WaitGroup{}
+	eachInfoWaitGroup = &sync.WaitGroup{}
 )
 
 type PushUser struct {
@@ -50,13 +51,19 @@ type PushUser struct {
 //开始推送
 func pushByEs(_id string) bool {
 	defer util.Catch()
-	resId := elastic.Get(DB, DB, fmt.Sprintf(MaxId, _id))
+	idQuery := ""
+	if _id == "" {
+		idQuery = strings.Replace(fmt.Sprintf(MaxId, _id), `"gt"`, `"gte"`, -1)
+	} else {
+		idQuery = fmt.Sprintf(MaxId, _id)
+	}
+	resId := elastic.Get(DB, DB, idQuery)
 	lastid := ""
-	log.Println("push-lastid", resId)
+	log.Println("push-lastid", _id, resId)
 	if resId != nil && *resId != nil && len(*resId) == 1 {
 		lastid = util.ObjToString((*resId)[0]["_id"])
 	} else {
-		log.Println("未查找到数据...", fmt.Sprintf(MaxId, _id))
+		log.Println("未查找到数据...", idQuery)
 		return false
 	}
 	sess := tools.MQFW.GetMgoConn()
@@ -77,13 +84,14 @@ func pushByEs(_id string) bool {
 	}).Iter()
 	j := 0
 	users := []*PushUser{}
-	for tmp := make(map[string]interface{}); cur.Next(tmp); j++ {
+	for tmp := make(map[string]interface{}); cur.Next(tmp); {
 		scode := util.ObjToString(tmp["s_projectcode"])
 		sname := util.ObjToString(tmp["s_projectname"])
 		openid := util.ObjToString(tmp["s_openid"])
 		if strings.TrimSpace(openid) == "" || (strings.TrimSpace(scode) == "" && strings.TrimSpace(sname) == "") {
 			continue
 		}
+		j++
 		users = append(users, &PushUser{
 			OpenId:      openid,
 			Id:          tmp["_id"],
@@ -114,22 +122,26 @@ func pushByEs(_id string) bool {
 			push(k.Id, k.ProjectName, k.ProjectCode, k.Title, k.OpenId, v, true, true)
 		}(v)
 	}
-	log.Println("push-over,user-count:", j)
+	log.Println("push-over")
 	Sysconfig["lastid"] = lastid
 	return true
 }
 
 //遍历数据并执行推送操作
 func EachAllBidInfo(users *[]*PushUser, res *[]map[string]interface{}) *map[*PushUser]*[]map[string]interface{} {
+	var count int
 	userMap := map[*PushUser]*[]map[string]interface{}{}
 	for _, v := range *res {
 		eachpool <- true
+		eachInfoWaitGroup.Add(1)
+		count++
 		func(tmp map[string]interface{}) {
 			defer func() {
+				eachInfoWaitGroup.Done()
 				<-eachpool
 			}()
-			scode := util.ObjToString(tmp["s_projectcode"])
-			sname := util.ObjToString(tmp["s_projectname"])
+			scode := util.ObjToString(tmp["projectcode"])
+			sname := util.ObjToString(tmp["projectname"])
 			for _, user := range *users {
 				if scode != user.ProjectCode && sname != user.ProjectName {
 					continue
@@ -140,9 +152,17 @@ func EachAllBidInfo(users *[]*PushUser, res *[]map[string]interface{}) *map[*Pus
 					userMap[user] = s
 				}
 				*s = append(*s, tmp)
+				if len(*s) >= 50 {
+					break
+				}
 			}
 		}(v)
+		if count%500 == 0 {
+			log.Println("当前信息索引:", count)
+		}
 	}
+	eachInfoWaitGroup.Wait()
+	log.Println("数据遍历完成!")
 	return &userMap
 }
 
@@ -391,6 +411,7 @@ func push(fid interface{}, sname, scode, title, openid string, res *[]map[string
 									Remark:  Tip1 + Remark + LastTip,
 									Detail:  WxContent,
 									Service: WxGroup,
+									Color:   WxColor,
 									Url:     ViewDomain + "/front/sess/" + se.EncodeString(openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",wxpushfollowlist") + "__" + infoid + "__" + followid,
 								})
 							}

+ 1 - 0
src/jfw/modules/pushproject/src/main.go

@@ -19,6 +19,7 @@ import (
 func init() {
 	redis.InitRedisBySize(config.Sysconfig["redisServers"].(string), 200, 30, 300)
 	elastic.InitElasticSize(config.Sysconfig["elasticsearch"].(string), util.IntAllDef(config.Sysconfig["elasticPoolSize"], 30))
+	followpush.MaxSearch = util.IntAllDef(config.Sysconfig["maxSearch"], 10000)
 }
 
 func main() {

+ 1 - 1
src/jfw/modules/weixin/src/config.json

@@ -13,7 +13,7 @@
     "proxysess": "http://webwcj.qmx.top/front/sess/%s",
     "followCompany": 10,
     "welcomemsg": "用剑鱼,所有功能完全免费,\n和传统的会员制说再见!\n\n<a href='%s'>点击这里</a>设置关键词,或直接回复“订阅 关键词”,如“订阅 教学设备”,您将随时随地接收招标信息!\n\n剑鱼,让投标无限可能!",
-	"tpl_push_id": "mdObA5vJtFPzRbokU7OB1tEG9nniY2VXdXk7DfasZVQ",
+	"tpl_push_id": "cxEH6Ud6uBOyr_tdHvR3efcdApySm2TVd8-f5zgWe8M",
     "tpl_bidopen_id": "3URB-9evmkJ9wntI8iGMEl8_elSAC3wL3ZrQQX-q0cg",
     "tpl_managernotify_id": "LB0XHcbNQKcbgUdDfDncuJW10jay4EfoJ9j-UVh2j5A",
     "weixinAutoRpl": "感谢使用剑鱼!\n\n1. <a href='http://mp.weixin.qq.com/mp/homepage?__biz=MzIyNTM1NDUyNw==&hid=1&sn=f9e98da1975f85011ee138a4ee5cfbe8#wechat_redirect'>【产品帮助】</a>\n\n2. <a href='http://www.myfans.cc/30a78e9b78'>【招标社区】</a>\n\n3. <a href='%s'>【搜索招标信息】</a>\n\n4. <a href='%s'>【订阅招标信息】</a>\n\n5.   <a href='%s'>点击这里,查看“%s”的相关招标信息</a>\n\n6.   快速订阅:回复“订阅”加上你的关键词,比如“订阅 教学设备”\n\n7.   如需人工协助,请回复“客服”",

+ 2 - 1
src/jfw/modules/weixin/src/jrpc/jrpc.go

@@ -30,12 +30,13 @@ func init() {
 }
 
 func (w *WeiXinRpc) SendPushMsg(param *qrpc.NotifyMsg, ret *qrpc.RpcResult) error {
+
 	_, err := w.Wwx.PostTemplateMessage(param.Openid, TPL_PUSH_ID, param.Url,
 		weixin.TmplData{
 			"first":    weixin.TmplItem{param.Title, ""},
 			"keyword1": weixin.TmplItem{param.Detail, ""},
 			"keyword2": weixin.TmplItem{param.Service, ""},
-			"remark":   weixin.TmplItem{param.Remark, "#0987FF"},
+			"remark":   weixin.TmplItem{param.Remark, util.If(param.Color != "", param.Color, "#0987FF").(string)},
 		})
 	if err != nil {
 		*ret = qrpc.RpcResult(err.Error())

+ 35 - 14
src/web/staticres/css/dev2/biddingSearch.css

@@ -453,7 +453,6 @@ border-radius:2px;
 
 #searchInner .searchControl .searchTender .region .region-content {
   float: left;
-  width: 1015px;
 }
 
 #searchInner .searchControl .searchTender .region .region-content span {
@@ -462,7 +461,9 @@ border-radius:2px;
   cursor: pointer;
   margin: 0 2px 4px 0;
 }
-
+#searchInner .searchControl .searchTender .region .region-content span.active{
+  margin-right: 8px;
+}
 #searchInner .searchControl .searchTender .region .region-content span.active {
   color: #FFFFFF;
   background-color: #2cb7ca;
@@ -470,10 +471,10 @@ border-radius:2px;
 }
 
 #searchInner .searchControl .searchTender .region .region-content font {
-  float: left;
   padding: 4px 7px;
   cursor: pointer;
-  margin: 0 2px 8px 0;
+  margin: 0 10px 10px 0;
+  float: left;
 }
 
 #searchInner .searchControl .searchTender .region .region-content font.active {
@@ -483,11 +484,9 @@ border-radius:2px;
 }
 
 #searchInner .searchControl .searchTender .region .region-content .diver {
+  margin: 4px 5px 0px 5px;
+  color: #888888;
   float: left;
-  width: 1px;
-  height: 16px;
-  background-color: #e0e0e0;
-  margin: 3px 8px 0;
 }
 
 #searchInner .searchControl .searchTender .region .region-content .parent-node {
@@ -510,7 +509,6 @@ border-radius:2px;
 
 #searchInner .searchControl .searchTender .information .info-content {
   float: left;
-  width: 1020px;
 }
 
 #searchInner .searchControl .searchTender .information .info-content img {
@@ -527,7 +525,9 @@ border-radius:2px;
   cursor: pointer;
   margin: 0 2px 4px 0;
 }
-
+#searchInner .searchControl .searchTender .information .info-content span{
+  margin-right: 7px;
+}
 #searchInner .searchControl .searchTender .information .info-content span.active {
   color: #FFFFFF;
   background-color: #2cb7ca;
@@ -538,7 +538,7 @@ border-radius:2px;
   float: left;
   padding: 4px 7px;
   cursor: pointer;
-  margin: 0 2px 8px 0;
+  margin: 0 7px 8px 0;
 }
 
 #searchInner .searchControl .searchTender .information .info-content font.active {
@@ -552,7 +552,7 @@ border-radius:2px;
   width: 1px;
   height: 16px;
   background-color: #e0e0e0;
-  margin: 3px 8px 0;
+  margin: 3px 6px 0;
 }
 
 #searchInner .searchControl .searchTender .information .info-content .parent-node {
@@ -798,9 +798,12 @@ width:1160px;
   text-align: center;
   line-height: 26px;
 }
-
+#searchInner .searchControl .seaTender-inner .tabContainer .lucene-table>div>table>tbody>tr:first-child>td {
+	border-top: 0px;
+}
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene-table table thead {
   font-size: 14px;
+display: block;
 }
 
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene-table table thead tr {
@@ -816,7 +819,15 @@ width:1160px;
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene-table table tbody tr:nth-of-type(2n) {
   background-color: #f5f5fb;
 }
-
+#searchInner .searchControl .seaTender-inner .tabContainer .lucene-table>div{
+	overflow-y: auto;
+	max-height: 400px;
+	display: block;
+	width: 1176px;
+}
+#searchInner .searchControl .seaTender-inner .tabContainer .lucene-table table{
+	width: 1157px;
+}
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene-table table tbody td {
   padding: 6px;
 }
@@ -863,3 +874,13 @@ width:1160px;
   background-color: #2cb7ca;
   margin: 0 10px;
 }
+#intercept{
+	margin-top: 20px;
+	padding-left: 15px;
+	font-size: 15px;
+}
+#intercept>i{
+	color: #2CB7CA;
+	font-size: 18px;
+	vertical-align: middle;
+}

+ 0 - 27
src/web/staticres/css/dev2/superSearch.css

@@ -23,33 +23,6 @@
 #searchInner{
 	line-height:1;
 }
-.lucene-table tbody>tr>td:nth-child(1) div{
-	width:35px;
-}
-.lucene-table tbody>tr>td:nth-child(2) div{
-	width:303px;
-}
-.lucene-table tbody>tr>td:nth-child(3) div{
-	width:71px;
-}
-.lucene-table tbody>tr>td:nth-child(4) div{
-	width:60px;
-}
-.lucene-table tbody>tr>td:nth-child(5) div{
-	width:168px;
-}
-.lucene-table tbody>tr>td:nth-child(6) div{
-	width:90px;
-}
-.lucene-table tbody>tr>td:nth-child(7) div{
-	width:161px;
-}
-.lucene-table tbody>tr>td:nth-child(8) div{
-	width:63px;
-}
-.lucene-table tbody>tr>td:nth-child(9) div{
-	width:90px;
-}
 .com-highlight{
 	color: #2cb7ca;
 }

+ 26 - 2
src/web/staticres/css/follow.css

@@ -87,6 +87,9 @@
 	line-height: 20px;
 }
 /***********设置页面******/
+.setpage{
+	padding-top: 45px;
+}
 .setpage .disabledMask{
 	position: fixed;
 	background-color: transparent;
@@ -163,9 +166,25 @@
 .setpage .followcancel img{
 	width:96%;
 }
+.setpage #followsure{
+	background-color: #2cb7ca;
+    border-radius: 3px;
+}
+.setpage #followcancel{
+	background-color: #FE737A;
+    border-radius: 3px;
+}
 .setpage .followcancel{
-	padding: 20px 10px;
+	position: absolute;
+    color: #FFFFFF;
+	top: 50%;
+	right: 10px;
+	margin-top: -15px;
+	width: 78px;
+	height: 30px;
+	line-height: 30px;
 	text-align: center;
+	font-weight: normal;
 }
 .setpage .followcancel button{
 	background-color: #FF6666;
@@ -419,9 +438,14 @@
 .setpage .noticehead{
 	background-color: #F8F8F8;	
 	border-bottom: 1px solid #ddd;
-	padding:10px;
+	padding: 10px 95px 10px 10px;
 	line-height: 24px;
 	font-weight: 600;
+	position: fixed;
+	top: 0px;
+	left: 0px;
+	right: 0px;
+	z-index: 1;
 }
 .setpage .noticenew{
     padding: 1px 2px 2px 3px;

+ 61 - 0
src/web/staticres/css/wxsearch.css

@@ -2130,4 +2130,65 @@ body{
 }
 #entsearchPage #wrapper{
 	margin-bottom: 52px;
+}
+#supersearchPage .adv-wxsearch-center{
+	width:100%;
+	margin:auto;
+	min-height:45px;
+	text-align:center;
+	position: relative;
+}
+#supersearchPage .adv-wxsearch-center img{
+	width: 100%;
+}
+#searchIndex{
+	webkit-transform: translateZ(0);
+	-moz-transform: translateZ(0);
+	-ms-transform: translateZ(0);
+	-o-transform: translateZ(0);
+	transform: translateZ(0);
+}
+#supersearchPage,#entsearchPage{
+	background-color: #fff;
+}
+#supersearchPage img.closeadv{
+	width: 20px;
+	position: absolute;
+	top: -10px;
+	right: -10px;
+}
+#supersearchPage .closeadv-bg{
+	position: absolute;
+	width: 15px;
+	height: 15px;
+	border-radius: 50%;
+	background-color: #fff;
+	top: -8px;
+	right: -8px;
+}
+#supersearchPage .jydq-dialog ul>li,#entsearchPage .jydq-dialog ul>li{
+	padding-left: 18px;
+	position: relative;
+}
+#supersearchPage .jydq-dialog ul>li>span,#entsearchPage .jydq-dialog ul>li>span{
+	position: absolute;
+    left: 0px;
+	top: 24px;
+    font-size: 14px;
+}
+#supersearchPage #intercept{
+	padding: 17px 20px 0px 20px;
+	font-size: 14px;
+}
+#supersearchPage #intercept>span{
+	color: #2CB7CA;
+	font-size: 18px;
+	vertical-align: middle;
+}
+#supersearchPage #intercept>font{
+	margin: 0px 5px;
+}
+#supersearchPage .nullcontent{
+	position: relative;
+    top: 20px;
 }

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

@@ -173,4 +173,14 @@ function getUrlParam(name){
     if(r != null)
 		return unescape(r[2]); 
 	return null;
+}
+//获取滚动条宽度
+function getScrollWidth() {
+	var noScroll, scroll, oDiv = document.createElement("DIV");
+    oDiv.style.cssText = "position:absolute; top:-1000px; width:100px; height:100px; overflow:hidden;";
+  	noScroll = document.body.appendChild(oDiv).clientWidth;
+  	oDiv.style.overflowY = "scroll";
+  	scroll = oDiv.clientWidth;
+  	document.body.removeChild(oDiv);
+  	return noScroll-scroll;
 }

+ 24 - 22
src/web/staticres/js/proproject.js

@@ -72,7 +72,7 @@ function next(){
 	}else if(currentPage==2){
 		$(".nbprev").removeClass("disabled");
 	}
-	if($("#zbSeatchT [name='searchvalue']").val()==""){
+	if($("#zbSeatchT [name='keywords']").val()==""){
 		getNewBids(currentPage);
 	}else{
 		if($("#right-table").hasClass("active")){
@@ -96,7 +96,7 @@ function prev(){
 	}else if(currentPage<10){
 		$(".nbnext").removeClass("disabled");
 	}
-	if($("#zbSeatchT [name='searchvalue']").val()==""){
+	if($("#zbSeatchT [name='keywords']").val()==""){
 		getNewBids(currentPage);
 	}else{
 		if($("#right-table").hasClass("active")){
@@ -137,7 +137,7 @@ function getNewBids(pnum){
 
 //---取VIP数据---
 function getVIPData(){
-	if($("#zbSeatchT [name='keywords']").val()==""&&$("#zbSeatchT [name='searchvalue']").val()==""){
+	if($("#zbSeatchT [name='keywords']").val()==""&&$("#zbSeatchT [name='keywords']").val()==""){
 		return true;
 	}
 	var tabflag = false;
@@ -145,13 +145,13 @@ function getVIPData(){
 		$(".nbprev").addClass("disabled");
 	}
 	var reqType="bidSearch";
-	if($("#zbSeatchT [name='searchvalue']").val()==""){
+	if($("#zbSeatchT [name='keywords']").val()==""){
 		reqType="lastNews";
 	}
 	var param = {
 				pageNumber: currentPage,
 				reqType: reqType,
-				searchvalue: $("#zbSeatchT [name='searchvalue']").val(),
+				searchvalue: $("#zbSeatchT [name='keywords']").val(),
 				area: $("#zbSeatchT [name='area']").val(),
 				subtype: $("#zbSeatchT [name='subtype']").val(),
 				publishtime: $("#zbSeatchT [name='publishtime']").val(),
@@ -168,6 +168,7 @@ function getVIPData(){
 	   data:param,
        dataType:'json', 
        success:function(r){
+			$(".side-bar-bottom-font").text("“"+$.trim($(".searchname").val()).replace(/\s+/," ")+"”");
 			if(typeof(totalPage) != "undefined" && currentPage == 1){
 				totalPage = r.totalPage;
 			}
@@ -209,7 +210,7 @@ function getNewBiddings(){
 	var param = {
 				pageNumber: currentPage,
 				reqType: "lastNews",
-				searchvalue: $("#zbSeatchT [name='searchvalue']").val(),
+				searchvalue: $("#zbSeatchT [name='keywords']").val(),
 				area: $("#zbSeatchT [name='area']").val(),
 				subtype: $("#zbSeatchT [name='subtype']").val(),
 				publishtime: $("#zbSeatchT [name='publishtime']").val(),
@@ -302,48 +303,48 @@ function appendDatas(datas,isNew){
 		listHtml += '</div></li>';
 		if(datas[i].projectinfo!=undefined){
 			tableHtml +='<tr onclick="noIn(this)" dataid="'+datas[i]._id+'" target="_blank">'
-					+'<td><div>'+index+'</div></td>'
+					+'<td width="48"><div>'+index+'</div></td>'
 			//
 			var proinfo = datas[i].projectinfo;
 			//		
 			if(typeof(proinfo.approvecode) != "undefined" && proinfo.approvecode != null && proinfo.approvecode != ""){
-				tableHtml += '<td class="tt-l"><div>'+proinfo.approvecode+'</div></td>';
+				tableHtml += '<td class="tt-l" width="134"><div>'+proinfo.approvecode+'</div></td>';
 			}else{
-				tableHtml += '<td class="tt-l"><div></div></td>';
+				tableHtml += '<td class="tt-l" width="134"><div></div></td>';
 			}
 			//		
 			if(typeof(datas[i].projectname) != "undefined" && datas[i].projectname != null && datas[i].projectname != ""){
 				datas[i].projectname = keyWordHighlight(datas[i].projectname,searchvalueArray.join("|"),"<font class='com-highlight'>$1</font>");
-				tableHtml += '<td class="tt-l"><div>'+datas[i].projectname+'</div></td>';
+				tableHtml += '<td class="tt-l" width="324"><div>'+datas[i].projectname+'</div></td>';
 			}else{
-				tableHtml += '<td class="tt-l"><div>'+datas[i].title+'</div></td>';
+				tableHtml += '<td class="tt-l" width="324"><div>'+datas[i].title+'</div></td>';
 			}
 					
 			if(typeof(proinfo.approvecontent) != "undefined" && proinfo.approvecontent != null && proinfo.approvecontent != ""){
-				tableHtml += '<td><div>'+proinfo.approvecontent+'</div></td>';
+				tableHtml += '<td width="265"><div>'+proinfo.approvecontent+'</div></td>';
 			}else{
-				tableHtml += '<td><div></div></td>';
+				tableHtml += '<td width="265"><div></div></td>';
 			}	
 			//
 			if(typeof(proinfo.approvestatus) != "undefined" && proinfo.approvestatus != null && proinfo.approvestatus != ""){
-				tableHtml += '<td><div>'+proinfo.approvestatus+'</div></td>';
+				tableHtml += '<td width="155"><div>'+proinfo.approvestatus+'</div></td>';
 			}else{
-				tableHtml += '<td><div></div></td>';
+				tableHtml += '<td width="155"><div></div></td>';
 			}
 			
 			if(typeof(proinfo.approvetime) != "undefined" && proinfo.approvetime != null && proinfo.approvetime != ""){
-				tableHtml += '<td><div>'+proinfo.approvetime.substring(0,16)+'</div></td>';
+				tableHtml += '<td width="115"><div>'+proinfo.approvetime.substring(0,16)+'</div></td>';
 			}else{
-				tableHtml += '<td><div></div></td>';
+				tableHtml += '<td width="115"><div></div></td>';
 			}
 			//
 			if(typeof(datas[i].publishtime) != "undefined" && datas[i].publishtime != null && datas[i].publishtime != ""){
 				var diff = formatDate(Number(datas[i].publishtime),"");
 				if(diff != null){
-					tableHtml += '<td><div>'+diff+'</div></td>';
+					tableHtml += '<td width="116"><div>'+diff+'</div></td>';
 				}
 			}else{
-				tableHtml += '<td><div></div></td>';
+				tableHtml += '<td width="116"><div></div></td>';
 			}
 				tableHtml+='</tr>'
 		}
@@ -479,10 +480,10 @@ function beforeSubmit(n){
 		$("#zbSeatchT [name='subtype']").val(selectSubTypes);
 		
 		//搜索关键词
-		var searchname = $("#zbSeatchT input[name='searchvalue']").val();
+		var searchname = $("#zbSeatchT input[name='keywords']").val();
 		//$("#zbSeatchT input[name='searchvalue']").val($.trim(searchname));
 		
-		if($("#zbSeatchT [name='searchvalue']").val()==""){//&&$("#zbSeatchT [name='area']").val()==""&&$("#zbSeatchT [name='publishtime']").val()==""){
+		if($("#zbSeatchT [name='keywords']").val()==""){//&&$("#zbSeatchT [name='area']").val()==""&&$("#zbSeatchT [name='publishtime']").val()==""){
 			getNewBids(currentPage);
 		}else{
 			if(n!="F"){
@@ -518,7 +519,7 @@ function searchOnsubmit(){
 	var param = {
 				pageNumber: currentPage,
 				reqType: "bidSearch",
-				searchvalue: $("#zbSeatchT [name='searchvalue']").val(),
+				searchvalue: $("#zbSeatchT [name='keywords']").val(),
 				area: $("#zbSeatchT [name='area']").val(),
 				subtype: $("#zbSeatchT [name='subtype']").val(),
 				publishtime: $("#zbSeatchT [name='publishtime']").val(),
@@ -528,6 +529,7 @@ function searchOnsubmit(){
 				industry : "",
 			};
 	$.post("/front/pcAjaxReq",param,function(r){
+		$(".side-bar-bottom-font").text("“"+$.trim($(".searchname").val()).replace(/\s+/," ")+"”");
 		if(typeof(totalPage) != "undefined" && currentPage == 1){
 			totalPage = r.totalPage;
 		}

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

@@ -203,7 +203,7 @@ function next(){
 	}else if(currentPage==2){
 		$(".nbprev").removeClass("disabled");
 	}
-	if($("#zbSeatchT [name='searchvalue']").val()==""&&$("#zbSeatchT [name='industry']").val()==""){
+	if($("#zbSeatchT [name='keywords']").val()==""&&$("#zbSeatchT [name='industry']").val()==""){
 		getNewBids(currentPage);
 	}else{
 		if($("#right-table").hasClass("active")){
@@ -227,7 +227,7 @@ function prev(){
 	}else if(currentPage<10){
 		$(".nbnext").removeClass("disabled");
 	}
-	if($("#zbSeatchT [name='searchvalue']").val()==""&&$("#zbSeatchT [name='industry']").val()==""){
+	if($("#zbSeatchT [name='keywords']").val()==""&&$("#zbSeatchT [name='industry']").val()==""){
 		getNewBids(currentPage);
 	}else{
 		
@@ -276,7 +276,7 @@ function getNewBiddings(){
 	var param = {
 				pageNumber: currentPage,
 				reqType: "lastNews",
-				searchvalue: $("#zbSeatchT [name='searchvalue']").val(),
+				searchvalue: $("#zbSeatchT [name='keywords']").val(),
 				area: $("#zbSeatchT [name='area']").val(),
 				subtype: $("#zbSeatchT [name='subtype']").val(),
 				publishtime: $("#zbSeatchT [name='publishtime']").val(),
@@ -403,18 +403,18 @@ function appendDatas(datas,flag,isNew){
 		}
 		listHtml += '</div></li>';
 		tableHtml +='<tr onclick="noIn(this)" dataid="'+datas[i]._id+'" dataindustry="'+datas[i].industry+'" target="_blank">'
-				+'<td><div>'+index+'</div></td>'
+				+'<td width="48"><div>'+index+'</div></td>'
 		if(typeof(datas[i].projectname) != "undefined" && datas[i].projectname != null && datas[i].projectname != ""){
 			datas[i].projectname = keyWordHighlight(datas[i].projectname,searchvalueArray.join("|"),"<font class='com-highlight'>$1</font>");
-			tableHtml += '<td class="tt-l"><div>'+datas[i].projectname+'</div></td>';
+			tableHtml += '<td class="tt-l" width="315"><div>'+datas[i].projectname+'</div></td>';
 		}else{
-			tableHtml += '<td class="tt-l"><div>'+datas[i].title+'</div></td>';
+			tableHtml += '<td class="tt-l" width="315"><div>'+datas[i].title+'</div></td>';
 		}
 				
 		if(typeof(type) != "undefined" && type != null && type != ""){
-			tableHtml += '<td><div>'+type+'公告</div></td>';
+			tableHtml += '<td width="84"><div>'+type+'公告</div></td>';
 		}else{
-			tableHtml += '<td><div></div></td>';
+			tableHtml += '<td width="84"><div></div></td>';
 		}
 		
 		if(typeof(datas[i].budget) != "undefined" && datas[i].budget != null && datas[i].budget != ""){
@@ -426,25 +426,25 @@ function appendDatas(datas,flag,isNew){
 					budget=budget.toString().substr(0,6)
 				}
 			}
-			tableHtml += '<td class="tt-r"><div>'+budget+'</div></td>';
+			tableHtml += '<td class="tt-r" width="73"><div>'+budget+'</div></td>';
 		}else{
-			tableHtml += '<td class="tt-r"><div></div></td>';
+			tableHtml += '<td class="tt-r" width="73"><div></div></td>';
 		}
 		if(typeof(datas[i].buyer) != "undefined" && datas[i].buyer != null && datas[i].buyer != ""){
-			tableHtml += '<td class="tt-l"><div>'+datas[i].buyer+'</div></td>';
+			tableHtml += '<td class="tt-l" width="181"><div>'+datas[i].buyer+'</div></td>';
 		}else{
-			tableHtml += '<td class="tt-l"><div></div></td>';
+			tableHtml += '<td class="tt-l" width="181"><div></div></td>';
 		}
 		if(typeof(datas[i].bidopentime) != "undefined" && datas[i].bidopentime != null && datas[i].bidopentime != ""){
 			var diff = formatDate(Number(datas[i].bidopentime),"l");
-			tableHtml += '<td><div>'+diff+'</div></td>';
+			tableHtml += '<td width="103"><div>'+diff+'</div></td>';
 		}else{
-			tableHtml += '<td><div></div></td>';
+			tableHtml += '<td width="103"><div></div></td>';
 		}
 		if(typeof(datas[i].winner) != "undefined" && datas[i].winner != null && datas[i].winner != ""){
-			tableHtml += '<td class="tt-l"><div>'+datas[i].winner+'</div></td>';
+			tableHtml += '<td class="tt-l" width="174"><div>'+datas[i].winner+'</div></td>';
 		}else{
-			tableHtml += '<td class="tt-l"><div></div></td>';
+			tableHtml += '<td class="tt-l" width="174"><div></div></td>';
 		}
 		if(typeof(datas[i].bidamount) != "undefined" && datas[i].bidamount != null && datas[i].bidamount != ""){
 			var bidamount = parseInt(datas[i].bidamount)/10000;
@@ -455,28 +455,28 @@ function appendDatas(datas,flag,isNew){
 					bidamount=bidamount.toString().substr(0,6);
 				}
 			}
-			tableHtml += '<td class="tt-r"><div>'+bidamount+'</div></td>';
+			tableHtml += '<td class="tt-r" width="76"><div>'+bidamount+'</div></td>';
 		}else{
-			tableHtml += '<td class="tt-r"><div></div></td>';
+			tableHtml += '<td class="tt-r" width="76"><div></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><div>'+diff+'</div></td>';
+				tableHtml += '<td width="103"><div>'+diff+'</div></td>';
 			}
 		}else{
-			tableHtml += '<td><div></div></td>';
+			tableHtml += '<td width="103"><div></div></td>';
 		}
 			tableHtml+='</tr>'
 	}
 	if(!flag||selectType=="title"){
 		$(".tabContainer-2 .lucene ul").html(listHtml);
-		$(".tabContainer-2 .lucene-table table tbody").html(tableHtml);
+		$(".tabContainer-2 .lucene-table>div>table tbody").html(tableHtml);
 	}else{
 		if(selectType=="all"){
 			$(".tabContainer .lucene ul").html(listHtml);
-			$(".tabContainer .lucene-table table tbody").html(tableHtml);
+			$(".tabContainer .lucene-table>div>table tbody").html(tableHtml);
 		}
 	}
 	$(".tabContainer").css("min-height","");
@@ -546,11 +546,11 @@ function getInputTime(){
 //---取VIP数据---
 function getVIPData(){
 	var tlflag = false;
-	if($("#zbSeatchT [name='keywords']").val()==""&&$("#zbSeatchT [name='searchvalue']").val()==""&&$("#zbSeatchT [name='industry']").val()==""){
+	if($("#zbSeatchT [name='keywords']").val()==""&&$("#zbSeatchT [name='keywords']").val()==""&&$("#zbSeatchT [name='industry']").val()==""){
 		return true;
 	}
 	var tabflag = false;
-	if($("#zbSeatchT [name='searchvalue']").val()!=""){
+	if($("#zbSeatchT [name='keywords']").val()!=""){
 		$("#newsclass").show();
 		$("#newsnow").hide(); 
 		tlflag = true;
@@ -563,13 +563,13 @@ function getVIPData(){
 		$(".nbprev").addClass("disabled");
 	}
 	var reqType="bidSearch";
-	if($("#zbSeatchT [name='searchvalue']").val()==""){
+	if($("#zbSeatchT [name='keywords']").val()==""){
 		reqType="lastNews";
 	}
 	var param = {
 				pageNumber: currentPage,
 				reqType: reqType,
-				searchvalue: $("#zbSeatchT [name='searchvalue']").val(),
+				searchvalue: $("#zbSeatchT [name='keywords']").val(),
 				area: $("#zbSeatchT [name='area']").val(),
 				subtype: $("#zbSeatchT [name='subtype']").val(),
 				publishtime: $("#zbSeatchT [name='publishtime']").val(),
@@ -586,9 +586,7 @@ function getVIPData(){
 	   data:param,
        dataType:'json', 
        success:function(r){
-			if(typeof(totalPage) != "undefined" && currentPage == 1){
-				totalPage = r.totalPage;
-			}
+			afterAjaxReq(r);
 			if(r&&r.list!=null&&r.list.length>0){
 				$(".tabContainer").show();
 				$(".pagination").show();
@@ -716,10 +714,10 @@ function beforeSubmit(n){
 			$("#zbSeatchT [name='maxprice']").val("");
 		}
 		//搜索关键词
-		var searchname = $("#zbSeatchT input[name='searchvalue']").val();
+		var searchname = $("#zbSeatchT input[name='keywords']").val();
 		//$("#zbSeatchT input[name='searchvalue']").val($.trim(searchname));
 		
-		if($("#zbSeatchT [name='searchvalue']").val()==""&&$("#zbSeatchT [name='industry']").val()==""){//$("#zbSeatchT [name='area']").val()==""&&$("#zbSeatchT [name='publishtime']").val()==""&&$("#zbSeatchT [name='subtype']").val()==""&&$("#zbSeatchT [name='minprice']").val()==""&&$("#zbSeatchT [name='maxprice']").val()==""){
+		if($("#zbSeatchT [name='keywords']").val()==""&&$("#zbSeatchT [name='industry']").val()==""){//$("#zbSeatchT [name='area']").val()==""&&$("#zbSeatchT [name='publishtime']").val()==""&&$("#zbSeatchT [name='subtype']").val()==""&&$("#zbSeatchT [name='minprice']").val()==""&&$("#zbSeatchT [name='maxprice']").val()==""){
 			getNewBids(currentPage);
 		}else{
 			if(n!="F"){
@@ -757,7 +755,7 @@ function searchOnsubmit(){
 	var param = {
 				pageNumber: currentPage,
 				reqType: "bidSearch",
-				searchvalue: $("#zbSeatchT [name='searchvalue']").val(),
+				searchvalue: $("#zbSeatchT [name='keywords']").val(),
 				area: $("#zbSeatchT [name='area']").val(),
 				subtype: $("#zbSeatchT [name='subtype']").val(),
 				publishtime: $("#zbSeatchT [name='publishtime']").val(),
@@ -767,9 +765,7 @@ function searchOnsubmit(){
 				industry : $("#zbSeatchT [name='industry']").val(),
 			};
 	$.post("/front/pcAjaxReq",param,function(r){
-		if(typeof(totalPage) != "undefined" && currentPage == 1){
-			totalPage = r.totalPage;
-		}
+		afterAjaxReq(r);
 		if(r.list == null || r.list.length == 0){
 			if(currentPage>1){
 				$(".nbnext").addClass("disabled");
@@ -791,4 +787,18 @@ function searchOnsubmit(){
 		}
 	});
 }
-
+function afterAjaxReq(r){
+	if(r.interceptWord != ""){
+		$("#intercept>span").text(r.interceptWord);
+		$("#intercept").removeClass("hidden");
+	}else{
+		$("#intercept").addClass("hidden");
+	}
+	$(".side-bar-bottom-font").text("“"+$.trim($(".searchname").val()).replace(/\s+/," ")+"”");
+	if(typeof(r.searchvalue) != "undefined"){
+		searchvalue = r.searchvalue;
+	}
+	if(typeof(totalPage) != "undefined" && currentPage == 1){
+		totalPage = r.totalPage;
+	}
+}

+ 0 - 22
src/web/staticres/js/wxEntsesearch.js

@@ -276,30 +276,11 @@ var EntSearch = {
 		var dialogObj = $("#entsearchPage .contentone");
 		dialogObj.find(".btn").click(function(){
 			if($(this).parent().index() == 0){
-				dialogObj.find('div[id="dqbtn"]').removeClass("active");
 				dialogObj.find(".btn").removeClass("active");
 			}else{
 				dialogObj.find("ul:first li:first .btn").removeClass("active");
 			};
 			$(this).toggleClass("active");
-			if ($(this).attr("class")!="active"){
-				$(this).prevAll('div[id="dqbtn"]').removeClass("active");
-			};
-			if($(this).parent("li").find(".btn").length == $(this).parent("li").find(".btn.active").length){
-				$(this).prevAll('div[id="dqbtn"]').addClass("active");
-			};
-			if(dialogObj.find(".btn.active").length == 0){
-				dialogObj.find("ul:first li:first .btn").addClass("active");
-			};
-		});
-		dialogObj.find('div[id="dqbtn"]').click(function(){
-			$(this).toggleClass("active");
-			if ($(this).attr("class") != "active"){
-				$(this).nextAll(".btn").removeClass("active");
-			}else{
-				$(this).nextAll(".btn").addClass("active");
-				dialogObj.find("ul:first li:first .btn").removeClass("active");
-			};
 			if(dialogObj.find(".btn.active").length == 0){
 				dialogObj.find("ul:first li:first .btn").addClass("active");
 			};
@@ -397,9 +378,6 @@ var EntSearch = {
                     $("#entsearchPage .contentone").find(".btn").each(function(){
                         if($(this).text() == scopeCache[i]){
                             $(this).addClass("active");
-                            if($(this).parent("li").find(".btn").length == $(this).parent("li").find(".btn.active").length){
-                                $(this).prevAll('div[id="dqbtn"]').addClass("active");
-                            };
                             return false;
                         }
                     });

+ 54 - 34
src/web/staticres/js/wxSupersearch.js

@@ -12,6 +12,8 @@ var SuperSearch = {
 	noMoreCache: false,
 	showNull: null,//null true false
 	advert: null,
+	advertIsClose: false,
+	interceptWord: "",
 	industry: "",
 	sortArray: "",
 	reqParam: {
@@ -60,7 +62,7 @@ var SuperSearch = {
 		//	if(localStorage.selectType=="allSearch"){
 		//		$("#supersearchPage #search_all").addClass("on").siblings().removeClass("on");
 		//	}else if(localStorage.selectType=="titleSearch"){
-				$("#supersearchPage #search_title").addClass("on").siblings().removeClass("on");
+				//$("#supersearchPage #search_title").addClass("on").siblings().removeClass("on");
 		//	}
 		//}
 		//筛选菜单展示or隐藏
@@ -71,6 +73,9 @@ var SuperSearch = {
 			$("#supersearchPage .point").addClass("hidden");
 			$("#supersearchPage #super_search").toggleClass("hidden");
 			if($("#supersearchPage #super_search").hasClass("hidden")){
+				if(SuperSearch.interceptWord != ""){
+					$("#supersearchPage #intercept").removeClass("hidden");
+				}
 				if(SuperSearch.showNull){
 					$("#supersearchPage #selLable").removeClass("hidden");
 					$("#supersearchPage .nullcontent").removeClass("hidden");	
@@ -83,6 +88,7 @@ var SuperSearch = {
 					$("#supersearchPage #wrapper").removeClass("hidden");
 				}
 			}else{
+				$("#supersearchPage #intercept").addClass("hidden");
 				$("#supersearchPage #selLable").addClass("hidden");
 				$("#supersearchPage .nullcontent").addClass("hidden");
 				$("#supersearchPage #wrapper").addClass("hidden");
@@ -381,30 +387,11 @@ var SuperSearch = {
 		var dialogObj = $("#supersearchPage .contentone");
 		dialogObj.find(".btn").click(function(){
 			if($(this).parent().index() == 0){
-				dialogObj.find('div[id="dqbtn"]').removeClass("active");
 				dialogObj.find(".btn").removeClass("active");
 			}else{
 				dialogObj.find("ul:first li:first .btn").removeClass("active");
 			};
 			$(this).toggleClass("active");
-			if ($(this).attr("class")!="active"){
-				$(this).prevAll('div[id="dqbtn"]').removeClass("active");
-			};
-			if($(this).parent("li").find(".btn").length == $(this).parent("li").find(".btn.active").length){
-				$(this).prevAll('div[id="dqbtn"]').addClass("active");
-			};
-			if(dialogObj.find(".btn.active").length == 0){
-				dialogObj.find("ul:first li:first .btn").addClass("active");
-			};
-		});
-		dialogObj.find('div[id="dqbtn"]').click(function(){
-			$(this).toggleClass("active");
-			if ($(this).attr("class") != "active"){
-				$(this).nextAll(".btn").removeClass("active");
-			}else{
-				$(this).nextAll(".btn").addClass("active");
-				dialogObj.find("ul:first li:first .btn").removeClass("active");
-			};
 			if(dialogObj.find(".btn.active").length == 0){
 				dialogObj.find("ul:first li:first .btn").addClass("active");
 			};
@@ -599,8 +586,12 @@ var SuperSearch = {
 		sessionStorage.removeItem("superSearch_industry");
 		sessionStorage.removeItem("searchpageName");
 		sessionStorage.removeItem("superSearch_dyDiv");
+		sessionStorage.removeItem("superSearch_advertIsClose");
 		sessionStorage.removeItem("superSearch_shaxuan");
 		sessionStorage.removeItem("superSearch_showType");
+		sessionStorage.removeItem("superSearch_shaxuanFlag");
+		sessionStorage.removeItem("superSearch_searchType");
+		sessionStorage.removeItem("superSearch_interceptWord");
 	},
 	//js 方法
 	resetSx: function (){         //清除筛选
@@ -779,6 +770,7 @@ var SuperSearch = {
 		if(!SuperSearch.beforeSubmit()){
 			return;
 		}
+		$("#supersearchPage #intercept").addClass("hidden");
 		$("#supersearchPage #table").addClass("hidden");
 		$("#supersearchPage #list").addClass("hidden");
 		if(SuperSearch.showNull){
@@ -807,6 +799,8 @@ var SuperSearch = {
 			data: SuperSearch.reqParam,
 			dataType: "json",
 			success: function(data){
+				SuperSearch.appendInterceptWord(data.interceptWord);
+				SuperSearch.s_words = data.keyWord;
 				SuperSearch.requesting = false;
 				//历史记录和我的订阅
 				SuperSearch.htmlTipMsg(data["history"],data["msgset"]);
@@ -840,7 +834,7 @@ var SuperSearch = {
 		var ListHtml='';
 		var TableHtml='';
 		for(var i=0;i<list.length;i++){
-			if(pageNum==1&&i==5){
+			if(pageNum==1&&i==5&&!SuperSearch.advertIsClose){
 				ListHtml+='<div class="adv-wxsearch-center" id="E1"></div>'
 			}
 			var index = (pageNum-1)*pageSize+i+1;
@@ -963,7 +957,7 @@ var SuperSearch = {
 				}
 			}
 			if(i==4){
-				ListHtml += '<div class="tslist" style="border:0px;">'
+				ListHtml += '<div class="tslist" style="border-bottom-width:0px;">'
 			}else{
 				ListHtml += '<div class="tslist">'
 			}
@@ -1033,7 +1027,7 @@ var SuperSearch = {
 			}
 		}
 	
-		if(pageNum==1&&list.length<6){
+		if(pageNum==1&&list.length<6&&!SuperSearch.advertIsClose){
 			ListHtml+='<div class="adv-wxsearch-center" id="E1">E1</div>'
 		}
 		html["ListHtml"]=ListHtml;
@@ -1261,18 +1255,20 @@ var SuperSearch = {
 	        sessionStorage.superSearch_industry=$("#supersearchPage .contentthree").html();
 			sessionStorage.searchpageName="superSearch";
 			sessionStorage.superSearch_dyDiv=SuperSearch.dyDiv;
+			sessionStorage.superSearch_advertIsClose=SuperSearch.advertIsClose;
 			if($("#supersearchPage .on").hasClass("showlist")){
 				sessionStorage.superSearch_showType="showList";
 			}else if($("#supersearchPage .on").hasClass("showtable")){
 				sessionStorage.superSearch_showType="showTable";
 			}
-			if(!$("#supersearchPage #super_search").hasClass("hidden")){
-				var shaxuanclass = $("#supersearchPage .jyshaxuan .shaixcl").attr("class");
-				if(shaxuanclass){
-					shaxuanclass = shaxuanclass.split(" ")[0];
-					sessionStorage.superSearch_shaxuan=shaxuanclass;
-				}
+			var shaxuanclass = $("#supersearchPage .jyshaxuan .shaixcl").attr("class");
+			if(shaxuanclass){
+				shaxuanclass = shaxuanclass.split(" ")[0];
+				sessionStorage.superSearch_shaxuan=shaxuanclass;
 			}
+			sessionStorage.superSearch_shaxuanFlag=!$("#supersearchPage #super_search").hasClass("hidden");
+			sessionStorage.superSearch_searchType=$("#supersearchPage #selLable>.com-title>span.on").attr("id");
+			sessionStorage.superSearch_interceptWord=SuperSearch.interceptWord;
 	    }
 	},
 	setUpLastPage: function () {
@@ -1306,7 +1302,12 @@ var SuperSearch = {
 			});
 			$("#supersearchPage #table .data .content").html(TableContent);
 	    }
-
+		SuperSearch.appendInterceptWord(sessionStorage.superSearch_interceptWord);
+		if(sessionStorage.superSearch_advertIsClose == "false"){
+			SuperSearch.advertIsClose = false;
+		}else{
+			SuperSearch.advertIsClose = true;
+		}
 		if(sessionStorage.superSearch_dyDiv == "false"){
 			SuperSearch.dyDiv = false;
 		}else{
@@ -1359,9 +1360,6 @@ var SuperSearch = {
 			    $("#supersearchPage .contentone").find(".btn").each(function(){
 				if($(this).text() == scopes[i]){
 				    $(this).addClass("active");
-				    if($(this).parent("li").find(".btn").length == $(this).parent("li").find(".btn.active").length){
-					$(this).prevAll('div[id="dqbtn"]').addClass("active");
-				    };
 				    return false;
 				}
 			    });
@@ -1408,12 +1406,15 @@ var SuperSearch = {
 			$("#supersearchPage .money-dialog .btn").addClass("active");
 		}
 		var shaxuanclass = sessionStorage.superSearch_shaxuan;
-		if(shaxuanclass){
+		var shaxuanFlag = sessionStorage.superSearch_shaxuanFlag;
+		if(shaxuanFlag=="true"){
 			$("#supersearchPage #selLable").addClass("hidden");
 			$("#supersearchPage #wrapper").addClass("hidden");
 			$("#supersearchPage .nullcontent").addClass("hidden");
 			$("#supersearchPage #super_search").removeClass("hidden");
 			$("#supersearchPage .jyshaxuan>div").removeClass("shaixcl");
+		}
+		if(shaxuanclass){
 			$("#supersearchPage ."+shaxuanclass).addClass("shaixcl");
 			$("#supersearchPage .industry-dialog,.jydq-dialog,.jytype-dialog,.jypt-dialog,.money-dialog").addClass("hidden");
 			if(shaxuanclass == "shaixIndustry"){
@@ -1428,6 +1429,8 @@ var SuperSearch = {
 				$("#supersearchPage .jytype-dialog").removeClass("hidden");
 			}
 		}
+		$("#supersearchPage #selLable>.com-title>span.on").removeClass("on");
+		$("#supersearchPage #selLable>.com-title>#"+sessionStorage.superSearch_searchType).addClass("on");
 		if(sessionStorage.superSearch_showType=="showList"){
 			$("#supersearchPage .showlist").addClass("on").siblings().removeClass("on");
 			$("#supersearchPage #wrapper #table").addClass("hidden");
@@ -1654,5 +1657,22 @@ var SuperSearch = {
 			endtime = "";
 		}
 		return [starttime,endtime]
+	},
+	closeadv: function(obj){
+		SuperSearch.advertIsClose = true;
+		$(obj).parent().prev().css("border-bottom-width","1px");
+		$(obj).parent().remove();
+		if(SuperSearch.dropload != null){
+			SuperSearch.dropload.resetload();
+		}
+	},
+	appendInterceptWord: function(word){
+		SuperSearch.interceptWord = word;
+		if(word == ""){
+			$("#supersearchPage #intercept").addClass("hidden");
+			return;
+		}
+		$("#supersearchPage #intercept").removeClass("hidden");
+		$("#supersearchPage #intercept>font").text("“"+word+"”");
 	}
 };

+ 0 - 3
src/web/templates/common/pcbottom.html

@@ -173,9 +173,6 @@ function stypesearch(stype){
 }
 //
 function zbSeatch(id){
-	var keywords = $("#"+id+" [name='keywords']").val();
-	keywords = keywords.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"+");
-	$("#"+id+" [name='searchvalue']").val(keywords);
 	$("#"+id).submit();
 }
 var backTopRight = (document.body.clientWidth - 17 - 1200) / 2 - 44;

+ 71 - 67
src/web/templates/pc/classifylist.html

@@ -316,7 +316,6 @@ $(function(){
 	//
 	$(".searchname").on("input propertychange",function(){
 		var kw = $("#zbSeatchT [name='keywords']").val();
-    	$("#zbSeatchT [name='searchvalue']").val(kw);
 		if($.trim(kw)!=""){
 			$("#t-clear").show();
 		}else{
@@ -326,7 +325,6 @@ $(function(){
 	$("#t-clear").click(function(){
 		$("#t-clear").hide();
 		$("#searchinput").val("").focus();
-		$("#zbSeatchT [name='searchvalue']").val("");
 	})
 	//设置输入价格的格式
 			var reg = /^[\u4e00-\u9fa5]+$/;
@@ -493,7 +491,6 @@ function priceCss(){
 					<input class="searchname" autocomplete="off" type="search" id="searchinput" value="{{.T.keywords}}" name="keywords" placeholder="高速公路" />
 					<img src="/images/pc_20.png" id="t-clear" class="j-clearicon" style="display: none;">
 					<input type="submit" value="搜索" />
-					<input type="hidden" name="searchvalue" value="{{.T.keywords}}">
 					<input type="hidden" name="publishtime" value="{{.T.publishtime}}">
 					<input type="hidden" name="timeslot" value="{{.T.timeslot}}">
 					<input type="hidden" name="area" value="{{.T.area}}">
@@ -595,51 +592,53 @@ function priceCss(){
 				</div>
 				<div class="region-content">
 					<span id="regionBtn" class=" active">全国</span>
-					<i class="diver"></i>
-					<font class="parent-node">华北地区</font>
-					<font>北京</font>
-					<font>天津</font>
-					<font>河北</font>
-					<font>山西</font>
-					<font>内蒙古</font>
-					<i class="diver"></i>
-					<font class="parent-node">东北地区</font>
-					<font>辽宁</font>
-					<font>吉林</font>
-					<font>黑龙江</font>
-					<i class="diver"></i>
-					<font class="parent-node">华东地区</font>
-					<font>上海</font>
-					<font>江苏</font>
-					<font>浙江</font>
+					<i class="diver">A</i>
 					<font>安徽</font>
+					<i class="diver">B</i>
+					<font>北京</font>
+					<i class="diver">C</i>
+					<font>重庆</font>
+					<i class="diver">F</i>
 					<font>福建</font>
-					<font>江西</font>
-					<font>山东</font>
-					<i class="diver"></i>
-					<font class="parent-node">华南地区</font>
+					<i class="diver">G</i>
 					<font>广东</font>
 					<font>广西</font>
+					<font>贵州</font>
+					<font>甘肃</font>
+					<i class="diver">H</i>
+					<font>河北</font>
+					<font>湖北</font>
+					<font>黑龙江</font>
 					<font>海南</font>
-					<i class="diver"></i>
-					<font class="parent-node">华中地区</font>
 					<font>河南</font>
-					<font>湖北</font>
 					<font>湖南</font>
-					<i class="diver"></i>
-					<font class="parent-node">西南地区</font>
-					<font>重庆</font>
+					<i class="diver">J</i>
+					<font>吉林</font>
+					<br>
+					<font>江苏</font>
+					<font>江西</font>
+					<i class="diver">L</i>
+					<font>辽宁</font>
+					<i class="diver">N</i>
+					<font>内蒙古</font>
+					<font>宁夏</font>
+					<i class="diver">Q</i>
+					<font>青海</font>
+					<i class="diver">S</i>
+					<font>山西</font>
+					<font>陕西</font>
+					<font>上海</font>
+					<font>山东</font>
 					<font>四川</font>
-					<font>贵州</font>
-					<font>云南</font>
+					<i class="diver">T</i>
+					<font>天津</font>
+					<i class="diver">X</i>
 					<font>西藏</font>
-					<i class="diver"></i>
-					<font class="parent-node">西北地区</font>
-					<font>陕西</font>
-					<font>甘肃</font>
-					<font>青海</font>
-					<font>宁夏</font>
 					<font>新疆</font>
+					<i class="diver">Y</i>
+					<font>云南</font>
+					<i class="diver">Z</i>
+					<font>浙江</font>
 				</div>
 			</div>
 			<!--信息类型-->
@@ -671,6 +670,7 @@ function priceCss(){
 					<font data-value="中标">中标</font>
 					<font data-value="成交">成交</font>
 					<font data-value="废标">废标</font>
+					<br>
 					<font data-value="流标">流标</font>
 					<i class="diver"></i>
 					<font class="parent-node">招标信用信息</font>
@@ -713,21 +713,25 @@ function priceCss(){
 					<table>
 						<thead>
 							<tr>
-								<td width="47">序号</td>
-								<td width="320">项目名称</td>
-								<td width="83">公告类型</td>
-								<td width="65">预算<br>(万元)</td>
-								<td width="180">招标单位</td>
-								<td width="100">开标日期</td>
-								<td width="180">中标单位</td>
-								<td>中标金额<br>(万元)</td>
-								<td width="100">发布日期</td>
+								<td width="48">序号</td>
+								<td width="315">项目名称</td>
+								<td width="84">公告类型</td>
+								<td width="73">预算<br>(万元)</td>
+								<td width="181">招标单位</td>
+								<td width="103">开标日期</td>
+								<td width="174">中标单位</td>
+								<td width="76">中标金额<br>(万元)</td>
+								<td width="103">发布日期</td>
 							</tr>
 						</thead>
-						<tbody>
-							
-						</tbody>
 					</table>
+					<div>
+						<table>
+							<tbody>
+								
+							</tbody>
+						</table>
+					</div>
 				</div>
 			</div>
 			<div class="hasNoData" style="display: none;">
@@ -1044,18 +1048,18 @@ function appendDatas(datas){
 			}
 		}
 		tableHtml +='<tr onclick="noIn(this)" dataid="'+datas[i]._id+'" dataindustry="'+datas[i].industry+'" target="_blank">'
-				+'<td><div>'+index+'</div></td>'
+				+'<td width="48"><div>'+index+'</div></td>'
 				
 		if(typeof(datas[i].projectname) != "undefined" && datas[i].projectname != null && datas[i].projectname != ""){
-			tableHtml += '<td class="tt-l"><div>'+datas[i].projectname+'</div></td>';
+			tableHtml += '<td class="tt-l" width="315"><div>'+datas[i].projectname+'</div></td>';
 		}else{
-			tableHtml += '<td class="tt-l"><div>'+datas[i].title+'</div></td>';
+			tableHtml += '<td class="tt-l" width="315"><div>'+datas[i].title+'</div></td>';
 		}
 				
 		if(typeof(type) != "undefined" && type != null && type != ""){
-			tableHtml += '<td><div>'+type+'公告</div></td>';
+			tableHtml += '<td width="84"><div>'+type+'公告</div></td>';
 		}else{
-			tableHtml += '<td><div></div></td>';
+			tableHtml += '<td width="84"><div></div></td>';
 		}
 		
 		if(typeof(datas[i].budget) != "undefined" && datas[i].budget != null && datas[i].budget != ""){
@@ -1067,25 +1071,25 @@ function appendDatas(datas){
 					budget=budget.toString().substr(0,6)
 				}
 			}
-			tableHtml += '<td class="tt-r"><div>'+budget+'</div></td>';
+			tableHtml += '<td class="tt-r" width="73"><div>'+budget+'</div></td>';
 		}else{
-			tableHtml += '<td class="tt-r"><div></div></td>';
+			tableHtml += '<td class="tt-r" width="73"><div></div></td>';
 		}
 		if(typeof(datas[i].buyer) != "undefined" && datas[i].buyer != null && datas[i].buyer != ""){
-			tableHtml += '<td class="tt-l"><div>'+datas[i].buyer+'</div></td>';
+			tableHtml += '<td class="tt-l" width="181"><div>'+datas[i].buyer+'</div></td>';
 		}else{
-			tableHtml += '<td class="tt-l"><div></div></td>';
+			tableHtml += '<td class="tt-l" width="181"><div></div></td>';
 		}
 		if(typeof(datas[i].bidopentime) != "undefined" && datas[i].bidopentime != null && datas[i].bidopentime != ""){
 			var diff = formatDate(Number(datas[i].bidopentime),"l");
-			tableHtml += '<td><div>'+diff+'</div></td>';
+			tableHtml += '<td width="103"><div>'+diff+'</div></td>';
 		}else{
-			tableHtml += '<td><div></div></td>';
+			tableHtml += '<td width="103"><div></div></td>';
 		}
 		if(typeof(datas[i].winner) != "undefined" && datas[i].winner != null && datas[i].winner != ""){
-			tableHtml += '<td class="tt-l"><div>'+datas[i].winner+'</div></td>';
+			tableHtml += '<td class="tt-l" width="174"><div>'+datas[i].winner+'</div></td>';
 		}else{
-			tableHtml += '<td class="tt-l"><div></div></td>';
+			tableHtml += '<td class="tt-l" width="174"><div></div></td>';
 		}
 		if(typeof(datas[i].bidamount) != "undefined" && datas[i].bidamount != null && datas[i].bidamount != ""){
 			var bidamount = parseInt(datas[i].bidamount)/10000;
@@ -1096,18 +1100,18 @@ function appendDatas(datas){
 					bidamount=bidamount.toString().substr(0,6);
 				}
 			}
-			tableHtml += '<td class="tt-r"><div>'+bidamount+'</div></td>';
+			tableHtml += '<td class="tt-r" width="76"><div>'+bidamount+'</div></td>';
 		}else{
-			tableHtml += '<td class="tt-r"><div></div></td>';
+			tableHtml += '<td class="tt-r" width="76"><div></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><div>'+diff+'</div></td>';
+				tableHtml += '<td width="103"><div>'+diff+'</div></td>';
 			}
 		}else{
-			tableHtml += '<td><div></div></td>';
+			tableHtml += '<td width="103"><div></div></td>';
 		}
 			tableHtml+='</tr>'
 	}

+ 51 - 91
src/web/templates/pc/proproject.html

@@ -206,51 +206,6 @@
   		  -o-transform: scale(1.2);
      	     transform: scale(1.2);
 }
-.lucene-table tbody>tr>td:nth-child(2) div{
-	width: 120px;
-}
-.lucene-table tbody>tr>td:nth-child(2){
-	width: 120px;
-	text-align: center !important;
-}
-.lucene-table tbody>tr>td:nth-child(1){
-	width: 35px;
-	text-align: center !important;
-}
-.lucene-table tbody>tr>td:nth-child(3) div{
-	width: 308px;
-}
-.lucene-table tbody>tr>td:nth-child(3){
-	width: 308px;
-}
-.lucene-table tbody>tr>td:nth-child(4) div{
-	width: 250px;
-}
-.lucene-table tbody>tr>td:nth-child(4){
-	width: 250px;
-	text-align:left !important;
-}
-.lucene-table tbody>tr>td:nth-child(5) div{
-	width: 140px;
-	white-space: normal;
-    word-break: break-all;
-}
-.lucene-table tbody>tr>td:nth-child(5){
-	width: 140px;
-	text-align: left !important;
-}
-.lucene-table tbody>tr>td:nth-child(6) div{
-	width: 101px;
-}
-.lucene-table tbody>tr>td:nth-child(6){
-	width: 101px;
-}
-.lucene-table tbody>tr>td:nth-child(7) div{
-	width: 101px;
-}
-.lucene-table tbody>tr>td:nth-child(7){
-	width: 101px;
-}
 #searchInner .searchControl .searchTender .region{
 	border-bottom:0px !important;
 }
@@ -417,7 +372,6 @@ $(function(){
 					<input class="searchname" autocomplete="off" type="search" id="searchinput" value="{{.T.keywords}}" name="keywords" placeholder="高速公路" />
 					<img src="/images/pc_20.png" id="t-clear" class="j-clearicon" style="display: none;">
 					<input type="button" value="搜索"  onclick="zbSeatch('zbSeatchT')" />
-					<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}}">
@@ -479,51 +433,53 @@ $(function(){
 				</div>
 				<div class="region-content">
 					<span id="regionBtn" class=" active">全国</span>
-					<i class="diver"></i>
-					<font class="parent-node">华北地区</font>
-					<font>北京</font>
-					<font>天津</font>
-					<font>河北</font>
-					<font>山西</font>
-					<font>内蒙古</font>
-					<i class="diver"></i>
-					<font class="parent-node">东北地区</font>
-					<font>辽宁</font>
-					<font>吉林</font>
-					<font>黑龙江</font>
-					<i class="diver"></i>
-					<font class="parent-node">华东地区</font>
-					<font>上海</font>
-					<font>江苏</font>
-					<font>浙江</font>
+					<i class="diver">A</i>
 					<font>安徽</font>
+					<i class="diver">B</i>
+					<font>北京</font>
+					<i class="diver">C</i>
+					<font>重庆</font>
+					<i class="diver">F</i>
 					<font>福建</font>
-					<font>江西</font>
-					<font>山东</font>
-					<i class="diver"></i>
-					<font class="parent-node">华南地区</font>
+					<i class="diver">G</i>
 					<font>广东</font>
 					<font>广西</font>
+					<font>贵州</font>
+					<font>甘肃</font>
+					<i class="diver">H</i>
+					<font>河北</font>
+					<font>湖北</font>
+					<font>黑龙江</font>
 					<font>海南</font>
-					<i class="diver"></i>
-					<font class="parent-node">华中地区</font>
 					<font>河南</font>
-					<font>湖北</font>
 					<font>湖南</font>
-					<i class="diver"></i>
-					<font class="parent-node">西南地区</font>
-					<font>重庆</font>
+					<i class="diver">J</i>
+					<font>吉林</font>
+					<br>
+					<font>江苏</font>
+					<font>江西</font>
+					<i class="diver">L</i>
+					<font>辽宁</font>
+					<i class="diver">N</i>
+					<font>内蒙古</font>
+					<font>宁夏</font>
+					<i class="diver">Q</i>
+					<font>青海</font>
+					<i class="diver">S</i>
+					<font>山西</font>
+					<font>陕西</font>
+					<font>上海</font>
+					<font>山东</font>
 					<font>四川</font>
-					<font>贵州</font>
-					<font>云南</font>
+					<i class="diver">T</i>
+					<font>天津</font>
+					<i class="diver">X</i>
 					<font>西藏</font>
-					<i class="diver"></i>
-					<font class="parent-node">西北地区</font>
-					<font>陕西</font>
-					<font>甘肃</font>
-					<font>青海</font>
-					<font>宁夏</font>
 					<font>新疆</font>
+					<i class="diver">Y</i>
+					<font>云南</font>
+					<i class="diver">Z</i>
+					<font>浙江</font>
 				</div>
 			</div>
 		</div>
@@ -554,19 +510,23 @@ $(function(){
 					<table>
 						<thead>
 							<tr>
-								<td>序号</td>
-								<td>项目代码</td>
-								<td>项目名称</td>
-								<td>审批事项</td>
-								<td>审批结果</td>
-								<td>审批时间</td>
-								<td>发布时间</td>
+								<td width="48">序号</td>
+								<td width="134">项目代码</td>
+								<td width="324">项目名称</td>
+								<td width="265">审批事项</td>
+								<td width="155">审批结果</td>
+								<td width="115">审批时间</td>
+								<td width="116">发布时间</td>
 							</tr>
 						</thead>
-						<tbody>
-							
-						</tbody>
 					</table>
+					<div>
+						<table>
+							<tbody>
+								
+							</tbody>
+						</table>
+					</div>
 				</div>
 			</div>
 			<div class="hasNoData" style="display: none;">

+ 73 - 64
src/web/templates/pc/supsearch.html

@@ -251,7 +251,6 @@ var sortArray = {{.T.sortArray}}
 var list = {{.T.list}}
 var totalPage = {{.T.totalPage}};
 var searchvalue = {{.T.searchvalue}};
-var searchvalueArray = searchvalue.split("+");
 var dataId = "";
 $(function(){
 	$(document).keydown(function(e){
@@ -268,18 +267,14 @@ $(function(){
 	};
 	$("#zbSeatchT [name='selectType']").val(selectType);
 	//
-	$("#zbSeatchT [name='keywords']").val($.trim(keys));
-	$("#zbSeatchT [name='searchvalue']").val($.trim(searchvalue));
 	$("#searchinput").focus();
-	if($.trim(searchvalue)!=""){
+	if(searchvalue!=""){
 		$(".wx-inner-bottom").html('');
 		$("#t-clear").show();
-		searchvalue = $.trim(searchvalue);
-		searchvalueArray = searchvalue.split("+");
 		$("#newsclass").show();
 		$("#newsnow").hide();
 		nbflag = true;
-		$(".wx-inner-bottom").html('微信扫一扫,及时获取<span class="side-bar-bottom-font">“'+searchvalue+'”</span>相关招标信息');
+		$(".wx-inner-bottom").html('微信扫一扫,及时获取<span class="side-bar-bottom-font">“'+keys+'”</span>相关招标信息');
 		$(".wx-inner-title").html('扫码订阅关键词');
 		if(list == null || list.length == 0){
 			$(".tabContainer").hide();
@@ -576,7 +571,6 @@ $(function(){
 					<input class="searchname" autocomplete="off" type="search" id="searchinput" value="{{.T.keywords}}" name="keywords" placeholder="高速公路" />
 					<img src="/images/pc_20.png" id="t-clear" class="j-clearicon" style="display: none;">
 					<input type="button" value="搜索" onclick="zbSeatch('zbSeatchT')"/>
-					<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}}">
@@ -678,51 +672,53 @@ $(function(){
 				</div>
 				<div class="region-content">
 					<span id="regionBtn" class=" active">全国</span>
-					<i class="diver"></i>
-					<font class="parent-node">华北地区</font>
-					<font>北京</font>
-					<font>天津</font>
-					<font>河北</font>
-					<font>山西</font>
-					<font>内蒙古</font>
-					<i class="diver"></i>
-					<font class="parent-node">东北地区</font>
-					<font>辽宁</font>
-					<font>吉林</font>
-					<font>黑龙江</font>
-					<i class="diver"></i>
-					<font class="parent-node">华东地区</font>
-					<font>上海</font>
-					<font>江苏</font>
-					<font>浙江</font>
+					<i class="diver">A</i>
 					<font>安徽</font>
+					<i class="diver">B</i>
+					<font>北京</font>
+					<i class="diver">C</i>
+					<font>重庆</font>
+					<i class="diver">F</i>
 					<font>福建</font>
-					<font>江西</font>
-					<font>山东</font>
-					<i class="diver"></i>
-					<font class="parent-node">华南地区</font>
+					<i class="diver">G</i>
 					<font>广东</font>
 					<font>广西</font>
+					<font>贵州</font>
+					<font>甘肃</font>
+					<i class="diver">H</i>
+					<font>河北</font>
+					<font>湖北</font>
+					<font>黑龙江</font>
 					<font>海南</font>
-					<i class="diver"></i>
-					<font class="parent-node">华中地区</font>
 					<font>河南</font>
-					<font>湖北</font>
 					<font>湖南</font>
-					<i class="diver"></i>
-					<font class="parent-node">西南地区</font>
-					<font>重庆</font>
+					<i class="diver">J</i>
+					<font>吉林</font>
+					<br>
+					<font>江苏</font>
+					<font>江西</font>
+					<i class="diver">L</i>
+					<font>辽宁</font>
+					<i class="diver">N</i>
+					<font>内蒙古</font>
+					<font>宁夏</font>
+					<i class="diver">Q</i>
+					<font>青海</font>
+					<i class="diver">S</i>
+					<font>山西</font>
+					<font>陕西</font>
+					<font>上海</font>
+					<font>山东</font>
 					<font>四川</font>
-					<font>贵州</font>
-					<font>云南</font>
+					<i class="diver">T</i>
+					<font>天津</font>
+					<i class="diver">X</i>
 					<font>西藏</font>
-					<i class="diver"></i>
-					<font class="parent-node">西北地区</font>
-					<font>陕西</font>
-					<font>甘肃</font>
-					<font>青海</font>
-					<font>宁夏</font>
 					<font>新疆</font>
+					<i class="diver">Y</i>
+					<font>云南</font>
+					<i class="diver">Z</i>
+					<font>浙江</font>
 				</div>
 			</div>
 			<!--信息类型-->
@@ -754,6 +750,7 @@ $(function(){
 					<font data-value="中标">中标</font>
 					<font data-value="成交">成交</font>
 					<font data-value="废标">废标</font>
+					<br>
 					<font data-value="流标">流标</font>
 					<i class="diver"></i>
 					<font class="parent-node">招标信用信息</font>
@@ -769,6 +766,7 @@ $(function(){
 				</span>
 			</div>
 		</div>
+		<div id="intercept" class="hidden w"><i class="bootstrap-glyphicon glyphicon-info-sign"></i>“<span></span>”及其后面的字词均被忽略,因为剑鱼的查询限制在20个汉字以内。</div>
 		<!--招标搜索列表内容-->
 		<div class="seaTender-inner w">
 			<!--招标tab切换-->
@@ -804,21 +802,25 @@ $(function(){
 					<table>
 						<thead>
 							<tr>
-								<td width="47">序号</td>
-								<td width="320">项目名称</td>
-								<td width="83">公告类型</td>
-								<td width="65">预算<br>(万元)</td>
-								<td width="180">招标单位</td>
-								<td width="100">开标时间</td>
-								<td width="180">中标单位</td>
-								<td>中标金额<br>(万元)</td>
-								<td width="100">发布时间</td>
+								<td width="48">序号</td>
+								<td width="315">项目名称</td>
+								<td width="84">公告类型</td>
+								<td width="73">预算<br>(万元)</td>
+								<td width="181">招标单位</td>
+								<td width="103">开标日期</td>
+								<td width="174">中标单位</td>
+								<td width="76">中标金额<br>(万元)</td>
+								<td width="103">发布日期</td>
 							</tr>
 						</thead>
-						<tbody>
-							
-						</tbody>
 					</table>
+					<div>
+						<table>
+							<tbody>
+								
+							</tbody>
+						</table>
+					</div>
 				</div>
 			</div>
 			<!--tab切换内容-->
@@ -834,21 +836,28 @@ $(function(){
 					<table>
 						<thead>
 							<tr>
-								<td width="47">序号</td>
-								<td width="320">项目名称</td>
-								<td width="83">公告类型</td>
-								<td width="65">预算<br>(万元)</td>
-								<td width="180">招标单位</td>
-								<td width="100">开标日期</td>
-								<td width="180">中标单位</td>
-								<td>中标金额<br>(万元)</td>
-								<td width="100">发布日期</td>
+								<td width="48">序号</td>
+								<td width="315">项目名称</td>
+								<td width="84">公告类型</td>
+								<td width="73">预算<br>(万元)</td>
+								<td width="181">招标单位</td>
+								<td width="103">开标日期</td>
+								<td width="174">中标单位</td>
+								<td width="76">中标金额<br>(万元)</td>
+								<td width="103">发布日期</td>
 							</tr>
 						</thead>
 						<tbody>
 							
 						</tbody>
 					</table>
+					<div>
+						<table>
+							<tbody>
+								
+							</tbody>
+						</table>
+					</div>
 				</div>
 			</div>
 			<div class="hasNoData" style="display: none;">

+ 13 - 12
src/web/templates/weixin/follow/set.html

@@ -49,6 +49,7 @@ $(function(){
 			window.location.reload(true);
 		}
     });
+	$(".setpage").css("padding-top",$(".noticehead").outerHeight());
 	if(sid !=""){
 		noticeid = sid
 	}else{
@@ -57,7 +58,7 @@ $(function(){
 	if (_id != ""){
 		$.post("/follow/checkFPStatus",{s_id:_id},function(fd){
 			if (fd&&fd.flag=="f"){
-				$(".followcancel").html('<button class="btn" id="followcancel">已取消项目关注</button>');	 
+				$(".followcancel").html('<div id="followcancel">已取消</div>');	 
 				var disabledMask=$(".disabledMask")
 				if(disabledMask.size()==0){
 					$(".setpage").append('<div class="disabledMask"></div>')
@@ -616,6 +617,17 @@ function myRedirect(zbadd,link,sid){
 		{{else}}
 			{{.T.projectcode}}
 		{{end}}
+		{{if .T.flag}}
+			<div class="followcancel">
+				<div id="followcancel">取消关注</div>
+			</div>
+		{{end}}
+		{{if .T.fg}}
+			<div class="followcancel">
+				<div id="followsure">关注</div>
+				<div id="followcancel" class="hidden">取消关注</div>
+			</div>
+		{{end}}
 	</div>
 	<ul>
 		<!--<li>{{.T.projectname}}</li>-->
@@ -643,17 +655,6 @@ function myRedirect(zbadd,link,sid){
 		<li class="jynotice">
 		</li>
 	</ul>
-	{{if .T.flag}}
-	<div class="followcancel">
-		<img  id="followcancel" src="/images/wx/jyclfp.png"/>
-	</div>
-	{{end}}
-	{{if .T.fg}}
-	<div class="followcancel">
-	<img  id="followsure" src="/images/wx/jynoticefw.png"/>
-	<img  id="followcancel" class="hidden" src="/images/wx/jyclfp.png"/>
-	</div>
-	{{end}}
 	<div class="easypopup" id="easypopup">
 		<div class="easypopup-main">
 			<div class="easypopup-header">提示信息</div>

+ 117 - 87
src/web/templates/weixin/search/mainSearch.html

@@ -34,27 +34,6 @@
 	SuperSearch.industry = {{.T.industry}};
 	SuperSearch.sortArray = {{.T.sortArray}};
 </script>
-<style>
-#supersearchPage .adv-wxsearch-center{
-	width:100%;
-	margin:auto;
-	min-height:45px;
-	text-align:center;
-}
-#supersearchPage .adv-wxsearch-center img{
-	width: 100%;
-}
-#searchIndex{
-	webkit-transform: translateZ(0);
-	-moz-transform: translateZ(0);
-	-ms-transform: translateZ(0);
-	-o-transform: translateZ(0);
-	transform: translateZ(0);
-}
-#supersearchPage,#entsearchPage{
-	background-color: #fff;
-}
-</style>
 </head>
 <body>
 <!--主题内容-->
@@ -113,7 +92,7 @@
 	<div>
 		<div class="selLable hidden" id="selLable">
 			<div class="com-title"><!--height:30px; margin-top:20px;-->
-				<span onclick="SuperSearch.allSearch()" id="search_all" class="on" >全文搜索</span><span id="search_title" onclick="SuperSearch.titleSearch()">标题搜索</span>
+				<span onclick="SuperSearch.allSearch()" id="search_all">全文搜索</span><span id="search_title" onclick="SuperSearch.titleSearch()" class="on">标题搜索</span>
 			</div>
 			<div class="line-vertical">
 			</div>
@@ -121,15 +100,16 @@
 				<div class="showlist on" onclick="SuperSearch.showlist();">列表</div>
 				<div class="showtable" onclick="SuperSearch.showTable()">表格</div>
 			</div>
-		</div>
+		</div>		
+		<div id="intercept" class="hidden"><span class="bootstrap-glyphicon glyphicon-info-sign"></span><font>“的方式”</font>及其后面的字词均被忽略,因为剑鱼的查询限制在20个汉字以内。</div>
 		<div class="wxsearch hidden" id="super_search">
 			<div class="jysstj">
 				<div class="jyshaxuan">
 					<div class="shaixIndustry shaixcl">行业</div>
 					<div class="shaixMoney">金额</div>
-					<div class="shaixpt">发布日期</div>
-					<div class="shaixone">项目地区</div>
-					<div class="shaixtwo">信息类型</div>
+					<div class="shaixpt">时间</div>
+					<div class="shaixone">地区</div>
+					<div class="shaixtwo">类型</div>
 				</div>
 				<div class="industry-dialog">
 					<div class="dialog-content contentthree">
@@ -176,57 +156,81 @@
 								<button class="btn active">全国</button>
 							</li>
 							<li>
-								<div id="dqbtn" style="width:81px;">华北地区</div>
+								<span>A</span>
+								<button class="btn">安徽</button>
+							</li>
+							<li>
+								<span>B</span>
 								<button class="btn">北京</button>
-								<button class="btn">天津</button>
-								<button class="btn">河北</button>
-								<button class="btn">山西</button>
-								<button class="btn">内蒙古</button>
 							</li>
 							<li>
-								<div id="dqbtn" style="width:81px;">东北地区</div>
-								<button class="btn">辽宁</button>
-								<button class="btn">吉林</button>
-								<button class="btn">黑龙江</button>
+								<span>C</span>
+								<button class="btn">重庆</button>
 							</li>
 							<li>
-								<div id="dqbtn" style="width:81px;">华东地区</div>
-								<button class="btn">上海</button>
-								<button class="btn">江苏</button>
-								<button class="btn">浙江</button>
-								<button class="btn">安徽</button>
+								<span>F</span>
 								<button class="btn">福建</button>
-								<button class="btn">江西</button>
-								<button class="btn">山东</button>
 							</li>
 							<li>
-								<div id="dqbtn" style="width:81px;">华南地区</div>
+								<span>G</span>
 								<button class="btn">广东</button>
 								<button class="btn">广西</button>
-								<button class="btn">海南</button>
+								<button class="btn">贵州</button>
+								<button class="btn">甘肃</button>
 							</li>
 							<li>
-								<div id="dqbtn" style="width:81px;">华中地区</div>
-								<button class="btn">河</button>
+								<span>H</span>
+								<button class="btn">河</button>
 								<button class="btn">湖北</button>
+								<button class="btn">黑龙江</button>
+								<button class="btn">海南</button>
+								<button class="btn">河南</button>
 								<button class="btn">湖南</button>
 							</li>
 							<li>
-								<div id="dqbtn" style="width:81px;">西南地区</div>
-								<button class="btn">重庆</button>
-								<button class="btn">四川</button>
-								<button class="btn">贵州</button>
-								<button class="btn">云南</button>
-								<button class="btn">西藏</button>
+								<span>J</span>
+								<button class="btn">吉林</button>
+								<button class="btn">江苏</button>
+								<button class="btn">江西</button>
 							</li>
 							<li>
-								<div id="dqbtn" style="width:81px;">西北地区</div>
-								<button class="btn">陕西</button>
-								<button class="btn">甘肃</button>
-								<button class="btn">青海</button>
+								<span>L</span>
+								<button class="btn">辽宁</button>
+							</li>
+							<li>
+								<span>N</span>
+								<button class="btn">内蒙古</button>
 								<button class="btn">宁夏</button>
+							</li>
+							<li>
+								<span>Q</span>
+								<button class="btn">青海</button>
+							</li>
+							<li>
+								<span>S</span>
+								<button class="btn">山西</button>
+								<button class="btn">陕西</button>
+								<button class="btn">上海</button>
+								<button class="btn">山东</button>
+								<button class="btn">四川</button>
+							</li>
+							<li>
+								<span>T</span>
+								<button class="btn">天津</button>
+							</li>
+							<li>
+								<span>X</span>
+								<button class="btn">西藏</button>
 								<button class="btn">新疆</button>
 							</li>
+							<li>
+								<span>Y</span>
+								<button class="btn">云南</button>
+							</li>
+							<li>
+								<span>Z</span>
+								<button class="btn">浙江</button>
+							</li>
 						</ul>
 					</div>
 				</div>
@@ -348,7 +352,7 @@
 			<ul>
 				<li>金额<img src="/images/entsearch/sys-jt-bottom2.png"></li>
 				<li class="shuxian"></li>
-				<li>项目地区<img src="/images/entsearch/sys-jt-bottom.png"></li>
+				<li>地区<img src="/images/entsearch/sys-jt-bottom.png"></li>
 			</ul>
 		</div>
 		<div class="wxsearch">
@@ -378,57 +382,81 @@
 								<button class="btn active">全国</button>
 							</li>
 							<li>
-								<div id="dqbtn" style="width:81px;">华北地区</div>
+								<span>A</span>
+								<button class="btn">安徽</button>
+							</li>
+							<li>
+								<span>B</span>
 								<button class="btn">北京</button>
-								<button class="btn">天津</button>
-								<button class="btn">河北</button>
-								<button class="btn">山西</button>
-								<button class="btn">内蒙古</button>
 							</li>
 							<li>
-								<div id="dqbtn" style="width:81px;">东北地区</div>
-								<button class="btn">辽宁</button>
-								<button class="btn">吉林</button>
-								<button class="btn">黑龙江</button>
+								<span>C</span>
+								<button class="btn">重庆</button>
 							</li>
 							<li>
-								<div id="dqbtn" style="width:81px;">华东地区</div>
-								<button class="btn">上海</button>
-								<button class="btn">江苏</button>
-								<button class="btn">浙江</button>
-								<button class="btn">安徽</button>
+								<span>F</span>
 								<button class="btn">福建</button>
-								<button class="btn">江西</button>
-								<button class="btn">山东</button>
 							</li>
 							<li>
-								<div id="dqbtn" style="width:81px;">华南地区</div>
+								<span>G</span>
 								<button class="btn">广东</button>
 								<button class="btn">广西</button>
-								<button class="btn">海南</button>
+								<button class="btn">贵州</button>
+								<button class="btn">甘肃</button>
 							</li>
 							<li>
-								<div id="dqbtn" style="width:81px;">华中地区</div>
-								<button class="btn">河</button>
+								<span>H</span>
+								<button class="btn">河</button>
 								<button class="btn">湖北</button>
+								<button class="btn">黑龙江</button>
+								<button class="btn">海南</button>
+								<button class="btn">河南</button>
 								<button class="btn">湖南</button>
 							</li>
 							<li>
-								<div id="dqbtn" style="width:81px;">西南地区</div>
-								<button class="btn">重庆</button>
-								<button class="btn">四川</button>
-								<button class="btn">贵州</button>
-								<button class="btn">云南</button>
-								<button class="btn">西藏</button>
+								<span>J</span>
+								<button class="btn">吉林</button>
+								<button class="btn">江苏</button>
+								<button class="btn">江西</button>
 							</li>
 							<li>
-								<div id="dqbtn" style="width:81px;">西北地区</div>
-								<button class="btn">陕西</button>
-								<button class="btn">甘肃</button>
-								<button class="btn">青海</button>
+								<span>L</span>
+								<button class="btn">辽宁</button>
+							</li>
+							<li>
+								<span>N</span>
+								<button class="btn">内蒙古</button>
 								<button class="btn">宁夏</button>
+							</li>
+							<li>
+								<span>Q</span>
+								<button class="btn">青海</button>
+							</li>
+							<li>
+								<span>S</span>
+								<button class="btn">山西</button>
+								<button class="btn">陕西</button>
+								<button class="btn">上海</button>
+								<button class="btn">山东</button>
+								<button class="btn">四川</button>
+							</li>
+							<li>
+								<span>T</span>
+								<button class="btn">天津</button>
+							</li>
+							<li>
+								<span>X</span>
+								<button class="btn">西藏</button>
 								<button class="btn">新疆</button>
 							</li>
+							<li>
+								<span>Y</span>
+								<button class="btn">云南</button>
+							</li>
+							<li>
+								<span>Z</span>
+								<button class="btn">浙江</button>
+							</li>
 						</ul>
 					</div>
 				</div>
@@ -474,6 +502,8 @@
 	</div>
 </section>
 <div id="advertscript" class="hidden">
+<span class="closeadv-bg"></span>
+<img src="/images/wxqc.png" class="closeadv" onclick="SuperSearch.closeadv(this)">
 {{$s:=(Ad "jy-wxsearch-middle" 1)}}
 {{range $k,$v := $s}}
 	{{if $v.s_pic}}