فهرست منبع

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

李广朋 9 سال پیش
والد
کامیت
9d438818f3

+ 9 - 0
core/src/qfw/mobile/wxmenu.go

@@ -44,6 +44,15 @@ func (m *Mobile) Share(shareid string) error {
 
 //进入订阅页面
 func (m *Mobile) Wxrssset() error {
+	searchname := m.GetString("searchnametwo")
+	s_type := m.GetString("s_typetwo")
+	if s_type == "1" {
+		s_type = "tender"
+	} else if s_type == "2" {
+		s_type = "bid"
+	}
+	m.T["searchname"] = searchname
+	m.T["s_type"] = s_type
 	defer func() {
 		if r := recover(); r != nil {
 			log.Println("[E]", r)

+ 1 - 4
core/src/qfw/swordfish/swordfishmanage.go

@@ -25,6 +25,7 @@ func (s *SwordFish) Transfer() error {
 		id := s.GetSession("userId")
 		fmt.Println("id:", id, "searchname:", searchname)
 		fmt.Println("flog:", flog)
+
 		s.Write(`{"flog":"` + flog + `"}`)
 	}
 
@@ -105,10 +106,6 @@ func (s *SwordFish) Wxsearchlist() error {
 		s_type = "bid"
 	}
 	s.T["keywords"] = keywords
-	s.DelSession("sf_keywords")
-	fmt.Println("keyi :::::", s.GetSession("sf_keywords"))
-	s.SetSession("sf_keywords", keywords)
-	fmt.Println("keyi :::::2222", s.GetSession("sf_keywords"))
 	s.T["s_name"] = s_name
 	s.T["success"] = false
 	s.T["s_type"] = s.GetString("s_type")

+ 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-25 16:26:05"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-03-25 16:26:05"}},"marketisstart":true,"marketrate":300}
+{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-03-25 18:48:11"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-03-25 18:48:11"}},"marketisstart":true,"marketrate":300}

+ 32 - 2
core/src/web/staticres/wxswordfish/main.js

