Bladeren bron

Merge branch 'dev2.0' of 192.168.3.17:qmx/jy into dev2.0

张金坤 8 jaren geleden
bovenliggende
commit
2eb23312f9

+ 8 - 0
src/jfw/front/front.go

@@ -87,6 +87,7 @@ type Front struct {
 	historypush       xweb.Mapper `xweb:"/swordfish/historypush"`        //历时推送记录
 	historypushPaging xweb.Mapper `xweb:"/swordfish/historypush/paging"` //历时推送记录--分页
 	aboutus           xweb.Mapper `xweb:"/front/aboutus.html"`           //关于我们
+	busicooperation	  xweb.Mapper `xweb:"/front/busicooperation.html"`   //商务合作
 
 	/********************wxkeyset:v1.8**************************/
 	wxrssset        xweb.Mapper `xweb:"/swordfish/page"`
@@ -847,6 +848,13 @@ func (f *Front) Aboutus() error {
 	}
 }
 
+//商务合作
+func (f *Front) Busicooperation() error {
+
+	content, _ := f.Render4Cache("/pc/businesscooperation.html", &f.T)
+	return f.SetBody(content)
+}
+
 func (f *Front) Gethotkey() error {
 	keys := []interface{}{}
 	tmp := redis.Get("sso", "jy_hotkeys")

+ 2 - 1
src/jfw/front/wxkeyset.go

@@ -2,7 +2,6 @@
 package front
 
 import (
-	"gopkg.in/mgo.v2/bson"
 	"jfw/wx"
 	"log"
 	"qfw/util"
@@ -10,6 +9,8 @@ import (
 	"strconv"
 	"strings"
 	"time"
+
+	"gopkg.in/mgo.v2/bson"
 )
 
 //进入订阅词设置

+ 70 - 6
src/jfw/modules/followent/src/followent/followent.go

@@ -8,6 +8,7 @@ import (
 	"qfw/util/elastic"
 	"qfw/util/redis"
 	"strconv"
+	"time"
 	"tools"
 
 	"github.com/go-xweb/xweb"
@@ -24,6 +25,7 @@ type FollowEnt struct {
 	recList    xweb.Mapper `xweb:"/jylab/followent/recList"`           //获取推荐企业列表
 	saveEnt    xweb.Mapper `xweb:"/jylab/followent/saveEnt"`           //保存关注企业
 	followYorN xweb.Mapper `xweb:"/jylab/followent/followYorN"`        //查询用户是否关注企业
+	qgFollow   xweb.Mapper `xweb:"/jylab/followent/qgFollow"`          //取消关注
 
 }
 
@@ -45,9 +47,9 @@ func (f *FollowEnt) EntList() error {
 	datas, ok := mongodb.Find("jylab_followent", `{"s_userid":"`+f.GetSession("userId").(string)+`"}`, `{"l_createtime":-1}`, `{"_id":1,"winner":1,"s_userid":1,"s_openid":1,"l_createtime":1,"s_id":1}`, false, 0, 10)
 	f.T["flag"] = false
 	if ok && datas != nil && len(*datas) > 0 {
-		for k, v := range *datas {
+		for _, v := range *datas {
 			v["_id"] = util.EncodeArticleId2ByCheck(util.BsonIdToSId(v["_id"]))
-			log.Println(k, ":", v["l_createtime"])
+			v["s_id"] = util.EncodeArticleId2ByCheck(util.BsonIdToSId(v["s_id"]))
 		}
 		f.T["datas"] = datas
 	}
@@ -87,23 +89,65 @@ func (f *FollowEnt) SaveEnt() {
 //企业最新信息
 func (f *FollowEnt) NewInfo(winner, id string) error {
 	defer util.Catch()
-	////var winner = "天津超林时代科技发展有限公司"
-	fields := `{"projectname":1,"projectcode":1,"bidamount":1,"title":1,"publishtime":1,"subtype":1}`
+	id = util.EncodeArticleId2ByCheck(id)
+	fmt.Println(id)
+	fields := `{"projectname":1,"projectcode":1,"bidamount":1,"title":1,"publishtime":1,"subtype":1,"href":1}`
 	data, ok := mongodb.Find("bidding", `{"winner":"`+winner+`"}`, nil, fields, false, -1, -1)
 	//if !ok || data == nil || len(*data) == 0 {
 	//	return f.Render("_error.html")
 	//}
 	if ok && data != nil && *data != nil && len(*data) != 0 {
 		f.T["data"] = data
-		fmt.Println(f.T["data"])
 	}
 	f.T["winner"] = winner
+	f.T["id"] = id
 	return f.Render("/weixin/set.html", &f.T)
 }
+
+//用户是否已关注企业判断
 func (f *FollowEnt) FollowYorN() error {
 	defer util.Catch()
+	s_id := ""
+	userId := f.GetSession("userId").(string)
+	id := f.GetString("id")
+	winner := f.GetString("winner")
+	fmt.Println("===========", userId, id, winner)
+	if id == "" {
+		s_id = createId(winner)
+		fmt.Println("空")
+	} else {
+		fmt.Println("不为空")
+		s_id = util.DecodeArticleId2ByCheck(f.GetString("id"))[0]
+		fmt.Println("1111111111", s_id)
+	}
+	var follow = "n"
+	if mongodb.Count("jylab_followent", `{"s_userid":"`+userId+`","s_id":"`+s_id+`"}`) > 0 {
+		follow = "y" //已经关注此企业
+		fmt.Println("已关注")
+	}
+	f.ServeJson(map[string]interface{}{
+		"follow": follow,
+		"s_id":   util.EncodeArticleId2ByCheck(s_id),
+	})
+	return nil
+}
+
+//取消企业关注
+func (f *FollowEnt) QgFollow() error {
+	defer util.Catch()
+	status := "n"
 	userId := f.GetSession("userId").(string)
-	fmt.Println(userId)
+	id := f.GetString("id")
+	fmt.Println("取关时id=======", id)
+	s_id := util.DecodeArticleId2ByCheck(id)[0]
+	fmt.Println("解密后的id=======", s_id)
+	ok := mongodb.Del("jylab_followent", `{"s_userid":"`+userId+`","s_id":"`+s_id+`"}`)
+	if ok {
+		status = "y"
+	}
+	f.ServeJson(map[string]interface{}{
+		"status": status,
+	})
 	return nil
 }
 
@@ -115,3 +159,23 @@ func (f *FollowEnt) Followent() error {
 	log.Println("data:", redis.Get("sso", "followent"))
 	return f.Render("/weixin/index.html")
 }
+
+//没有企业id创建企业id
+func createId(winner string) string {
+	defer util.Catch()
+	tem, ok := mongodb.FindOneByField("winner", `{"winner":"`+winner+`"}`, `{"_id":1}`)
+	winnerid := ""
+	if ok && len(*tem) == 0 {
+		data := map[string]interface{}{}
+		data["winner"] = winner
+		data["winnersign"] = 1
+		data["l_createtime"] = time.Now().Unix()
+		winnerid = mongodb.Save("winner", data)
+		data["_id"] = winnerid
+		flag := elastic.Save("winner", "winner", data)
+		if !flag {
+			log.Println("企业保存elastic出错!")
+		}
+	}
+	return winnerid
+}

+ 6 - 0
src/jfw/modules/followent/src/followent/myfwent.go

@@ -29,8 +29,10 @@ func (m *Myfwent) Addfwent() error {
 	followId := ""
 	s_id := ""
 	entname := m.GetString("winner")
+	log.Println("id:", m.GetString("id"))
 	if m.GetString("id") == "" {
 		s_id = Findent(entname)
+		log.Println("s_id:", s_id)
 	} else {
 		s_id = util.DecodeArticleId2ByCheck(m.GetString("id"))[0]
 	}
@@ -64,6 +66,7 @@ func Findent(entname string) string {
 	defer util.Catch()
 	tem, ok := mongodb.FindOneByField("winner", `{"winner":"`+entname+`"}`, `{"_id":1}`)
 	winnerid := ""
+	log.Println(len(*tem), "---------------")
 	if ok && len(*tem) == 0 {
 		data := map[string]interface{}{}
 		data["winner"] = entname
@@ -75,6 +78,9 @@ func Findent(entname string) string {
 		if !flag {
 			log.Println("企业保存elastic出错!")
 		}
+	} else {
+		log.Println(*tem, "---------", util.BsonIdToSId((*tem)["_id"]))
+		winnerid = util.ObjToString(util.BsonIdToSId((*tem)["_id"]))
 	}
 	return winnerid
 }

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

@@ -351,6 +351,7 @@
 	display: block;
 	margin-bottom: 5px;
 	font-size: 14px;
+	color: #686868;
 }
 .jynoticelist>div:first-of-type>.type{
 	margin: 0px;
@@ -418,16 +419,16 @@
 .jynoticelist .priceStyle{
 	position: absolute;
     bottom: 10px;
-    font-size: 13px;
+    font-size: 14px;
     right: 7px;
-    color: #a0a0a0;
+    color: #686868;
 }
 .qy-followcancel{
 	background-color: #FE737A;
     color: #FFFFFF;
-    line-height: 50px;
-    margin-left: 20px;
-    margin-right: 20px;
+    line-height: 45px;
+    margin-left: 15px;
+    margin-right: 15px;
     border-radius: 3px;
     font-size: 18px;
     margin-top: 20px;
@@ -435,6 +436,18 @@
 	margin-bottom: 20px;
 
 }
+.gz-followcancel{
+	background-color: #2cb7ca;
+    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;
+}
 .setpage .noticehead{
 	background-color: #F8F8F8;	
 	border-bottom: 1px solid #ddd;

+ 7 - 6
src/jfw/modules/followent/src/web/templates/weixin/list.html

@@ -17,6 +17,7 @@ if(sessionStorage){
 <script src="/jylab/followent/js/common.js?v={{Msg "seo" "version"}}"></script>
 <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
 <script src="/jylab/followent/wxswordfish/share.js?v={{Msg "seo" "version"}}"></script>
+
 <script type="text/javascript">
 	$(function () {
         {{if .T.datas}}
@@ -33,17 +34,17 @@ if(sessionStorage){
             //时间标志
             tdf = timeDiff(new Date(Number(l_createtime+"000")));
             if (tdf != null){
-                tdf = "<img style='width:15px;position: relative;padding: 2px 4px;' src='/images/wx/jyclock.png'>"+tdf+"</div>";
+                tdf = "<img style='width:15px;position: relative;padding: 2px 4px;' src='/jylab/followent/images/wx/jyclock.png'>"+tdf+"</div>";
             }else{
                 tdf=""
             }
 
             var listno = parseInt(i)+parseInt(1);
-            allHtml +="<li data-id='"+data[i]["_id"]+"' data-winner='"+data[i]["winner"]+"' Sort='"+l_createtime+"'>"
+            allHtml +="<li data-id='"+data[i]["s_id"]+"' data-winner='"+data[i]["winner"]+"' Sort='"+l_createtime+"'>"
                 +"<div class='jyfwlistno'>"+listno+".</div>"
-                +"<div class='jyfwlisttitle'>"+(data[i]["winner"]?data[i]["winner"]:data[i]["winner"])+"</div>"
+                +"<div class='jyfwlisttitle' style='width:88%;'>"+(data[i]["winner"]?data[i]["winner"]:data[i]["winner"])+"</div>"
                 +"<div style='clear:both;'></div>"+rem
-                +"<img src='/images/wx/d.png' class='arrow-right'>"
+                +"<img src='/jylab/followent/images/wx/d.png' class='arrow-right'>"
                 +"<div class='jytimest'>"
                 +tdf+"</li>";
             jyno = listno;
@@ -71,10 +72,10 @@ if(sessionStorage){
 	<ul>
 	</ul>
 	<div class="divbtn"{{if .T.datas}}{{if eq (len .T.datas) 10}} disabled="disabled"{{end}}{{end}}>
-		<div id="addDiv" style="background-color: #2cb7ca;color: #FFFFFF;line-height:50px;margin-left: 20px;margin-right: 20px;border-radius: 3px;font-size: 18px;">+ 添加关注的企业</div>
+		<div id="addDiv" style="background-color: #2cb7ca;color: #FFFFFF;line-height:45px;margin-left: 15px;margin-right: 15px;border-radius: 3px;font-size: 18px;">+ 添加关注的企业</div>
 	</div>
 	<div class="tip" style="margin-top: 10px;display: none">
-		<img src="/images/wx/jyprompt.png">剑鱼提示:<front>可关注{{.T.followLimit}}个企业</front>
+		<img src="/jylab/followent/images/wx/jyprompt.png">剑鱼提示:<front>可关注{{.T.followLimit}}个企业</front>
 	</div>
 	{{include "/common/baiducc.html"}}
 </body>

+ 70 - 14
src/jfw/modules/followent/src/web/templates/weixin/set.html

@@ -15,17 +15,25 @@
 <script src="/jylab/followent/js/jy.js?v={{Msg "seo" "version"}}"></script>
 <script type="text/javascript">
 	var data = {{.T.data}};
-	var winner = {{.T.winner}};
-	
+	var winner = {{.T.winner}}; //企业名称
+	var id = {{.T.id}}; //企业id        
 	$(function(){
-		$.ajax({
-			type:'post',
-			url:'/jylab/followent/followYorN',
-			data:{},
-			success:function(r){
+		//查询用户是否关注此企业
+		$.post(
+			"/jylab/followent/followYorN",
+			{"id":id,"winner":winner},
+			function(data){
+				if(data["follow"] == "n"){
+					$(".gz-followcancel").removeClass("hidden");
+				}else{
+					$(".qy-followcancel").removeClass("hidden");
+				}
+				id = data["s_id"]
+				console.log("111111111"+id)
 				
 			}
-		})
+		)
+		console.log("222222222"+id)
 		var easyPopup = new EasyPopup("easypopup");
 		$(".noticehead").html(winner)
 		
@@ -62,21 +70,65 @@
 			    		+'</div>'
 			$(".jynotice").append(listhtml)			
 		}
+		//取消企业关注
 		$(".qy-followcancel").click(function(){
 			easyPopup.show();
 		})
 		//确定
 		$("#sure").click(function(){
 			easyPopup.hide();
-			EasyAlert.show("已取消关注");
-			setTimeout(function(){
-				window.location.href = "/followEnt/entList";
-			},500);
+			console.log(id)
+			if(id == ""){
+				EasyAlert.show("取消失败!");
+			}
+			//发送Ajax请求,取消关注
+			$.post(
+				"/jylab/followent/qgFollow",
+				{"id":id},
+				function(r){
+					if(r.status == "y"){
+						console.log("取消")
+						EasyAlert.show("已取消关注")
+						setTimeout(function(){
+							window.location.href = "/jylab/followent/entList";
+						},1000)
+					}
+				}				
+			)			
 		});
 		//取消
 		$("#cancel").click(function(){
 			easyPopup.hide();
 		});
+		
+		//关注企业
+		$(".gz-followcancel").click(function(){
+			$.post(
+				"/jylab/followent/addfwent",
+				{"id":id,"winner":winner},
+				function(r){
+					console.log(r);
+					if(r.status == "y" || r.status == "e"){
+                   		if(sessionStorage){
+                        sessionStorage.version="0";
+                   		}
+                  		//window.location.href = "/followeEnt/set/add/"+r.id;
+                  		EasyAlert.show('已关注"'+winner+'"')
+						setTimeout(function(){
+							window.location.href = "/jylab/followent/entList";
+						},1000)
+						
+               		}else if(r.status == "m"){
+                    	EasyAlert.show("最多可关注10个企业!");
+               		}else{
+                   		EasyAlert.show("数据提交失败!");
+                	}
+				}
+			)
+		})
+		
+		
+		
 	})
 	
 </script>
@@ -88,14 +140,18 @@
 		<li class="jynotice">	
 		</li>
 	</ul>
-	<div class="qy-followcancel">
+	<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>
 			<div class="easypopup-content" style="text-align:center;">
-				取消对"万达集团股份有限公司"关注?
+				取消对"{{.T.winner}}"关注?
 			</div>
 			<div class="easypopup-footer">
 				<button class="btn" id="sure">确定</button>

BIN
src/web/staticres/images/contactway.jpg


BIN
src/web/staticres/images/coopbanner1.jpg


BIN
src/web/staticres/images/datacooperation.jpg


BIN
src/web/staticres/images/fenge.jpg


BIN
src/web/staticres/images/fenge.png


BIN
src/web/staticres/images/othercooperation.jpg


BIN
src/web/staticres/images/pc-envelope.png


BIN
src/web/staticres/images/zengzhihezuo.png


+ 214 - 0
src/web/templates/pc/businesscooperation.html

@@ -0,0 +1,214 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title>商务合作</title>
+    {{include "/common/pnc.html"}}
+    <link href="/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <style>
+        .coopbanner1{
+            background: url(../images/coopbanner1.jpg) center center no-repeat;
+            background-size: cover;
+            height: 500px;
+        }
+        .coopbanner2{
+            position: relative;
+            background: url(../images/datacooperation.jpg) center center no-repeat;
+            background-size: cover;
+            height: 650px;
+        }
+        .coopbanner2 .title{
+            position: absolute;
+            width: 100%;
+            top: 70px;
+            font-size: 30px;
+            text-align: center;
+            color: #1d1d1d;
+        }
+        .coopbanner2 .content1{
+            position: absolute;
+            width: 42%;
+            left: 50%;
+            top: 174px;
+            margin-left: -266px;
+            font-size: 18px;
+            /*text-align: center;*/
+            color: #252627;
+        }
+        .coopbanner2 .content2{
+            position: absolute;
+            width: 44%;
+            left: 50%;
+            top: 205px;
+            margin-left: -266px;
+            font-size: 18px;
+            /*text-align: center;*/
+            color: #252627;
+        }
+        .coopbanner3{
+            position: relative;
+            background: -webkit-linear-gradient(left, rgba(16,73,167,1) , rgba(26,128,229,1));/* Safari 5.1 - 6.0 */
+            background: -o-linear-gradient(right, rgba(16,73,167,1), rgba(26,128,229,1));   /* Opera 11.1 - 12.0 */
+            background: -moz-linear-gradient(right, rgba(16,73,167,1), rgba(26,128,229,1)); /* Firefox 3.6 - 15 */
+            background: linear-gradient(to right, rgba(16,73,167,1) , rgba(26,128,229,1));  /* 标准语法ie9 */
+            FILTER:progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=rgba(16,73,167,1),endColorStr=rgba(26,128,229,1)); /*IE 6 7 8*/
+            height: 535px;
+        }
+        .coopbanner3 img{
+            position: absolute;
+            top: 116px;
+            left: 50%;
+            margin-left: -166px;
+        }
+        .coopbanner3 .title{
+            position: absolute;
+            width: 100%;
+            top: 70px;
+            font-size: 30px;
+            text-align: center;
+            color: #FFFFFF;
+        }
+        .coopbanner3 .content1{
+            position: absolute;
+            width: 38%;
+            left: 50%;
+            top: 252px;
+            margin-left: 85px;
+            font-size: 22px;
+            /*text-align: center;*/
+            color: #FFFFFF;
+        }
+        .coopbanner3 .content2{
+            position: absolute;
+            width: 38%;
+            left: 50%;
+            top: 290px;
+            margin-left: 85px;
+            font-size: 18px;
+            /*text-align: center;*/
+            color: #FFFFFF;
+        }
+        .coopbanner3 .content3{
+            position: absolute;
+            width: 38%;
+            left: 50%;
+            top: 320px;
+            margin-left: 85px;
+            font-size: 18px;
+            /*text-align: center;*/
+            color: #FFFFFF;
+        }
+        .coopbanner3 .zengzhiimg{
+            position: absolute;
+            width: 546px;
+            height: 328px;
+            top: 182px;
+            left: 50%;
+            margin-left: -566px;
+        }
+        .coopbanner4{
+            position: relative;
+            background: url(../images/othercooperation.jpg) center center no-repeat;
+            background-size: cover;
+            height: 300px;
+        }
+        .coopbanner4 .title{
+            position: absolute;
+            width: 100%;
+            top: 60px;
+            font-size: 30px;
+            text-align: center;
+            color: #0069d2;
+        }
+        .coopbanner4 .content{
+            position: absolute;
+            width: 534px;
+            left: 50%;
+            top: 174px;
+            margin-left: -267px;
+            font-size: 18px;
+            /*text-align: center;*/
+            color: #252627;
+        }
+        .coopbanner5{
+            position: relative;
+            background: url(../images/contactway.jpg) center center no-repeat;
+            background-size: cover;
+            height: 320px;
+        }
+        .coopbanner5 .title{
+            position: absolute;
+            width: 100%;
+            top: 60px;
+            font-size: 30px;
+            text-align: center;
+            color: #1d1d1d;
+        }
+        .coopbanner5 .content{
+            position: absolute;
+            width: 100%;
+            top: 73%;
+            text-align: center;
+            padding-left: 20px;
+            padding-right: 20px;
+            font-size: 14px;
+            color: #686868;
+        }
+        .coopbanner5 .emailbutton{
+            position: absolute;
+            /*margin: 0 auto;*/
+            top: 55%;
+            left: 50%;
+            margin-left: -112px;
+            width: 225px;
+            height: 40px;
+            border:2px solid rgba(0,167,190,1);
+        }
+        .coopbanner5 .emailbutton img{
+            width: 22px;
+            height: 16px;
+            margin-top: 11px;
+            margin-left: 20px;
+        }
+        .coopbanner5 .emailbutton div{
+            position: absolute;
+            left: 60px;
+            top: 5px;
+            color: rgba(0,167,190,1);
+            font-size: 18px;
+        }
+    </style>
+</head>
+<body class="indexpage">
+{{include "/common/pchead.html"}}
+<div class="coopbanner1"></div>
+<div class="coopbanner2">
+    <div class="title">数据合作</div>
+    <div class="content1">&nbsp&nbsp&nbsp&nbsp剑鱼招标订阅拥有千万级数量的招标、拟建和中标等项目信息,</div>
+    <div class="content2">覆盖全国全行业,可用于行业网站,CRM系统,企业级服务等方面。</div>
+</div>
+<div class="coopbanner3">
+    <img src="/images/fenge.png">
+    <div class="title">增值服务合作</div>
+    <div class="content1">合作商为剑鱼招标订阅用户提供商业增值服务,</div>
+    <div class="content2">要求合作商在招投标领域有丰富经验和行业样板客户,</div>
+    <div class="content3">能独立为用户提供招投标商业服务。</div>
+    <img class="zengzhiimg" src="/images/zengzhihezuo.png">
+</div>
+<div class="coopbanner4">
+    <div class="title">其他合作</div>
+    <div class="content">&nbsp&nbsp以上合作方式如不能满足您的需求,您可以直接与我们联系洽谈。</div>
+</div>
+<div class="coopbanner5">
+    <div class="title">联系方式</div>
+    <div class="emailbutton">
+        <img src="/images/pc-envelope.png">
+        <div>jy@topnet.net.cn</div>
+    </div>
+    <div class="content">(邮件内容应包含:公司名称、联系人、联系方式和合作需求等)</div>
+</div>
+
+{{include "/common/pcbottom.html"}}
+{{include "/common/baiducc.html"}}
+</body>
+</html>

+ 190 - 3
src/web/templates/weixin/wxpush.html

@@ -6,6 +6,7 @@
 <link href="/wxswordfish/style.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
 <script src="/js/jquery.js"></script>
+<script src="/js/rem.js"></script>
 <script src="/wxswordfish/share.js?v={{Msg "seo" "version"}}"></script>
 <style>
 	.findnull{
@@ -18,9 +19,10 @@ if(sessionStorage){
 }
 	initShare({{.T.signature}},{{.T.openid}},2,"jy_extend",{{.T.nickname}},{{.T.avatar}});
 var b_view = "{{.T.view}}";
+var zbadd = {{Msg "seo" "ZBADDRESS"}}
+var sds = "";
 $(function(){
 	//
-	var zbadd = {{Msg "seo" "ZBADDRESS"}}
 	var width=$(window).width();
 	var height=$(window).height();
 	var s_words = {{.T.data.s_words}};
@@ -33,7 +35,14 @@ $(function(){
 	var a_type={};
 	var topstype={};
 	var substype={};
+	var projectname={};
+	var projectid={};
+	var buyer={};
 	var bmatch={{.T.data.bmatch}};
+	var tabletime = ""
+	var tabletype = ""
+	var tableptname = ""
+	var tablebuyer = ""
 	if(bmatch){
 		$(".findnull").hide();
 	}else{
@@ -58,7 +67,6 @@ $(function(){
 		jywords = a_key;
 	}
 	//
-	var sds = "";
 	for(var i=0;i<jywords.length;i++){
 		if(i==0){
 			sds +=jywords[i]
@@ -81,6 +89,17 @@ $(function(){
 		return false;
 	}
 	$("body .listcontent").prepend(s_content);
+	var tablehtml='<table>'+
+					'<thead>'+
+					'<tr>'+
+					'<td>序号</td>'+
+					'<td>发布时间</td>'+
+					'<td>公告类型</td>'+
+					'<td>招标单位</td>'+
+					'<td>项目名称</td>'+
+					'</tr>'+
+					'</thead>'+
+					'<tbody>';
 	var mark="为您预览30天之内的信息,点击标题可查看详细信息。"
 	if (window.location.href.indexOf("bidinfo") > 0){
 		mark="为您推送以下信息,点击标题可查看详细信息。"
@@ -122,18 +141,26 @@ $(function(){
 					}else{
 						tdf = '';	
 					}
+					tabletime = formatDate(a_publishtime[xh]);
 					datatype="";
 					if(substype[xh] != ""&&substype[xh] != null){
 						datatype='<span class="type">'+substype[xh]+'</span>'
+						tabletype=substype[xh]
 					}else if(topstype[xh] != ""&&topstype[xh] != null){
 						datatype='<span class="type">'+topstype[xh]+'</span>'
+						tabletype=topstype[xh]
 					}else if(a_type[xh] != ""&&a_type[xh] != null){
 						if(a_type[xh] == "tender"){
 							datatype='<span class="type">招标</span>'
+							tabletype="招标"
 						}else if(a_type[xh] == "bid"){
 							datatype='<span class="type">中标</span>'
+							tabletype="中标"
 						}
 					}
+					//console.log(tabletype+":tabletype"+"tablebuyer:"+buyer[xh]+"---"+projectname[xh])
+					tablebuyer=buyer[xh]
+					tableptname=projectname[xh]
 					if (area&&area!="" && area!="undefined"){
 						area='<span class="location">'+area+'</span>';
 					}else{
@@ -148,8 +175,20 @@ $(function(){
 			var html = $(this).find("a.bt").html();
 			html = keyWordHighlight(html,s_words.join("|").replace(/\+/gm,"|"),'<font class="keyword">$1</font>');
 			$(this).find("a.bt").html(html);
+			tableptname= keyWordHighlight(tableptname,s_words.join("|").replace(/\+/gm,"|"),'<font class="keyword">$1</font>')
 		}
+		var tableid = $(this).find("a.bt").attr("eid");
+		var tablehref = $(this).find("a.bt").attr("href");
+		tablehtml +='<tr onClick="tablejump(\''+tableid+'\',\''+tablehref+'\')">'+
+					'<td>'+xh+'</td>'+
+					'<td>'+tabletime+'</td>'+
+					'<td>'+tabletype+'公告</td>'+
+					'<td>'+tablebuyer+'</td>'+
+					'<td>'+tableptname+'</td>'+
+					'</tr>'
 	});
+	tablehtml +='</tbody></table>';
+	$("#jytables").append(tablehtml);
 	setTimeout(function(){
 			var abt=$("a.bt");
 			abt.each(function(){
@@ -172,7 +211,44 @@ $(function(){
 				return false;
 			})
 		},800);
+	//展示
+	$(".showType .showlist").click(function(){
+	    $(this).addClass("on").siblings().removeClass("on");
+		$(".listcontent").removeClass("hidden");
+		$(".tablecontent").addClass("hidden");
+	})
+	$(".showType .showTable").click(function(){
+	    $(this).addClass("on").siblings().removeClass("on");
+		$(".listcontent").addClass("hidden");
+		$(".tablecontent").removeClass("hidden");
+	})
+	//
+	$(".blue").click(function(){
+		window.location.href="/wxkeyset/keyset/seniorset"
+	})
+	
 })
+//
+function tablejump(eid,href){
+	if(eid){
+		newredirect(zbadd,href,eid,sds);
+	}
+}
+//
+function   formatDate(date)   { 
+	var myDate = new Date(date*1000);      
+    var   year=myDate.getFullYear();
+    var   month=myDate.getMonth()+1;    
+	if(month<10){
+		month="0"+month
+	} 
+    var   date=myDate.getDate();      
+	if(date<10){
+		date="0"+date
+	} 
+    return   year+" "+month+""+date;     
+} 
+//
 function open_window(link){
 	if(!/^http/.test(link)){
 		link="http://"+link
@@ -255,13 +331,124 @@ a{
 .listcontent{
 	padding:0px 10px;
 }
+.showType{
+	margin-top: 8px;
+    padding-right: 15px;
+	display: flex;
+	justify-content: space-around;
+	align-content: center;
+	float:right;
+}
+.showType div{
+	padding-left: 30px;
+}
+.showType .showlist{
+	background: url(/images/search/showList.png)10px 3px no-repeat;
+	background-size: 30%;
+    margin-right: 15px;
+	line-height: 21px;
+}
+.showType .showtable{
+	background: url(/images/search/showTable.png)10px 2px no-repeat;
+	background-size: 30%;
+    margin-left: 15px;
+	line-height: 21px;
+}
+.showType .showlist.on{
+	background: url(/images/search/showList_on.png)10px 3px no-repeat;
+	background-size: 30%;
+	color: #2cb7ca;
+}
+.showType .showtable.on{
+	background: url(/images/search/showTable_on.png)10px 2px no-repeat;
+	background-size: 30%;
+	color: #2cb7ca;
+}
+.shuxian{
+	padding: 0px !important;
+    margin-right: -10px;
+	color: #e0e0e0;
+}
+#jytables{
+	/*不需要可自己删除*/
+	padding: .2rem;
+}
+#jytables table{
+	width: 100%;
+	border-collapse: collapse;
+}
+#jytables table td {
+	padding: 5px;
+	border: 1px solid #E0E0E0;
+	text-align: center;
+	vertical-align: middle;
+}
+#jytables table thead{
+	font-size: .28rem;
+	color: #686868;
+}
+#jytables table tbody{
+	font-size: .3rem;
+	color: #1d1d1d;
+}
+/*高亮字体*/
+#jytables table span.higHlight{
+	color: #2cb7ca;
+}
+.tablecontent{
+	width: 100%;
+    overflow-x: scroll;
+}
+#jytables{
+	width: 140%;
+}
+#jytables thead>tr>td:nth-child(1){
+	padding:.3rem 0;
+	width:30px;
+}
+#jytables tbody>tr>td:nth-child(2){
+	width:68px;
+}
+#jytables tbody>tr>td:nth-child(3){
+	width:74px;
+}
+#jytables tbody>tr>td:nth-child(4){
+	width:160px;
+	padding: 17px 5px;
+    line-height: 21px;
+    text-align: left;
+}
+#jytables tbody>tr>td:nth-child(5){
+	width: 160px;
+    padding: 17px 5px;
+    line-height: 21px;
+    text-align: left;
+}
+.prompt{
+	padding:10px 10px 20px;
+	position:absolute;
+}
+.blue{
+	color:#0987ff;
+}
 </style>
 </head>
 
 <body>
 <div></div>
-<div class=""></div>
+<div class="showType">
+	<div class="showlist on">列表</div>
+	<div class="shuxian">|</div>
+	<div class="showtable">表格</div>
+</div>
+<div style="height:37px;border-bottom:1px solid #ddd;border-top: 1px solid #ddd;"></div>
 <div class="listcontent"></div>
+<div class="tablecontent hidden">
+	<section id="jytables">
+		
+	</section>
+	<div class="prompt">提示:为了获得更佳的体验,推荐<span class="blue">打开邮件推送</span>,用电脑查看邮件中的表格。</div>
+</div>
 <span class=" text-center findnull">
 <div>
 <img style="width:200px;margin:100px 0 50px 0;" src="/images/wx/jysorry.png">