Răsfoiți Sursa

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

李广朋 9 ani în urmă
părinte
comite
01518b299d

+ 26 - 22
core/src/web/staticres/wxswordfish/main.js

@@ -464,7 +464,7 @@ $(function(){
 			liobj.next(".child-node").find("li:eq(1)").append('<div class="com-last">全国</div>');
 		}
 	}
-	var setKeyWord = function(type,keys){
+	var setKeyWord = function(type,keys,searchnameIsExsit){
 		if(typeof(keys) == "undefined" || keys.length == 0){
 			return;
 		}
@@ -472,7 +472,13 @@ $(function(){
 			keys[i] = keys[i].replace(/\+/g," ");
 			KeyWordDialog.AppendNode($("#"+type+"-keyword"),keys[i]);
 		}
-		$("#"+type+"-content li:first").append('<div class="com-last">'+keys.join(";")+'</div>');
+		if(!searchnameIsExsit){
+			$("#"+type+"-content li:first .com-last").remove();
+			$("#"+type+"-content li:first").append('<div class="com-last">'+keys.join(";")+'</div>');
+			commonAjaxReq($("#tender-keyword"),type);
+		}else{
+			$("#"+type+"-content li:first").append('<div class="com-last">'+keys.join(";")+'</div>');
+		}
 	}
 	var setScope = function(type,scope){
 		var dialogObj = $("#"+type+"-scope");
@@ -499,7 +505,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,false);
 		setScope("tender",msgset.tender.s_scope);
 		if(msgset.tender.i_switchstatus){
 			turnOn($("#tender-on-off"));
@@ -510,7 +516,7 @@ $(function(){
 		}
 	}
 	if(typeof(msgset.bid) != "undefined"){
-		//setKeyWord("bid",msgset.bid.a_key);
+		setKeyWord("bid",msgset.bid.a_key,false);
 		setScope("bid",msgset.bid.s_scope);
 		if(msgset.bid.i_switchstatus){
 			turnOn($("#bid-on-off"));
@@ -581,34 +587,32 @@ $(function(){
 			alert("请输入关键字后预览。")
 		}
 	})
-	if (searchname.length > 0 ){
+	if (typeof(searchname) != "undefined" && 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)
+				var searchnameIsExsit = false;
+				for(var i=0;i<keywordes.length;i++){
+					var keywordesArr = keywordes[i].split("+");
+					for(var k=0;k<keywordesArr.length;k++){
+						if(keywordesArr[k] == searchname){
+							searchnameIsExsit = true;
 						}
 					}
 				}
-				console.log(keywordes)
-				console.log(searchname)
-				console.log(s_type)
-				setKeyWord(s_type,keywordes);
+				if(!searchnameIsExsit){
+					keywordes.push(searchname);
+				}
 			}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"));
+			keywordes.push(searchname);
+		}
+		setKeyWord(s_type,keywordes,searchnameIsExsit);
+		if(!$("#"+s_type +"-on-off").hasClass("open")){
+			$("#"+s_type+"-on-off").click();
 		}
-
 	}
 });

+ 16 - 3
core/src/web/staticres/wxswordfish/style.css

@@ -516,9 +516,22 @@ img{
 	line-height: 40px;
 	text-align: center;
 }
