maxiaoshan 8 жил өмнө
parent
commit
49fbeb1f1d

+ 20 - 11
src/jfw/front/entsearch.go

@@ -2,9 +2,11 @@ package front
 
 import (
 	"fmt"
+	"jfw/config"
 	"jfw/jylabutil"
 	_ "jfw/jyutil"
 	"log"
+	"math/rand"
 	"qfw/util"
 	"time"
 
@@ -25,6 +27,12 @@ func init() {
 
 func (e *Entsearch) Bidsearchforent() error {
 	defer util.Catch()
+	var shareid = e.GetString("id")
+	e.T["logid"] = config.Seoconfig["jyzbqyss"].(string)
+	if len(shareid) == 0 {
+		shareid = fmt.Sprintf("%s%d", config.Seoconfig["jysslby"].(string)+fmt.Sprintf("%d", time.Now().UnixNano())[8:14], rand.Intn(9))
+	}
+
 	searchvalue := e.GetString("searchvalue")
 	area := e.GetString("area")
 	pricetype := e.GetString("pricetype")
@@ -34,14 +42,14 @@ func (e *Entsearch) Bidsearchforent() error {
 		//搜索minprice和maxprice价格区间的数据
 	}
 	if pricetype == "n" || pricetype == "" {
-		//搜索所有价格
+		//搜索所有价格
 	}
 
-	fmt.Println("searchvalue1==", searchvalue)
-	fmt.Println("area1==", area)
-	fmt.Println("lower1==", minprice)
-	fmt.Println("upper1==", maxprice)
-	fmt.Println("pricetype1==", pricetype)
+	//fmt.Println("searchvalue1==", searchvalue)
+	//fmt.Println("area1==", area)
+	//fmt.Println("lower1==", minprice)
+	//fmt.Println("upper1==", maxprice)
+	//fmt.Println("pricetype1==", pricetype)
 
 	if minprice == 0 {
 		e.T["minprice"] = ""
@@ -57,6 +65,7 @@ func (e *Entsearch) Bidsearchforent() error {
 	e.T["searchvalue"] = searchvalue
 	e.T["area"] = area
 	e.T["pricetype"] = pricetype
+	e.T["shareid"] = se.EncodeString(shareid)
 	log.Println("-------中标企业搜索:")
 
 	list := []map[string]interface{}{}
@@ -93,11 +102,11 @@ func (e *Entsearch) PcSearchZbqyAjax() error {
 	if pricetype == "n" {
 		//搜索所有价格
 	}
-	fmt.Println("searchvalue==", searchvalue)
-	fmt.Println("area==", area)
-	fmt.Println("lower==", minprice)
-	fmt.Println("upper==", maxprice)
-	fmt.Println("pricetype==", pricetype)
+	//fmt.Println("searchvalue==", searchvalue)
+	//fmt.Println("area==", area)
+	//fmt.Println("lower==", minprice)
+	//fmt.Println("upper==", maxprice)
+	//fmt.Println("pricetype==", pricetype)
 
 	list := []map[string]interface{}{}
 	list = jylabutil.GetProjectByEntName(searchvalue, area, minprice, maxprice, 1, 10)

+ 1 - 0
src/seo.json

@@ -274,6 +274,7 @@
 	"jybky":"15",
 	"jygywmy":"16",
 	"jySEMtgy":"17",
+	"jyzbqyss":"18",
 	"module":{
 		"subscribe":"订阅页",
 		"/list/":"标签页",

+ 52 - 39
src/web/templates/pc/biddingsearch_enterprise.html

@@ -380,7 +380,9 @@
 							</table>
 						</div>
 					</div>
-
+					<div class="hasNoData" style="display: none;">
+						<img src="/images/pc_12.png" id="hasNoData">
+					</div>
 				</div>
 				<!--分页-->
 				<div class="pagination clearfix w">
@@ -403,44 +405,6 @@
 		var areas = {{.T.area}};
 		var searchvalue = {{.T.searchvalue}};
 		
-		//地区回显样式设置
-		if(areas != ""){
-			$("#regionBtn").removeClass("active");
-			areas = areas.split(",");
-			for(var i=0;i<areas.length;i++){
-				$(".region-content>font:not('.parent-node')").each(function(){
-					if($(this).text() == areas[i]){
-						$(this).addClass("active");
-						return false;
-					}
-				});
-			}
-		}
-		$(".region-content .parent-node").each(function(){
-			var fontLen = $(this).nextUntil(".parent-node").filter("font").length;
-			var activeLen = $(this).nextUntil(".parent-node").filter(".active").length;
-			if(fontLen == activeLen){
-				$(this).addClass("active");
-			}
-			if(activeLen >0 && activeLen < fontLen){
-				$(this).addClass("secondActice");
-			}
-		});
-		
-		//搜索关键词回显页面样式设置
-		if(searchvalue != "" && searchvalue != null){
-			$(".seaTender-inner").css({'border':'0px'});
-			$(".lucene-table").css({'padding':'0px','border-bottom':'0px','display':'block'});		
-			$(".tabTitle").addClass("hidden");
-			$(".lucene").attr("style","display:none");
-		}
-		
-		//价格回显样式设置
-		if({{.T.pricetype}} == "y"){
-			$(".Price-content").find("span:first-child").removeClass("active");
-			$(".pricefat").addClass("active");
-		}
-		
 		$(function(){
 			haslogin({{.T.logid}});
 			$(".j-nav .j-nav-link:eq(2)").addClass("active");
@@ -452,6 +416,55 @@
 				}
 			});
 			
+			//查询数据不存在判断
+			if(mainList == null || mainList.length == 0){
+				$(".tabContainer").hide();
+				$(".pagination").hide();
+				$(".hasNoData").show();
+			}else{
+				$(".tabContainer").show();
+				$(".pagination").show();
+				$(".hasNoData").hide();
+			}
+			//地区回显样式设置
+			if(areas != ""){
+				$("#regionBtn").removeClass("active");
+				areas = areas.split(",");
+				for(var i=0;i<areas.length;i++){
+					$(".region-content>font:not('.parent-node')").each(function(){
+						if($(this).text() == areas[i]){
+							$(this).addClass("active");
+							return false;
+						}
+					});
+				}
+			}
+			$(".region-content .parent-node").each(function(){
+				var fontLen = $(this).nextUntil(".parent-node").filter("font").length;
+				var activeLen = $(this).nextUntil(".parent-node").filter(".active").length;
+				if(fontLen == activeLen){
+					$(this).addClass("active");
+				}
+				if(activeLen >0 && activeLen < fontLen){
+					$(this).addClass("secondActice");
+				}
+			});
+			
+			//搜索关键词回显页面样式设置
+			if(searchvalue != "" && searchvalue != null){
+				$(".seaTender-inner").css({'border':'0px'});
+				$(".lucene-table").css({'padding':'0px','border-bottom':'0px','display':'block'});		
+				$(".tabTitle").addClass("hidden");
+				$(".lucene").attr("style","display:none");
+			}
+			
+			//价格回显样式设置
+			if({{.T.pricetype}} == "y"){
+				$(".Price-content").find("span:first-child").removeClass("active");
+				$(".pricefat").addClass("active");
+			}
+				
+			
 			//筛选关闭和打开
 			//根据cookie值设置筛选是否显示
 			var rsw = localStorage.getItem("entstore");