@@ -499,7 +499,7 @@ $(function(){
 	$("body").append($("#tender-keyword").clone().removeAttr("id").attr("id","bid-keyword"))
 			.append($("#tender-scope").clone().removeAttr("id").attr("id","bid-scope"));
 	if(typeof(msgset.tender) != "undefined"){
-		setKeyWord("tender",msgset.tender.a_key);
+		//setKeyWord("tender",msgset.tender.a_key);
 		setScope("tender",msgset.tender.s_scope);
 		if(msgset.tender.i_switchstatus){
 			turnOn($("#tender-on-off"));
@@ -510,7 +510,7 @@ $(function(){
 		}
 	}
 	if(typeof(msgset.bid) != "undefined"){
-		setKeyWord("bid",msgset.bid.a_key);
+		//setKeyWord("bid",msgset.bid.a_key);
 		setScope("bid",msgset.bid.s_scope);
 		if(msgset.bid.i_switchstatus){
 			turnOn($("#bid-on-off"));
@@ -581,4 +581,34 @@ $(function(){
 			alert("请输入关键字后预览。")
 		}
 	})
+	if (searchname.length > 0 ){
+		if(typeof(msgset[s_type]) != "undefined"){
+			var keywordes = msgset[s_type].a_key
+			if(keywordes && keywordes.length > 0){
+				console.log(keywordes)
+				console.log(searchname)
+				console.log(s_type)
+				for (var i=0;i<keywordes.length;i++){
+					if (keywordes[i] != searchname){
+						if (i == keywordes.length-1 ){
+							keywordes.push(searchname)
+						}
+					}
+				}
+				console.log(keywordes)
+				console.log(searchname)
+				console.log(s_type)
+				setKeyWord(s_type,keywordes);
+			}else{
+				keywordes.push(searchname)
+				setKeyWord(s_type,keywordes);
+			}
+			turnOn($("#"+s_type +"-on-off"));
+		}else{
+			keywordes.push(searchname)
+			setKeyWord(s_type,keywordes);
+			turnOn($("#"+s_type +"-on-off"));
+		}
+
+	}
 });

+ 2 - 0
core/src/web/templates/swordfish/wxrssset.html

@@ -13,6 +13,8 @@
 <script>
 	var msgset= {{.T.msgset}};
 	initShare({{.T.signature}},{{.T.shareid}});
+	var searchname = {{.T.searchname}}
+	var s_type = {{.T.s_type}}
 </script>
 </head>
 <body>

+ 16 - 5
core/src/web/templates/swordfish/wxsearch.html

@@ -114,6 +114,9 @@ body{
 .parent-node img {
 	vertical-align: sub !important;
 }
+.kongbai{
+	height:149px;
+}
 </style>
 </head>
 <body>
@@ -121,7 +124,8 @@ body{
 <div class="wxhead"><span class="tubiao"><img src="{{Msg "seo" "cdn"}}/images/wxjss.png"/></span><input class="form-control searchname" name="searchnameshow" value="" placeholder="输入关键词查询"/>
 <span class="xiaochu"><img class="qcimg" src="{{Msg "seo" "cdn"}}/images/wxqc.png"/></span>
 </div>
-<div class="searchshow">
+<div class="kongbai"></div>
+<div class="searchshow hidden">
 		<!--招标 start-->
 	<form action="/member/wxswordfish/searchlist" name="searchone" method="post" style="margin-bottom: auto;">
 		<div onClick="searchbiao(1)" class="searchbs" >
@@ -156,7 +160,7 @@ body{
 		<div  class="wx-xhx"></div>
 		<!--企业情报 start-->
 	<form action="/member/wxswordfish/searchlist" name="searchthree" method="post" style="margin-bottom: auto;">
-		<div onClick="searchbiao(3)"  class="searchbs" >
+		<div onClick="searchbiao(3)"  class="searchbs  hidden" >
 		<div class="searchzhong1"><img src="{{Msg "seo" "cdn"}}/images/wxjs.png"/></div>
 		<div class="searchzhong2">查询企业情报:</div>
 		<div class="searchzhong3">
@@ -168,11 +172,11 @@ body{
 	</form>
 		<!--企业情报 end-->
 		<div  class="wx-xhx"></div>
-		<div id="myorder" class="text-center">
+		
+</div>
+<div id="myorder" class="text-center hidden">
 		<div class="rsssetbtn" onClick="window.location.href='/swordfish/page';">进入我的信息订阅</div>
 		</div>
-</div>
-
 <!-- 按钮触发模态框 -->
 <button class="btn hidden kfing" data-toggle="modal" 
    data-target="#myModal">
@@ -203,6 +207,13 @@ body{
 <script type="text/javascript">
 	$(".searchname").keyup(function(){
         var restr = $(".searchname").val();
+		if (restr.length > 0){
+			$(".kongbai").addClass("hidden");
+			$(".searchshow").removeClass("hidden");
+		}else{
+			$(".searchshow").addClass("hidden");
+			$(".kongbai").removeClass("hidden");
+		}
 		$(".searchzhao3 span").html(restr);
 		$(".searchzhong3 span").html(restr);
     });

+ 9 - 14
core/src/web/templates/swordfish/wxsearchlist.html

@@ -31,7 +31,6 @@ $(function(){
 		$("#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"];
@@ -339,6 +338,12 @@ body{
 	<input name="s_name" id="sea_name" value="" style="display:none;"/>
 </form>
 </div>
+<div style="display:none;">
+<form action="/swordfish/page" name="searchtwo" method="post">
+	<input name="searchnametwo" id="searchnametwo" value="" style="display:none;"/>
+	<input name="s_typetwo" id="sea_type" value="{{.T.s_type}}" style="display:none;"/>
+</form>
+</div>
 {{include "/swordfish/wxtoolbar.html"}}
 <script type="text/javascript">
 	$(".chax").click(function(){
@@ -360,19 +365,9 @@ body{
 		window.open("/visit/redirect?url="+escape(link));
 	}
 	function jpmy(){
-		var searchname = $(".searchname").val().replace(/^\s+|\s+$/g,"").replace(/\s+/g,"+");
-		$.ajax({    
-	        type:'post',        
-	        url:'/member/wxswordfish/transfer',    
-	        data:{searchname:searchname},    
-	        cache:false,    
-	        dataType:'json', 
-	        success:function(data){
-				if (data.flog=="T"){
-					window.location.href='/swordfish/page';
-				}
-	        }    
-        }); 
+		var searchname = $(".searchname").val();
+		document.getElementById("searchnametwo").value = searchname;
+		document.forms['searchtwo'].submit();
 	}
 </script>
 </body>