wangchuanjin 9 жил өмнө
parent
commit
7284a1b332

+ 18 - 15
core/src/web/staticres/wxswordfish/main.js

@@ -57,6 +57,7 @@ function KeyWordDialog(type,clickLi){
 		KeyWordDialog.AppendNode(dialogObj);
 	});
 	dialogObj.find(".submit").click(function(){
+		alert(type);
 		commonAjaxReq(thisClass,type);
 	});
 	if(dialogObj.find(".keyWordGroup").length == 0){
@@ -464,7 +465,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;
 		}
@@ -473,6 +474,9 @@ $(function(){
 			KeyWordDialog.AppendNode($("#"+type+"-keyword"),keys[i]);
 		}
 		$("#"+type+"-content li:first").append('<div class="com-last">'+keys.join(";")+'</div>');
+		if(!searchnameIsExsit){
+			commonAjaxReq($("#tender-keyword"),type);
+		}
 	}
 	var setScope = function(type,scope){
 		var dialogObj = $("#"+type+"-scope");
@@ -581,32 +585,31 @@ $(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);
+				}
+				setKeyWord(s_type,keywordes,searchnameIsExsit);
 			}else{
 				keywordes.push(searchname)
-				setKeyWord(s_type,keywordes);
+				setKeyWord(s_type,keywordes,false);
 			}
 			turnOn($("#"+s_type +"-on-off"));
 		}else{
 			keywordes.push(searchname)
-			setKeyWord(s_type,keywordes);
+			setKeyWord(s_type,keywordes,false);
 			turnOn($("#"+s_type +"-on-off"));
 		}
 

+ 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%;

+ 4 - 4
core/src/web/templates/swordfish/wxsearch.html

@@ -158,7 +158,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 +169,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();