浏览代码

Merge branch 'develop' of 192.168.3.17:zhanghongbo/qfw into develop

renzheng 9 年之前
父节点
当前提交
8b1f389176

+ 55 - 6
core/src/qfw/search/searchService.go

@@ -21,8 +21,23 @@ import (
 	"strings"
 )
 
+type EntInfo struct {
+	_id           string
+	EntName       string //企业名称
+	RegNo         string //注册号
+	LeRep         string // 法定代表人
+	OpLocDistrict string //区域代码
+	EstDate       string //注册时间
+	OpStateName   string //状态名称
+}
+
 //企业社区首页
 func (search *Search) EntCommunity() error {
+	ismobile := strings.Index(search.Header("User-Agent"), "Mobile")
+	if ismobile > -1 {
+		search.Render("/member/incmobile/index.html")
+		return nil
+	}
 	//新认证企业
 	var newIndentEnts []interface{}
 	if ret := redis.Get("enterprise", "newIndentEnts"); ret != nil {
@@ -122,7 +137,7 @@ func (n *Search) GetEnterpriseList(reqType, param /*参数*/ string) error {
 	//必须是登录之后的已认证用户才可以进入企业社区
 	//if ui, _ := (n.GetSession("userInfo")).(*map[string]interface{}); reqType == "m_" || (n.GetSession("userType") != nil && IntAll(n.GetSession("userType")) > 0) && ((n.GetSession("identWay") != nil && IntAll(n.GetSession("identWay")) == 1) || ((*ui)["s_pid"] != nil && (*ui)["s_pid"].(string) != "")) {
 	//n.T["uri"] = n.Uri()
-
+	ismobile := strings.Index(n.Header("User-Agent"), "Mobile")
 	if len(param) == 0 {
 		//请求是表单提交,走的查询
 		//拼装查询对象
@@ -140,7 +155,7 @@ func (n *Search) GetEnterpriseList(reqType, param /*参数*/ string) error {
 		}
 		//查询生成列表数据
 		data, pagination := searhWebContentent(querymap, n, reqType)
-
+		log.Println(len(*data))
 		//查询送积分
 		queryStr := querymap["query"]
 		if len(queryStr) > 0 {
@@ -155,7 +170,25 @@ func (n *Search) GetEnterpriseList(reqType, param /*参数*/ string) error {
 				}
 			}
 		}
-		n.Render("/search/enterpriseList.html", &xweb.T{"querymap": querymap, "data": data, "pagination": pagination})
+		if ismobile > -1 {
+			entinfos := make([]map[string]string, 0)
+			for _, v := range *data {
+				tmp := map[string]string{
+					"_id":           fmt.Sprint(v["_id"]),
+					"EntName":       fmt.Sprint(v["EntName"]),
+					"RegNo":         fmt.Sprint(v["RegNo"]),
+					"LeRep":         fmt.Sprint(v["LeRep"]),
+					"OpLocDistrict": fmt.Sprint(v["OpLocDistrict"]),
+					"EstDate":       fmt.Sprint(v["EstDate"]),
+					"OpStateName":   fmt.Sprint(v["OpStateName"]),
+				}
+				entinfos = append(entinfos, tmp)
+			}
+			d, _ := json.Marshal(entinfos)
+			n.Render("/member/incmobile/list.html", &xweb.T{"data": string(d)})
+		} else {
+			n.Render("/search/enterpriseList.html", &xweb.T{"querymap": querymap, "data": data, "pagination": pagination})
+		}
 	} else {
 		//反转生成map
 		paramstr := param[1:]
@@ -163,9 +196,26 @@ func (n *Search) GetEnterpriseList(reqType, param /*参数*/ string) error {
 		querymap := map[string]string{}
 
 		json.Unmarshal(bs, &querymap)
-		log.Println(querymap)
 		data, pagination := searhWebContentent(querymap, n, reqType)
-		n.Render("/search/enterpriseList.html", &xweb.T{"querymap": querymap, "data": data, "pagination": pagination})
+		if ismobile > -1 {
+			entinfos := make([]map[string]string, 0)
+			for _, v := range *data {
+				tmp := map[string]string{
+					"_id":           fmt.Sprint(v["_id"]),
+					"EntName":       fmt.Sprint(v["EntName"]),
+					"RegNo":         fmt.Sprint(v["RegNo"]),
+					"LeRep":         fmt.Sprint(v["LeRep"]),
+					"OpLocDistrict": fmt.Sprint(v["OpLocDistrict"]),
+					"EstDate":       fmt.Sprint(v["EstDate"]),
+					"OpStateName":   fmt.Sprint(v["OpStateName"]),
+				}
+				entinfos = append(entinfos, tmp)
+			}
+			d, _ := json.Marshal(entinfos)
+			n.Render("/member/incmobile/list.html", &xweb.T{"data": string(d)})
+		} else {
+			n.Render("/search/enterpriseList.html", &xweb.T{"querymap": querymap, "data": data, "pagination": pagination})
+		}
 	}
 	return nil
 	//} else {
@@ -481,7 +531,6 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
 	if client == nil {
 		return nil, nil
 	}
-	log.Println(query)
 	searchResult, err := client.Search().Index("enterprise").Type("enterprise").Source(query).Do()
 	if err != nil {
 		return nil, nil

+ 4 - 8
core/src/qfw/search/wxsearchservice.go

@@ -131,14 +131,14 @@ func (n *Wxsearch) WxgetEnterpriseList(reqType, param /*参数*/ string) error {
 		//查询生成列表数据
 		if i_mingpian != "" {
 			data, pagination, has := wxsearhWebContententMp(querymap, n, reqType, false)
-			n.Render("/search/wxentlist.html", &xweb.T{"querymap": querymap, "data": data, "pagination": pagination})
+			n.Render("/member/incombile/list.html", &xweb.T{"querymap": querymap, "data": data, "pagination": pagination})
 			if !has {
 				data, pagination := wxsearhWebContentent(querymap, n, reqType)
-				n.Render("/search/wxentlist.html", &xweb.T{"querymap": querymap, "data": data, "pagination": pagination})
+				n.Render("/member/incombile/list.html", &xweb.T{"querymap": querymap, "data": data, "pagination": pagination})
 			}
 		} else {
 			data, pagination := wxsearhWebContentent(querymap, n, reqType)
-			n.Render("/search/wxentlist.html", &xweb.T{"querymap": querymap, "data": data, "pagination": pagination})
+			n.Render("/member/incombile/list.html", &xweb.T{"querymap": querymap, "data": data, "pagination": pagination})
 		}
 	} else {
 		//反转生成map
@@ -149,12 +149,9 @@ func (n *Wxsearch) WxgetEnterpriseList(reqType, param /*参数*/ string) error {
 		json.Unmarshal(bs, &querymap)
 		log.Println(querymap)
 		data, pagination := wxsearhWebContentent(querymap, n, reqType)
-		n.Render("/search/wxentlist.html", &xweb.T{"querymap": querymap, "data": data, "pagination": pagination})
+		n.Render("/member/incombile/list.html", &xweb.T{"querymap": querymap, "data": data, "pagination": pagination})
 	}
 	return nil
-	//} else {
-	//return n.Render("/search/entcommunity.html")
-	//}
 }
 
 //实际的查询企业社区业务逻辑
@@ -383,7 +380,6 @@ func wxsearhWebContentent(querymap map[string]string, n *Wxsearch, reqType strin
 	if err != nil {
 		return nil, nil
 	}
-	log.Println("query", query)
 	var res []map[string]interface{}
 	if searchResult.Hits != nil {
 		resNum := len(searchResult.Hits.Hits)

+ 12 - 8
core/src/qfw/swordfish/swordfish.go

@@ -9,14 +9,18 @@ import (
 
 type SwordFish struct {
 	*xweb.Action
-	swordfish     xweb.Mapper `xweb:"/front/swordfish"`                //剑鱼
-	rssSet        xweb.Mapper `xweb:"/member/swordfish/rssset"`        //订阅消息设置
-	infolist      xweb.Mapper `xweb:"/member/swordfish/infolist"`      //剑鱼
-	swordfishlist xweb.Mapper `xweb:"/member/swordfish/swordfishlist"` //剑鱼列表
-	setVisited    xweb.Mapper `xweb:"/member/swordfish/setVisited"`    //已经访问过的列表
-	visitRedirect xweb.Mapper `xweb:"/visit/redirect"`                 //剑鱼跳转访问请求,后续统计
-	protocol      xweb.Mapper `xweb:"/member/swordfish/protocol"`      //剑鱼协议
-	wxprotocol    xweb.Mapper `xweb:"/member/swordfish/wxprotocol"`    //微信剑鱼协议
+	swordfish      xweb.Mapper `xweb:"/front/swordfish"`                 //剑鱼
+	rssSet         xweb.Mapper `xweb:"/member/swordfish/rssset"`         //订阅消息设置
+	infolist       xweb.Mapper `xweb:"/member/swordfish/infolist"`       //剑鱼
+	swordfishlist  xweb.Mapper `xweb:"/member/swordfish/swordfishlist"`  //剑鱼列表
+	setVisited     xweb.Mapper `xweb:"/member/swordfish/setVisited"`     //已经访问过的列表
+	visitRedirect  xweb.Mapper `xweb:"/visit/redirect"`                  //剑鱼跳转访问请求,后续统计
+	protocol       xweb.Mapper `xweb:"/member/swordfish/protocol"`       //剑鱼协议
+	wxprotocol     xweb.Mapper `xweb:"/member/swordfish/wxprotocol"`     //微信剑鱼协议
+	searchinfolist xweb.Mapper `xweb:"/member/swordfish/searchinfolist"` //剑鱼查询
+	wxsearch       xweb.Mapper `xweb:"/member/wxswordfish/search"`       //剑鱼微信查询
+	wxsearchlist   xweb.Mapper `xweb:"/member/wxswordfish/searchlist"`   //剑鱼微信查询结果展示
+
 }
 
 func init() {

+ 100 - 0
core/src/qfw/swordfish/swordfishmanage.go

@@ -1,11 +1,15 @@
 package swordfish
 
 import (
+	"encoding/json"
 	_ "encoding/json"
 	"gopkg.in/mgo.v2/bson"
+	"log"
+	"net/rpc"
 	"qfw/util"
 	"qfw/util/mongodb"
 	"qfw/util/redis"
+	qrpc "qfw/util/rpc"
 	"time"
 )
 
@@ -67,6 +71,102 @@ func (s *SwordFish) Wxprotocol() error {
 	return s.Render("/swordfish/wxprotocol.html")
 }
 
+//剑鱼微信查询页面
+func (s *SwordFish) Wxsearch() error {
+	s.T["keywords"] = ""
+	keywords := s.GetSession("sf_keywords")
+	if keywords != nil {
+		s.T["keywords"] = keywords
+	}
+	return s.Render("/swordfish/wxsearch.html", &s.T)
+}
+
+//剑鱼微信查询结果页面
+func (s *SwordFish) Wxsearchlist() error {
+	s_type := s.GetString("s_type")
+	s_name := s.GetString("s_name")
+	keywords := s.GetString("searchname")
+	if s_type == "1" {
+		s_type = "tender"
+	} else if s_type == "2" {
+		s_type = "bid"
+	}
+	s.T["keywords"] = keywords
+	s.SetSession("sf_keywords", keywords)
+	s.T["s_name"] = s_name
+	s.T["success"] = false
+	s.T["s_type"] = s.GetString("s_type")
+	log.Println("s_type:", s_type, "s_name:", s_name, "keywords:", keywords)
+	if len(s_name) > 0 {
+		clent, errs := rpc.DialHTTP("tcp", "127.0.0.1:8766")
+		defer clent.Close()
+		rpcData := qrpc.PushData{
+			//Mopenid: "oJULtwzXo6EFV1Ah-XeyRBimXGM8",
+			PushType: map[string]string{
+				s_type: s_type,
+			},
+			Words: s_name,
+		}
+		var repl []byte
+		clent.Call("PushInfo.ResultView", &rpcData, &repl)
+		if errs == nil && repl != nil && len(repl) > 0 {
+			var mp map[string]interface{}
+			json.Unmarshal(repl, &mp)
+			s.T["msglist"] = mp
+			bmatch := mp["bmatch"]
+			if bmatch == true {
+				s.T["success"] = true
+			}
+			log.Println(s.T["msglist"])
+		}
+	}
+	return s.Render("/swordfish/wxsearchlist.html", &s.T)
+}
+
+//跳转到用户中心查询剑鱼信息列表
+func (s *SwordFish) Searchinfolist() error {
+	//moborpc := s.GetString("moborpc")
+	s_type := s.GetString("s_type")
+	s_name := s.GetString("s_name")
+	keywords := s.GetString("searchname")
+	//	if moborpc == "pc" {
+	//	}
+	if s_type == "1" {
+		s_type = "tender"
+	} else if s_type == "2" {
+		s_type = "bid"
+	}
+	s.T["keywords"] = keywords
+	s.SetSession("sf_keywords", keywords)
+	s.T["s_name"] = s_name
+	s.T["success"] = false
+	s.T["s_type"] = s.GetString("s_type")
+	if len(s_name) > 0 {
+		clent, errs := rpc.DialHTTP("tcp", "127.0.0.1:8766")
+		defer clent.Close()
+		rpcData := qrpc.PushData{
+			//Mopenid: "oJULtwzXo6EFV1Ah-XeyRBimXGM8",
+			PushType: map[string]string{
+				s_type: s_type,
+			},
+			Words: s_name,
+		}
+		var repl []byte
+		clent.Call("PushInfo.ResultView", &rpcData, &repl)
+		if errs == nil && repl != nil && len(repl) > 0 {
+			var mp map[string]interface{}
+			json.Unmarshal(repl, &mp)
+			s.T["msglist"] = mp
+			bmatch := mp["bmatch"]
+			if bmatch == true {
+				s.T["success"] = true
+			}
+			log.Println(s.T["msglist"])
+		}
+	}
+	return s.Render("/swordfish/searchinfolist.html", &s.T)
+}
+
 //跳转到用户中心剑鱼信息列表
 func (s *SwordFish) Infolist() error {
 	ms := mongodb.FindById("user", s.GetSession("userId").(string), `{"o_msgset":1}`)

+ 1 - 1
core/src/timetask.json

@@ -1 +1 @@
-{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-03-16 08:54:17"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-03-16 08:54:17"}},"marketisstart":true,"marketrate":300}
+{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-03-21 15:35:25"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-03-21 15:35:25"}},"marketisstart":true,"marketrate":300}

+ 37 - 0
core/src/web/staticres/css/mobile/incmobile.css

@@ -3,6 +3,9 @@ body{
 	font-size:14px;
 	font-family: tahoma, arial, 'Hiragino Sans GB', 'Microsoft YaHei', 宋体, sans-serif;
 }
+input{
+	outline:none
+} 
 ul{
 	list-style:none;
 	padding-left:0px;
@@ -12,6 +15,7 @@ ul{
 	padding:5px 0 0 0 ;
 	background-color:rgb(247,248,250) !important;
 	border-bottom:1px solid #E7E7E7 !important;
+	text-align:center;
 }
 .m-searchbar div.containers{
 	margin:0px auto;
@@ -23,6 +27,27 @@ ul{
 	width: 71%;
 	border: 1px solid #DDDFDB !important;
 	border-radius: 15px;
+	padding-left: 15px;
+}
+.m-searchbar .immediately{
+	position: absolute;
+	display:none;
+    	z-index: 9999;
+	top: 35px !important;
+	border: 1px solid #B5B6BB;
+	border-top: 0px;
+	padding:3px;
+	margin-left: 57px;
+	background: #FFF;
+}
+.m-searchbar .immediately div{
+	height:30px;
+	line-height:30px ;
+}
+.m-searchbar .immediately div:hover{
+	cursor:pointer;
+	background-color:#16A086;
+	color:#FFF;
 }
 .m-searchbar .searchbtn{
 	display: inline-block;
@@ -245,6 +270,18 @@ hr.list{
 .index-navtable div:hover{
 	background:#F6F8FA !important;
 }
+.ent-status-g,.ent-status-r{
+	background-size: 100% 100%;
+	padding: 2px 10px 2px 5px;
+	color:#FFF;
+	font-weight:normal;
+}
+.ent-status-g{
+	background-image: url("/images/status-g.png");
+}
+.ent-status-r{
+	background-image: url("/images/status-r.png");
+}
 /*各详细页面*/
 .comnav ,.secnav{
 	height:50px;

二进制
core/src/web/staticres/images/wxjs.png


二进制
core/src/web/staticres/images/wxjss.png


二进制
core/src/web/staticres/images/wxqc.png


+ 26 - 1
core/src/web/staticres/js/entcommunity.js

@@ -11,6 +11,24 @@ mCommunity.prototype={
 		return this;
 	},
 	initIndex:function(){
+		changeSearchBorder();
+		$(window).resize(function(){
+			changeSearchBorder();
+		});
+		$("#query").keyup(function(){
+			imFind(this);
+			if($("#immediately").children().length>0){
+				$("#immediately").show();
+			}
+		});
+		$("#query").focus(function(){
+			if($("#immediately").children().length>0){
+				$("#immediately").show();
+			}
+		});
+		$("#query").blur(function(){
+			$("#immediately").hide();
+		});
 		//高级搜索
 		$(".searchlink").click(function(){
 			n=$(".nav-bar");
@@ -103,4 +121,11 @@ mCommunity.prototype={
 	}
 }
 
-mCommunity.prototype.init.prototype = mCommunity.prototype;
+mCommunity.prototype.init.prototype = mCommunity.prototype;
+
+function changeSearchBorder(){
+		var width=$("#query").css("width");
+		width=width.substr(0,width.indexOf("p"))-30+"px";
+		$("#immediately").css("width",width);
+		$("#immediately").css("margin-left",$("#query").offset().left+15);
+	}

+ 7 - 1
core/src/web/templates/common/swordfishhead.html

@@ -5,7 +5,10 @@
 		<ul>
 			<li class="b-nav-logo"><a href="/"><img src="{{Msg "seo" "cdn"}}/images/logo.png" class="logo"></a></li>
 			<li class="b-nav-link b-nav-main"><a href="/front/swordfish">剑鱼</a></li>
-			<li class="b-nav-link b-nav-other"><a id="goToRssset">订阅设置</a><a class="b-nav-s"></a></li>
+			<li class="b-nav-link b-nav-other"><a id="goToSearch">信息查询</a>
+			<a class="b-nav-s"></a></li>
+			<li class="b-nav-link b-nav-other"><a id="goToRssset">我的订阅</a>
+			<a class="b-nav-s"></a></li>
 			<li class="b-nav-link b-nav-other"><a id="goToInfolist">推送记录</a></li>
 			<li class="pull-right b-loginStatus" id="b-loginStatus"></li>
 		</ul>
@@ -24,6 +27,9 @@ function b_afterLogin(flag,result){
 		$("#experience").click(function(){
 			window.location.href = "/member/swordfish/rssset";
 		});
+		$("#goToSearch").click(function(){
+			window.location.href = "/member/swordfish/searchinfolist";
+		});
 		$("#goToRssset").click(function(){
 			window.location.href = "/member/swordfish/rssset";
 		});

+ 3 - 14
core/src/web/templates/manage/web_newexpresslist.html

@@ -4,12 +4,8 @@
 {{include "/common/inc.html"}}
 <meta name="Keywords" content="{{Msg "seo" "qfw.newexpress.key"}}"/>
 <meta name="Description" content="{{Msg "seo" "qfw.newexpress.description"}}"/>
-<<<<<<< HEAD
-<script src="/js/validform-min.js"></script>
-<script src="/js/jquery.cookie.js"></script>
-=======
 <script src="{{Msg "seo" "cdn"}}/js/validform-min.js"></script>
->>>>>>> release
+<script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js"></script>
 <style type="text/css">
 <!--
 body{
@@ -192,9 +188,9 @@ font-weight:normal;
 		<div style="margin:15px 0px 0px 3px;"><a target="_blank" href="/front/webcontent/{{index $v "_id"}}.html" style="font-weight: bold; font-size: 16px;">{{index $v "s_title"}}</a></div>
 		<div class="form-group" style="margin-top:10px;height: 90px;" >
         <div class="col-sm-3 control-label" for="name">
-		<img class="newListImg" style="width:150px;height:90px; padding:2px;" src="{{if (index $v "s_pic1")}}{{index $v "s_pic1"}}{{else}}/images/services/default.png{{end}}"/>
+		<img class="newListImg" style="width:150px;height:90px; padding:2px;" src="{{if (index $v "s_pic1")}}{{Msg "seo" "cdn"}}{{index $v "s_pic1"}}{{else}}{{Msg "seo" "cdn"}}/images/services/default.png{{end}}"/>
 		</div>
-<<<<<<< HEAD
+
 	    <div class="col-sm-9 control-label" for="name" id="newsdiv">
 		<div class="newsdiv1">{{if eq (index $v "s_content") ""}}{{index $v "s_description"}}{{else}}{{index $v "s_content"}}{{end}}</div>
 		<div class="newsdiv2 font-size-12">
@@ -229,13 +225,6 @@ font-weight:normal;
 			
 		</div>
 		
-=======
-	    <div class="col-sm-10" class="control-label" for="name" >
-		<div><a target="_blank" href="/front/webcontent/{{index $v "_id"}}.html" style="font-weight: bold; font-size: 16px;">{{index $v "s_title"}}</a></div>
-		<div><p style="font-size:14px;  padding:10px 0px; color: #999999;" >{{if eq (index $v "s_author") ""}}{{else}}作者:{{index $v "s_author"}}  {{end}}文章来源:{{index $v "s_source"}}  发布日期:{{if eq (index $v "releasetime") ""}}{{index $v "l_createdate"}}{{else}}{{index $v "releasetime"}}{{end}}
-		<span style="float:right; color:#CCCCCC;"><img style="width:18px;" src="{{Msg "seo" "cdn"}}/images/u164.png"/> <div style="float:right; color:#999999; margin-top:-48px; margin-right:-15px;">{{index $v "praise"}}</div></span></p></div>
-		<div style=" font-size:14px;line-height:24px;color: #000000;">{{if eq (index $v "s_content") ""}}{{index $v "s_description"}}{{else}}{{index $v "s_content"}}{{end}}</div>
->>>>>>> release
 		</div>
 		</div>
 		</td>

+ 10 - 5
core/src/web/templates/member/incmobile/index.html

@@ -2,7 +2,6 @@
 <html>
 	<head>
 		<title> 企业社区-列表</title>
-		{{include "/common/inc.html"}}
 		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
 		<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
 		<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0" user-scalable="yes" />
@@ -46,7 +45,7 @@
 			.input-before{
 				z-index: 30;
 				position: absolute;
-				top: 15px;
+				top: 14px;
 				left: 9px;
 				color: #A0A0A0;
 				font-size:11px;
@@ -72,6 +71,10 @@
 			.footer .container .inc p{
 				font-size:10px;
 			}
+			#query{
+				height:40px;
+				padding-left:25px;
+			}
 		</style>
 <script>
 var signature = {{.T.signature}};
@@ -126,10 +129,10 @@ if(typeof(signature) != "undefined" && signature != null && signature.length ==
 				查企业,查企业失信信息,查企业变更,查你所想,无所不能...
 			</div>
 			<div style="clear:both;" class="col-sm-8">
-              <form>
+              <form method="post"  action="/search/enterprise/ent.html">
 						<div class="input-group col-xs-12">
 							<i class="glyphicon glyphicon-search input-before"></i>
-                 		<input type="text" id="query" class="form-control" placeholder="   找企业" style="height:40px;">
+                 		<input type="text" id="query" class="form-control" name="words" placeholder="找企业"  >
 							<span class="input-group-addon"><span class="glyphicon glyphicon-camera"></span></span>
              		</div>
 					</form>
@@ -146,7 +149,8 @@ if(typeof(signature) != "undefined" && signature != null && signature.length ==
 						</div>
 	      </div>
 		</footer>
-
+<script src="/js/jquery.js"></script>
+<script src="/js/qfw.js"></script>
 <script>
 $(".input-group-addon").click(function(){
 alert();
@@ -184,5 +188,6 @@ function getmpname(serverId){
     }); 
 }
 </script>
+
 </body>
 </html>

+ 29 - 23
core/src/web/templates/member/incmobile/list.html

@@ -12,9 +12,13 @@
 	<div class="col-xs-12">
 	<div class="m-searchbar">
 		<div class="containers">
-			<input type="text" class="searchtext"/>
+			<form id="searchForm" method="post">
+			<input type="text" id="query" class="searchtext"/>
 			<a class="searchbtn"><b class="glyphicon glyphicon-search"></b></a>
 			<a href="javascript:" class="searchlink">高级搜索</a>
+				<div id="immediately" class="immediately">
+				</div>
+			</form>
 		</div>
 	</div>
 	<div class="nav-bar hides">
@@ -50,30 +54,10 @@
 	</div>
 	<div class="bottom" >
 		<ul class="inclist">
-			<li class="col-xs-12">
-				<table align=center>
-					<caption >
-						<div class="left">纽科伦(新乡)起重机有大师法师打发斯蒂芬限公司洛阳分公司</div>
-						<div class="note taupe">
-							续存
-						</div>
-					</caption>
-					<tr>
-						<td class="left">注册号:<span>420621NB000007X</span></td>
-						<td>法定代表人:<span>李琳</span></td>
-					</tr>
-					<tr>
-						<td class="left">成立时间:<span>2015-05-26</span></td>
-						<td>所在地:<span>湖北 襄阳市</span></td>
-					</tr>
-					<tr>
-						<td colspan=2> <hr class="list"/></td>
-					</tr>
-				</table>
-			</li>
+			
 		</ul>
 	</div>
-	<a class="loadmore btn btn-link">加载更多</a>
+	<center><a class="loadmore btn btn-link">加载更多</a></center>
 	</div>
 	<script src="/js/jquery.js"></script>
 	<script src="/js/qfw.js"></script>
@@ -85,6 +69,28 @@
 		$(function(){
 			mCommunity().initIndex();
 		});
+		var data={{.T.data}}
+		var strVar = "";
+		strVar += "<li class=\"col-xs-12\"><table align=\"center\"><caption><div class=\"left\">$EntName<\/div><b class=\"$status\">$OpStateName<\/b><\/caption><tr><td class=\"left\">注册号:<span>$RegNo<\/span><\/td><td>法定代表人:<span>$LeRep<\/span><\/td><\/tr><tr><td class=\"left\">成立时间:<span>$EstDate<\/span><\/td><td>所在地:<span>$OpLocDistrict<\/span><\/td><\/tr><tr><td colspan=\"2\"><hr class=\"list\"><\/td><\/tr><\/table><\/li>";
+		if(data.length>10){
+			data=eval(data);
+			var li="";
+			for (var i=0;i<5;i++){
+				var tmp=strVar.replace("$EntName",data[i].EntName)
+										 .replace("$RegNo",data[i].RegNo)
+										 .replace("$LeRep",data[i].LeRep)
+										 .replace("$OpLocDistrict",data[i].OpLocDistrict)
+										 .replace("$EstDate",data[i].EstDate)
+										 .replace("$OpStateName",data[i].OpStateName.substr(0,2));
+				if (data[i].OpStateName!="存续"&&data[i].OpStateName.indexOf("在营")==-1){
+					 tmp=tmp.replace("$status","ent-status-r");
+				}else{
+					tmp=tmp.replace("$status","ent-status-g");
+				}
+				li=li+tmp;
+			}
+			$(".inclist").append($(li));
+		}
 	</script>
  </body>
 </html>

+ 0 - 11
core/src/web/templates/search/entcommunity.html

@@ -49,17 +49,6 @@
 			</div>
 		</div>
 	</div>
-<<<<<<< HEAD
-=======
-	{{if session "userId"}}
-	<a href="/member/authentication/index" class="btn btn-primary">认证</a><br>
-	<span class="text-muted">认证后可正常使用</span><br>
-	{{else}}
-	<a href="/front/register" class="btn btn-primary">注册</a><br>
-	<span class="text-muted">注册认证后可正常使用,已有账号<a class="a-com-login">立即登录</a></span><br>
-	{{end}}
-	<img src="{{Msg "seo" "cdn"}}/images/qysq-1.png">
->>>>>>> release
 </div>
 {{include "/common/bottom.html"}}
 <script>

+ 1 - 1
core/src/web/templates/swordfish/infolist.html

@@ -15,7 +15,7 @@
 		a_interest={{.T.msgset.o_msgset.tender.a_key}};
 	}
 $(function(){
-	$(".b-nav>ul>li:eq(3)").addClass("b-nav-active");
+	$(".b-nav>ul>li:eq(4)").addClass("b-nav-active");
 	if(s_words.length!=0){
 		$("#okeywords").append(s_words.join(" ; ").replace(/\+/gm," "));
 	}else{

+ 1 - 1
core/src/web/templates/swordfish/rssset.html

@@ -351,7 +351,7 @@ $(function(){
 			autoChecked("bid",i_switchstatus==1?true:false,i_switchstatus);
 		}
 	}
-	$(".b-nav>ul>li:eq(2)").addClass("b-nav-active");
+	$(".b-nav>ul>li:eq(3)").addClass("b-nav-active");
 	$("#ckys").click(function(){
 		window.location.href="/front/swordfish";
 	});

+ 366 - 0
core/src/web/templates/swordfish/searchinfolist.html

@@ -0,0 +1,366 @@
+<html>
+<head>
+<title>信息检索</title>
+{{include "/common/inc.html"}}
+</head>
+<body>
+<script type="text/javascript">
+$(function(){
+	
+	$(".b-nav>ul>li:eq(2)").addClass("b-nav-active");
+	var seap = {{.T.s_type}};
+	if (seap.length < 1){
+		seap = "1"
+	}
+	type(seap);
+	var s_words = [];
+	s_words = {{.T.s_name}};
+	
+	var flog = {{.T.success}};
+	if (!flog){
+		$("#conlist").html('<div class="text-center"><div ><img style="width:137px;margin-top:60px;" src="/images/findnull.png"></div><div style="margin-bottom:50px;">没有找到和该关键词匹配的信息</div></div>');
+	}else{
+		$("#searchts").removeClass("hidden");
+		var str = ""
+		var temp = {{.T.msglist}}
+		str+=temp["s_content"];
+		a_visitedindex=temp["a_visitedindex"];
+		a_publishtime=temp["a_publishtime"];
+		f_id=temp["_id"];
+		$("#conlist").append('<div id="ycwords" datatype="'+temp["s_type"]+'">'+str+'</div>')
+		//信息条总数
+		le=$(".tslist").length;
+		//
+		$(".tslist").each(function(i){
+			$(this).children(".xh").text(function(i,v){
+				v = v.replace(".","")
+				return v
+			});
+			//关键词高亮
+			var html = $(this).html();
+				if(s_words != ""){
+					var wordsArray = s_words.split("+");
+					for(var si=0;si<wordsArray.length;si++){
+						var reg = new RegExp(wordsArray[si],"g");
+						html = html.replace(reg,function(word){
+							return '<font class="keyword">'+word+'</font>';
+						});
+					}
+				}
+			
+			
+			$(this).html(html);
+			//已访问过的灰色
+			var xh = $(this).children(".xh").text();
+			if(typeof(a_visitedindex)!= "undefined"){
+				for(var i=0;i<a_visitedindex.length;i++){
+					if(xh == a_visitedindex[i]){
+						$(this).find("a.bt").addClass("visited");
+					}
+				}
+			}
+			var datatype = $(this).parents("#ycwords").attr("datatype");
+			//if(datatype == "bid"){
+			//	datatype = "【中标公告】";
+			//}else if(datatype == "tender"){
+			//	datatype = "【招标公告】";
+			//}else{
+				datatype = "";
+			//}
+			$(this).find("a.bt").prepend(datatype).wrap("<div class='bt-parent' id="+xh+"></div>");
+			$(this).append(function(){
+				if(a_publishtime == "" || typeof(a_publishtime[xh]) == "undefined"){
+					return "";
+				}else{
+					var date1=new Date(Number(a_publishtime[xh]+"000"));//开始时间
+					var date2=new Date();//结束时间
+					var date3=date2.getTime()-date1.getTime();//时间差的毫秒数
+					//计算出相差天数
+					var days=Math.floor(date3/(24*3600*1000));
+					//计算出小时数
+					var leave1=date3%(24*3600*1000);//计算天数后剩余的毫秒数
+					var hours=Math.floor(leave1/(3600*1000));
+					//计算相差分钟数
+					var leave2=leave1%(3600*1000);//计算小时数后剩余的毫秒数
+					var minutes=Math.floor(leave2/(60*1000));
+					//计算相差秒数
+					/*var leave3=leave2%(60*1000);//计算分钟数后剩余的毫秒数
+					var seconds=Math.round(leave3/1000);*/
+					var timeDiff = "1分钟";
+					if(days > 0){
+						timeDiff = days+"天";
+					}else if(hours > 0){
+						timeDiff = hours+"小时";
+					}else if(minutes > 0){
+						timeDiff = minutes+"分钟";
+					}
+					return '<span class="time-diff">'+timeDiff+'前</span>';
+				}
+			});
+		});
+	}
+	setTimeout(function(){
+			var abt=$("a.bt");
+			abt.each(function(){
+				var h=$(this).attr("href");
+				$(this).removeAttr("target");
+				$(this).removeAttr("href");
+				if (h.indexOf("java")==-1){							
+					$(this).attr("s",h)
+					$(this).attr("f_id",f_id)
+					$(this).attr("href","javascript:void(0);")	
+				}
+			})
+			abt.click(function(){
+				var h=$(this).attr("s");
+				open_window(h);
+				return false;
+			})
+		},800)
+});
+
+
+	
+</script>
+<style type="text/css">
+#kong{
+	margin-top:120px; 
+	margin-bottom:150px;
+	font-size:18px;
+	cursor:hand;
+}
+.visited{
+	color: #a0a0a0;
+}
+.time-diff{
+	color: #a0a0a0;
+	font-size: 14px;
+	display: inline-block;
+	width: 40px;
+	white-space:nowrap;
+	margin-left: 50px;
+}
+.keyword{
+	color: #FF5A5F;
+}
+.tim{
+	padding:21px 0px;
+}
+.row{
+	margin-left:10px;
+	margin-right:10px;
+}
+#ycwords>div:first-of-type{
+	display:none;
+}
+#forkw{
+	margin-top: 15px;
+	padding:10px 0px 10px 50px;
+	background-color: #F7F8FA;
+	color: #a0a0a0;
+}
+.xh{
+	width: 10%;
+	color:#35C5DA;
+	font-size:15px;
+	font-weight:bold;
+	margin:0px 10px;
+	float:left;
+	display: inline-block; 
+	width:18px;
+	text-align:right;
+}
+.tslist{
+	border-bottom:1px solid #ccc;
+	width:100%; 
+	padding:15px 0px;
+}
+#timestamp{
+	color:#ccc;
+}
+#bt{
+	font-size:15px;
+}
+#more{
+	border:1px solid #ccc; 
+	margin:20px;
+}
+.btn-link:hover{
+	text-decoration:none;
+}
+.btn-link{
+	text-decoration:none; 
+	color:#000;
+}
+.bt-parent{
+	width: 82%;
+	display: inline-block;
+}
+#searchtitle{
+	padding:25px 30px 10px 30px;
+}
+#searchtitle span{
+	padding:0px 20px;
+	font-size:16px;
+	cursor:hand;
+	margin-left:-10px;
+}
+#searchtitle span:hover{
+	color:#37c6da;
+}
+#searchzhb2{
+	border-left:2px solid rgb(229, 230, 233);
+	border-right:2px solid rgb(229, 230, 233);
+}
+.searchactive{
+	color:rgb(53, 197, 218);
+}
+.searchbtn{
+	border:1px solid #37c6da;
+	background-color:#37c6da;
+	height:38px; 
+	width:130px; 
+	line-height:38px;
+	border-radius: 4px;
+	color:#fff;
+	padding-left:28px;
+	font-size:15px;
+	cursor:hand;
+}
+.rsssetbtn{
+	border:1px solid #37c6da; 
+	height:38px; 
+	width:180px; 
+	line-height:38px;
+	vertical-align: middle;
+	border-radius: 4px;
+	padding-left:28px;
+	font-size:15px;
+	cursor:hand;
+}
+#conlist{
+	padding:20px 50px 10px 0px;
+	margin-left:30px;
+}
+.tslist {
+	padding-left:0px !important;
+}
+
+.dybtn{
+	border:1px solid #37c6da;
+	background-color:#37c6da;
+	height:38px; 
+	width:130px; 
+	line-height:38px;
+	border-radius: 4px;
+	color:#fff;
+	font-size:15px;
+	cursor:hand;
+    display: inline-block;
+	margin:10px;
+}
+</style>
+<!-- 头部 -->
+{{include "/common/swordfishhead.html"}}
+<!-- 中间 -->
+<div class="b-content container-fluid">
+	<div class="b-left">
+		<div class="swordfish-page-title">
+			<i class="img-circle glyphicon jianyu"></i>信息查询
+		</div>
+		<!-- 关键词提示start -->
+		<div id="searchtitle" >
+		<span onClick="type(1)" id="searchzhb1" class="searchactive">招标公告</span>
+		<span onClick="type(2)" id="searchzhb2">中标公告</span>
+		<span id="searchzhb3">企业情报</span>
+		</div>
+		<div id="listform" style="padding:0px 0px 10px 40px">
+		<form action="/member/swordfish/searchinfolist" name="searchsword" method="post">
+		<div class="form-group">
+		<div class="col-sm-7">
+        <input class="form-control" id="searchname" name="searchname" value="{{.T.keywords}}" style="background-color:#FFFFFF; border:1px solid #e5e6e9;" placeholder="输入关键词查询"/>
+	    </div>
+		<div class="col-sm-2">
+		<input name="s_type" id="sea_type" value="1" style="display:none;"/>
+		<input name="s_name" id="sea_name" value="" style="display:none;"/>
+		<div class="searchbtn" onclick="subsea()"><i class="glyphicon sousuo"></i> 查询</div>
+		</div>
+		<div class="col-sm-3">
+        <!--<div class="rsssetbtn" onClick="window.location.href='/member/swordfish/rssset';">进入我的信息订阅</div>-->
+		</div>
+		</div>
+		</form>
+		</div>
+		<!-- 关键词提示end -->
+		<!-- 列表start -->
+		<div class="row"><div  class="col-sm-12" id="conlist"></div></div>
+		<!-- 列表end -->
+		<div id="more" class="hidden">
+			<div class="row">
+			    <div class="col-sm-12 btn btn-link text-center" onClick="loadMore()">
+		        点击加载更多
+				</div>
+			</div>
+		</div>
+		<div id="searchts" class="text-center hidden">
+		<div class="dybtn"  onClick="window.location.href='/member/swordfish/rssset';">订阅</div>
+		<div>确认该关键词查询结果无误</div>
+		</div>	
+	</div>
+	<div class="b-right swordfish-qrcode text-center">
+		<img src="/images/swordfish/qrcode.png">
+		<br>关注微信公众号:企明星
+	</div>
+</div>
+
+<!-- 按钮触发模态框 -->
+<button class="btn hidden kfing" data-toggle="modal" 
+   data-target="#myModal">
+</button>
+
+<!-- 模态框(Modal) -->
+<div class="modal fade" id="myModal" tabindex="-1" role="dialog" 
+   aria-labelledby="myModalLabel" aria-hidden="true">
+   <div class="modal-dialog">
+      <div class="modal-content" style="height:500px;">
+         <div class="modal-header">
+            <button type="button" class="close" 
+               data-dismiss="modal" aria-hidden="true">
+                  &times;
+            </button>
+            <h4 class="modal-title" id="myModalLabel">
+               企业情报
+            </h4>
+         </div>
+         <div class="modal-body text-center" style="margin-top:150px;">
+            开发中,敬请期待!
+         </div>
+         
+      </div><!-- /.modal-content -->
+</div><!-- /.modal -->
+</div>
+<!-- 底部 -->
+{{include "/common/bottom.html"}}
+<script type="text/javascript">
+$("#searchzhb3").click(function(){
+	$(".kfing").click();
+});
+function subsea(){
+	var searchname = $("#searchname").val();
+	searchname = searchname.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"+");
+	document.getElementById("sea_name").value = searchname;
+	document.forms['searchsword'].submit();
+}
+function type(i){
+	document.getElementById("sea_type").value = i;
+	for (j=1;j<3;j++){
+		if (j==i){
+			$("#searchzhb"+i).addClass("searchactive");
+		}else{
+			$("#searchzhb"+j).removeClass("searchactive");
+		}
+	}
+}
+</script>
+</body>
+</html>

+ 167 - 0
core/src/web/templates/swordfish/wxsearch.html

@@ -0,0 +1,167 @@
+<html>
+<head>
+<title>企明星-剑鱼-信息检索</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<meta name="renderer" content="webkit">
+<link href="{{Msg "seo" "cdn"}}/wxswordfish/style.css" rel="stylesheet">
+{{include "/common/inc.html"}}
+<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
+<script src="{{Msg "seo" "cdn"}}/js/jquery.js"></script>
+<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js"></script>
+<script src="{{Msg "seo" "cdn"}}/wxswordfish/main.js"></script>
+<script src="{{Msg "seo" "cdn"}}/wxswordfish/jquery.resize.js"></script>
+<script>
+	var msgset= {{.T.msgset}};
+	initShare({{.T.signature}},{{.T.shareid}});
+	$(function(){
+		$(".searchname").focus();
+	});
+</script>
+<style type="text/css">
+.searchname{
+	background-color:#FFFFFF; 
+	border:1px solid #e5e6e9;
+	height:45px;
+	width:100%;
+    border-radius: 10px;
+	padding:2px 10px 2px 60px;
+	font-size:16px;
+	position:relative;
+}
+.wxhead{
+    padding: 10px 15px;
+	background-color:#F0F0F0;
+}
+.tubiao img{
+    position: absolute;
+    z-index: 10;
+    margin-top: 12px;
+    color: #000;
+	margin-left:20px;
+	height:25px;
+}
+.xiaochu{
+	float:right;
+}
+.xiaochu img{
+    position: absolute;
+    z-index: 10;
+    top: 20px;
+	right: 30px;
+	height:25px;
+}
+.searchzhao1,.searchzhong1{
+	float:left;
+	width:10%;
+	margin-top: 10px;
+	cursor:hand;
+}
+
+.searchzhao1 img,.searchzhong1 img{
+	height:25px;
+	
+}
+.searchzhao2,.searchzhong2{
+	float:left;
+	margin:0px 5px;
+	width:35%;
+}
+.searchzhao3,.searchzhong3{
+	float:left;
+	width:140px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+.searchzhao3 span , .searchzhong3 span{
+	float:left;
+	
+}
+.rsssetbtn{
+	border:1px solid #37c6da; 
+	background-color:#37c6da;
+	height:38px; 
+	width:100%; 
+	line-height:38px;
+	vertical-align: middle;
+	border-radius: 4px;
+	font-size:15px;
+	color:#fff;
+}
+#myorder{
+	width:100%; 
+	margin-top:40px;
+	padding:0px 30px;
+}
+.searchshow{
+	border-top:1px solid #e5e6e9;
+	padding:10px 20px;
+}
+</style>
+</head>
+<body>
+
+<div class="wxhead"><span class="tubiao"><img src="/images/wxjss.png"/></span><input class="form-control searchname" name="searchnameshow" value="{{.T.keywords}}" placeholder="输入关键词查询"/>
+<span class="xiaochu"><img class="qcimg" src="/images/wxqc.png"/></span>
+</div>
+<div class="searchshow">
+	<form action="/member/wxswordfish/searchlist" name="searchone" method="post">
+		<div onClick="searchbiao(1)" style="height:45px;line-height:45px;cursor:hand;">
+		<div class="searchzhao1"><img src="/images/wxjs.png"/></div>
+		<div class="searchzhao2">查询招标公告:</div>
+		<div class="searchzhao3">
+		<span>{{.T.keywords}}</span>
+		</div>
+		<div style="both:clear;"></div>
+		<input name="searchname" id="searchname1" value="" style="display:none;"/>
+		<input name="s_type" id="sea_type" value="1" style="display:none;"/>
+		<input name="s_name" id="sea_name1" value="" style="display:none;"/>
+		</div>
+	</form>
+		<div  style="border-top:1px solid #e5e6e9; width:100%;"></div>
+	<form action="/member/wxswordfish/searchlist" name="searchtwo" method="post">
+		<div onClick="searchbiao(2)" style="height:45px;line-height:45px;cursor:hand;">
+		<div class="searchzhong1"><img src="/images/wxjs.png"/></div>
+		<div class="searchzhong2">查询中标公告:</div>
+		<div class="searchzhong3">
+		<span>{{.T.keywords}}</span>
+		</div>
+		<div style="both:clear;"></div>
+		<input name="searchname" id="searchname2" value="" style="display:none;"/>
+		<input name="s_type" id="sea_type" value="2" style="display:none;"/>
+		<input name="s_name" id="sea_name2" value="" style="display:none;"/>
+		</div>
+	</form>
+		<div style="border-top:1px solid #e5e6e9; width:100%;"></div>
+		<div id="myorder" class="text-center">
+		<div class="rsssetbtn" onClick="window.location.href='/swordfish/page';">进入我的信息订阅</div>
+		</div>
+</div>
+{{include "/swordfish/wxtoolbar.html"}}
+<script type="text/javascript">
+	$(".searchname").keyup(function(){
+        var restr = $(".searchname").val();
+		$(".searchzhao3 span").html(restr);
+		$(".searchzhong3 span").html(restr);
+    });
+	$(".qcimg").click(function(){
+		$(".searchname").val("");
+		$(".searchzhao3 span").html("");
+		$(".searchzhong3 span").html("");
+	});
+	function searchbiao(i){
+		var searchname = $(".searchname").val();
+		document.getElementById("searchname"+i).value = searchname;
+		searchname = searchname.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"+");
+		document.getElementById("sea_name"+i).value = searchname;
+		if (i==1){
+			document.forms['searchone'].submit();
+		}else{
+			document.forms['searchtwo'].submit();
+		}
+		
+	}
+</script>
+</body>
+</html>

+ 317 - 0
core/src/web/templates/swordfish/wxsearchlist.html

@@ -0,0 +1,317 @@
+<html>
+<head>
+<title>企明星-剑鱼-信息检索结果</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<meta name="renderer" content="webkit">
+<link href="{{Msg "seo" "cdn"}}/wxswordfish/style.css" rel="stylesheet">
+{{include "/common/inc.html"}}
+<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
+<script src="{{Msg "seo" "cdn"}}/js/jquery.js"></script>
+<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js"></script>
+<script src="{{Msg "seo" "cdn"}}/wxswordfish/main.js"></script>
+<script src="{{Msg "seo" "cdn"}}/wxswordfish/jquery.resize.js"></script>
+<script>
+	var msgset= {{.T.msgset}};
+	initShare({{.T.signature}},{{.T.shareid}});
+</script>
+
+<script type="text/javascript">
+$(function(){
+	
+	var s_words = [];
+	s_words = {{.T.s_name}};
+	
+	var flog = {{.T.success}};
+	if (!flog){
+		$(".nullcontent").removeClass("hidden");
+		$(".resbm").addClass("hidden");
+		$(".rescontent").addClass("hidden");
+	}else{
+		$("#resbm").removeClass("hidden");
+		var str = ""
+		var temp = {{.T.msglist}}
+		console.log({{.T.msglist}})
+		str+=temp["s_content"];
+		a_visitedindex=temp["a_visitedindex"];
+		a_publishtime=temp["a_publishtime"];
+		f_id=temp["_id"];
+		$(".rescontent").append('<div id="ycwords" datatype="'+temp["s_type"]+'">'+str+'</div>')
+		//信息条总数
+		le=$(".tslist").length;
+		//
+		$(".tslist").each(function(i){
+			$(this).children(".xh").text(function(i,v){
+				v = v.replace(".","")
+				return v
+			});
+			$(this).children(".xh").wrap('<div class="resnumb"><div class="one"></div></div>');
+			//关键词高亮
+			var html = $(this).html();
+				if(s_words != ""){
+					var wordsArray = s_words.split("+");
+					for(var si=0;si<wordsArray.length;si++){
+						var reg = new RegExp(wordsArray[si],"g");
+						html = html.replace(reg,function(word){
+							return '<font class="keyword">'+word+'</font>';
+						});
+					}
+				}
+			
+			
+			$(this).html(html);
+			//已访问过的灰色
+			var xh = $(this).find("span.xh").text();
+			if(typeof(a_visitedindex)!= "undefined"){
+				for(var i=0;i<a_visitedindex.length;i++){
+					if(xh == a_visitedindex[i]){
+						$(this).find("a.bt").addClass("visited");
+					}
+				}
+			}
+			var datatype = $(this).parents("#ycwords").attr("datatype");
+			//if(datatype == "bid"){
+			//	datatype = "【中标公告】";
+			//}else if(datatype == "tender"){
+			//	datatype = "【招标公告】";
+			//}else{
+				datatype = "";
+			//}
+			$(this).find("a.bt").prepend(datatype).wrap("<div class='two bt-parent' id="+xh+"></div>");
+			$(this).find(".two").appendTo($(this).find(".resnumb"));
+			$(this).append(function(){
+				if(a_publishtime == "" || typeof(a_publishtime[xh]) == "undefined"){
+					return "";
+				}else{
+					var date1=new Date(Number(a_publishtime[xh]+"000"));//开始时间
+					var date2=new Date();//结束时间
+					var date3=date2.getTime()-date1.getTime();//时间差的毫秒数
+					//计算出相差天数
+					var days=Math.floor(date3/(24*3600*1000));
+					//计算出小时数
+					var leave1=date3%(24*3600*1000);//计算天数后剩余的毫秒数
+					var hours=Math.floor(leave1/(3600*1000));
+					//计算相差分钟数
+					var leave2=leave1%(3600*1000);//计算小时数后剩余的毫秒数
+					var minutes=Math.floor(leave2/(60*1000));
+					//计算相差秒数
+					/*var leave3=leave2%(60*1000);//计算分钟数后剩余的毫秒数
+					var seconds=Math.round(leave3/1000);*/
+					var timeDiff = "1分钟";
+					if(days > 0){
+						timeDiff = days+"天";
+					}else if(hours > 0){
+						timeDiff = hours+"小时";
+					}else if(minutes > 0){
+						timeDiff = minutes+"分钟";
+					}
+					return '<div style="clear:both;"></div><div  class="restime time-diff">'+timeDiff+'前</div>';
+				}
+			});
+		});
+	}
+	setTimeout(function(){
+			var abt=$("a.bt");
+			abt.each(function(){
+				var h=$(this).attr("href");
+				$(this).removeAttr("target");
+				$(this).removeAttr("href");
+				if (h.indexOf("java")==-1){							
+					$(this).attr("s",h)
+					$(this).attr("f_id",f_id)
+					$(this).attr("href","javascript:void(0);")	
+				}
+			})
+			abt.click(function(){
+				var h=$(this).attr("s");
+				open_window(h);
+				return false;
+			})
+		},800)
+});
+
+
+	
+</script>
+
+<style type="text/css">
+body{
+	background-color:#F0F0F0;
+}
+#ycwords>div:first-of-type{
+	display:none;
+}
+.searchname{
+	background-color:#FFFFFF; 
+	border:1px solid #e5e6e9;
+	height:45px;
+	width:100%;
+    border-radius: 10px;
+	padding:2px 10px 2px 60px;
+	font-size:16px;
+	position:relative;
+}
+.wxhead{
+    padding: 10px 15px;
+	background-color:#F0F0F0;
+}
+.tubiao img{
+    position: absolute;
+    z-index: 10;
+    margin-top: 12px;
+    color: #000;
+	margin-left:20px;
+	height:25px;
+}
+.xiaochu{
+	float:right;
+}
+.xiaochu img{
+    position: absolute;
+    z-index: 10;
+    top: 20px;
+	right: 30px;
+	height:25px;
+}
+.rsssetbtn{
+	border:1px solid #37c6da; 
+	background-color:#37c6da;
+	height:38px; 
+	width:100%; 
+	line-height:38px;
+	vertical-align: middle;
+	border-radius: 4px;
+	font-size:15px;
+	color:#fff;
+}
+#myorder{
+	width:100%; 
+	margin-top:40px;
+	padding:0px 30px;
+}
+.reslist{
+	width:100%;
+	height:90px;
+	border-bottom:1px solid #e5e6e9;
+	padding-top:5px;
+}
+.resnumb .one{
+	color:#37c6da;
+	font-size:16px;
+	width:5%;
+	height:45px;
+	display: inline-block;
+	float:left;
+}
+.resnumb .two{
+	font-size:16px;
+	font-weight:500;
+	margin-left:10px;
+	display: inline-block;
+	height:45px;
+	width:88%;
+	float:left;
+	line-height:24px;
+    overflow: hidden;
+}
+.restime{
+	float:right; 
+	color:#999;
+	margin-top:5px;
+}
+.resbm {
+    display: table;
+    position: fixed;
+    left: 0px;
+    right: 0px;
+    bottom: 0px;
+    height: 50px;
+    width: 100%;
+    background-color: #37c6da;
+	border:1px solid #37c6da
+}
+.resdy{
+	float:right; 
+	height:40px; 
+	margin:5px 10px; 
+	width:100px; 
+	border:1px solid #fff;
+	line-height:40px;
+	border-radius:4px;
+	color:#fff;
+	padding-left:20px;
+	cursor:hand;
+}
+.rests{
+	height:50px;
+	line-height:50px;
+	padding-left:15px;
+	color:#fff;
+	font-size:14px;
+	float:left;
+    overflow: hidden;
+	width:60%;
+}
+.rescontent,.nullcontent{
+	border-top:1px solid #e5e6e9;
+	padding:10px 20px;
+	background-color:#fff;
+	width:100%;
+	height:100%;
+}
+.tslist{
+	height:80px;
+	border-bottom: 1px solid #ccc;
+	padding: 5px;
+}
+.keyword{
+	color: #FF5A5F;
+}
+</style>
+</head>
+<body>
+<div style="background-color:#fff;">
+<div class="wxhead"><span class="tubiao"><img src="/images/wxjss.png"/></span><input class="form-control searchname" name="searchname" value="{{.T.keywords}}" placeholder="输入关键词查询"/>
+<span class="xiaochu"><img class="qcimg" src="/images/wxqc.png"/></span>
+</div>
+<div class="rescontent">
+	
+</div>
+
+
+</div>
+<div class="resbm" >
+<div class="rests">确认关键词的查询结果无误</div>
+<div class="resdy"  onClick="window.location.href='/swordfish/page';">
+直接订阅
+</div>
+
+<div style="both:clear;"></div>
+</div>
+
+<div class="nullcontent text-center  hidden">
+<div >
+<img style="width:137px;margin-top:160px;" src="/images/findnull.png">
+</div>
+<div>没有找到和该关键词匹配的信息</div>
+</div>
+
+
+<script type="text/javascript">
+	$(".searchname").click(function(){
+        window.location.href="/member/wxswordfish/search";
+    });
+	$(".qcimg").click(function(){
+		$(".searchname").val("");
+		$(".searchzhao3 span").html("");
+		$(".searchzhong3 span").html("");
+	})
+	function open_window(link){
+		if(!/^http/.test(link)){
+			link="http://"+link
+		}
+		window.open("/visit/redirect?url="+escape(link));
+	}
+</script>
+</body>
+</html>