-.bottom-toolbar>li img{
-	width: 18px;
-	height: 18px;
+.bottom-toolbar>li:first-child img{
+	width: 15px;
+    height: 15px;
+    margin-bottom: 2px;
+}
+.bottom-toolbar>li:nth-child(2) img{
+	width: 16px;
+    height: 16px;
+    margin-bottom: 2px;
+	margin-right: 2px;
+}
+.bottom-toolbar>li:last-child img{
+	width: 14px;
+    height: 14px;
+    margin-bottom: 3px;
+	margin-right: 2px;
 }
 .bottom-toolbar>li:nth-child(2){
 	width: 34%;

+ 18 - 15
core/src/web/templates/swordfish/wxsearch.html

@@ -56,10 +56,11 @@ body{
 	height:25px;
 }
 .searchzhao1,.searchzhong1{
-	float:left;
-	width:10%;
 	margin-top: 10px;
+	margin-bottom: 10px;
 	cursor:hand;
+	display: inline-block;
+	vertical-align: top;
 }
 
 .searchzhao1 img,.searchzhong1 img{
@@ -67,16 +68,20 @@ body{
 	
 }
 .searchzhao2,.searchzhong2{
-	float:left;
 	margin:0px 5px;
-	width:35%;
+	display: inline-block;
+	margin-bottom: 10px;
+	vertical-align: top;
+	margin-top: 13px;
 }
 .searchzhao3,.searchzhong3{
-	float:left;
-	width:140px;
-    white-space: nowrap;
-    overflow: hidden;
-    text-overflow: ellipsis;
+	display: inline-block;
+	margin-bottom: 10px;
+	margin-top: 13px;
+	word-wrap: break-word;
+	word-break: break-all;
+	white-space: normal !important;
+	margin-left: -5px;
 }
 .searchzhao3 span , .searchzhong3 span{
 	float:left;
@@ -107,8 +112,6 @@ body{
 	width:100%;
 }
 .searchbs{
-	height:45px;
-	line-height:45px;
 	cursor:hand;
 }
 .parent-node img {
@@ -158,7 +161,7 @@ body{
 	</form>
 		<!--中标 end-->
 		<div  class="wx-xhx"></div>
-		<!--企业情报 start-->
+		<!--企业情报 start
 	<form action="/member/wxswordfish/searchlist" name="searchthree" method="post" style="margin-bottom: auto;">
 		<div onClick="searchbiao(3)"  class="searchbs  hidden" >
 		<div class="searchzhong1"><img src="{{Msg "seo" "cdn"}}/images/wxjs.png"/></div>
@@ -169,9 +172,9 @@ body{
 		<div style="clear:both"></div>
 		
 		</div>
-	</form>
-		<!--企业情报 end-->
-		<div  class="wx-xhx"></div>
+	</form>-->
+		<!--企业情报 end
+		<div  class="wx-xhx"></div>-->
 		
 </div>
 <div id="myorder" class="text-center hidden">

+ 1 - 2
core/src/web/templates/swordfish/wxsearchlist.html

@@ -115,7 +115,7 @@ $(function(){
 				var h=$(this).attr("href");
 				$(this).removeAttr("target");
 				$(this).removeAttr("href");
-				if (h.indexOf("java")==-1){							
+				if (typeof(h) != "undefined" && h.indexOf("java")==-1){							
 					$(this).attr("s",h)
 					$(this).attr("f_id",f_id)
 					$(this).attr("href","javascript:void(0);")	
@@ -255,7 +255,6 @@ body{
 	width:60%;
 }
 .rescontent,.nullcontent{
-	border-top:1px solid #e5e6e9;
 	padding:10px 20px;
 	background-color:#fff;
 	width:100%;

+ 6 - 1
core/src/web/templates/swordfish/wxtoolbar.html

@@ -90,7 +90,7 @@ $(function(){
 		}else if($(this).index() == 1){
 			window.location.href = "/swordfish/page";
 		}else if($(this).index() == 2){
-			$(this).children(".toolbar-popover").show();
+			$(this).children(".toolbar-popover").toggle();
 		}
 	});
 	$(".popover-ul>li").click(function(event){
@@ -113,6 +113,11 @@ $(function(){
 			obj.removeClass("active");
 		},100);
 	});
+	$("body").click(function(e){
+		if(e.target.id != "toolbar-list"){
+			$(".toolbar-popover").hide();
+		}
+	});
 	$("[id='goToShare']").click(function(){
 		window.location.href = "/swordfish/guide/share";
 		/*$(".share-dialog").show();