Răsfoiți Sursa

Merge branch 'dev2.8' of http://192.168.3.207:10080/qmx/jy into dev2.8

wangshan 5 ani în urmă
părinte
comite
94852a00ec

+ 3 - 0
src/jfw/front/swordfish.go

@@ -499,6 +499,9 @@ func (m *Front) PcAjaxReq() {
 					findfields := `"`
 					findfields += m.GetString("selectType")
 					findfields += `"`
+					if findfields == `"all"` {
+						findfields = `"title","detail"`
+					}
 					qstr := getSearchQuery(secondKWS, industry, minprice, maxprice, findfields, getBidSearchQuery(area, publishtime, subtype))
 					secondLimit := 2*pc_pageSize - int(count)
 					secRel := elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, bidSearch_field, 0, secondLimit, 0, false)

+ 3 - 5
src/jfw/modules/app/src/app/front/swordfish.go

@@ -459,7 +459,6 @@ func (m *Front) WxsearchlistPaging() {
 				s_word := ""
 				if limitFlag {
 					if pageNum == 1 {
-						log.Println("11111")
 						list, b_word, a_word, s_word = getWxsearchlistData_new(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, pageNum, public.Lst.TotalPage*wx_pageSize, selectType, feld)
 					}
 				} else {
@@ -476,6 +475,9 @@ func (m *Front) WxsearchlistPaging() {
 					findfields := `"`
 					findfields += m.GetString("selectType")
 					findfields += `"`
+					if findfields == `"all"` {
+						findfields = `"title","detail"`
+					}
 					qstr := getSearchQuery(secondKWS, industry, minprice, maxprice, findfields, getBidSearchQuery(scope, publishtime, subtype))
 					secondLimit := 2*wx_pageSize - listSize
 					secRel = elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, feld, 0, secondLimit, 0, false)
@@ -554,7 +556,6 @@ func (m *Front) WxsearchlistPaging() {
 				m.T["msgset"] = keys
 			}
 		}
-		log.Println("list:", list)
 		m.ServeJson(map[string]interface{}{
 			"limitFlag":     limitFlag,
 			"status":        isLimit,
@@ -587,12 +588,9 @@ func getWxsearchlistData_new(keywords, scope, publishtime, subtype, industry, mi
 	}
 	qstr := getSearchQuery(s_word, industry, minprice, maxprice, findfields, getBidSearchQuery(scope, publishtime, subtype))
 	if selectType == "all" { //全文搜索
-		log.Println("全文")
 		list = elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, field, (pageNum-1)*pageSize, pageSize, 100, true)
 	} else { //标题搜索
-		log.Println("标题")
 		list = elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, field, (pageNum-1)*pageSize, pageSize, 100, false)
-		log.Println("end")
 	}
 
 	if list != nil {

+ 63 - 0
src/jfw/modules/app/src/web/staticres/jyapp/dataExport/css/dataExport.css

@@ -202,4 +202,67 @@ html .page .elseChoose .elseChooseList ul li a i {
 /*	max-width: 260px;*/
 	text-align: center;
 	display: none;
+}
+html .match_way .box {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  background: #fff;
+  z-index: 9999;
+}
+
+html .match_way .box .box_hd {
+  padding: 0 .4rem;
+  height: .88rem;
+  line-height: .88rem;
+  background: #F4F4F9;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  border-bottom: 1px solid #eee;
+}
+
+html .match_way .box .box_hd h3 {
+  color: #1D1D1D;
+  font-size: .32rem;
+}
+
+html .match_way .box .box_hd .cancel {
+  color: #2CB7CA;
+  font-size: .32rem;
+}
+
+html .match_way .box .box_bd .weui-cells:after {
+  border: 0 !important;
+}
+
+html .match_way .box .box_bd .weui-cells:before {
+  border: 0;
+}
+
+html .match_way .box .box_bd .choose-form {
+  margin: 0;
+}
+
+html .match_way .box .box_bd .cont_label {
+  padding: .49rem .3rem .44rem;
+}
+
+html .match_way .box .box_bd .title_label {
+  padding: .44rem .3rem;
+}
+
+html .match_way .box .box_bd p {
+  font-size: .32rem;
+}
+
+html .match_way .box .box_bd img {
+  width: .8rem;
+  height: .8rem;
+  margin-right: .3rem;
+}
+
+html .match_way .box .box_bd .weui-check:checked + .weui-icon-checked:before {
+  color: #2CB7CA;
 }

+ 58 - 5
src/jfw/modules/app/src/web/templates/dataExport/dataExport.html

@@ -8,7 +8,8 @@
     <title>数据导出</title>
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/base.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/dataExport.css?v={{Msg "seo" "version"}}7">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/dataExport.css?v={{Msg "seo" "version"}}8">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/weui.min.css">
     <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
     <script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/rem.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/jyapp/js/jquery.js"></script>
@@ -122,7 +123,7 @@
         font-size: 17px;
         position: fixed;
         padding-top: 20px;
-        z-index: 99999;
+        z-index: 999;
         left: 0;
         right: 0;
         top: 0;
@@ -226,7 +227,11 @@
                            <span id="keyWord"></span>
                            <i class="iconfont icon-arrow"></i>
                         </a></li>
-                        
+                        <li><a href="JavaScript:;">
+                            <strong style="width: 2.2rem;">关键词匹配方式</strong>
+                            <span style="width: 4rem;" class="match">按标题匹配</span>
+                            <i class="iconfont icon-arrow"></i>
+                            </a></li>
                         <li><a href="/jyapp/front/dataExport/price">
                             <strong>金额</strong>
                             <span id="price"></span>
@@ -265,6 +270,38 @@
             <button class="saveData">确认</button>
         </div>
 
+    <div class="js_dialog match_way" id="match_way" style="display: none;">
+    <div class="weui-mask"></div>
+    <div class="box">
+    <div class="box_hd">
+    <!-- <span></span> -->
+    <h3>关键词匹配方式</h3>
+    <span class="cancel">取消</span>
+    </div>
+    <div class="box_bd">
+    <div class="weui-cells weui-cells_checkbox choose-form">
+    <label class="weui-cell weui-check__label cont_label" for="cont_way">
+    <div class="weui-cell__bd read">
+    <p>按全文匹配</p>
+    </div>
+    <div class="weui-cell__hd">
+    <input type="radio" class="weui-check" name="way" value="按全文匹配" id="cont_way" checked />
+<i class="weui-icon-checked"></i>
+    </div>
+    </label>
+    <label class="weui-cell weui-check__label title_label" for="title_way">
+    <div class="weui-cell__bd read">
+    <p>按标题匹配</p>
+    </div>
+    <div class="weui-cell__hd">
+    <input type="radio" class="weui-check" name="way" value="按标题匹配" id="title_way" />
+    <i class="weui-icon-checked"></i>
+    </div>
+    </label>
+    </div>
+    </div>
+    </div>
+    </div>
     </div>
 
 <script>
@@ -277,6 +314,20 @@
                 window.location.reload();
             }
         });
+        //
+        $('.match').click(function () {
+            $('.match_way').slideDown('slow')
+        });
+        /* 选择匹配方式*/
+        $('input:radio[name="way"]').click(function() {
+            var checkValue = $('input:radio[name="way"]:checked').val();
+            $('.match_way').hide(200);
+            $('.match').html(checkValue)
+        });
+        $(".cancel").click(function() {
+            $('.match_way').hide(200)
+        });
+        //
         //筛选日期选中
         $(".chooseTime ul li").click(function(){
             $(".chooseTime ul li").removeClass('active');
@@ -481,7 +532,7 @@
 			if(filter["area"]!=null&&filter["area"]!=""){
 				localStorage.province = filter["area"];
 				localStorage.areaHtml = filter["area"].join(',').replace(/,/g,"、")
-			}else{
+            }else{
 				localStorage.province = "";
 			}
 			if(filter["city"]!=null&&filter["city"]!=""){
@@ -492,7 +543,7 @@
 				// localStorage.area = "";
 			}
 			if(filter["region"]!=null&&filter["region"]!=""){
-				localStorage.areaHtml = filter["region"];
+				localStorage.areaHtml = filter["region"].join(',').replace(/,/g,"、");
 			}else{
 				localStorage.areaHtml =  filter["area"].join(',').replace(/,/g,"、");
 			}
@@ -515,8 +566,10 @@
 			}
 	        //信息类型
 			if(filter["subtype"]!=null&&filter["subtype"]!=""){
+				localStorage.subType = filter["subtype"].replace(/,/g," ");
 				localStorage.subTypes = filter["subtype"].replace(/,/g," ");
 			}else{
+				localStorage.subType = "";
 				localStorage.subTypes = "";
 			}
 			//采购单位

+ 16 - 9
src/jfw/modules/app/src/web/templates/dataExport/dataExport_area.html

@@ -543,6 +543,7 @@
 				$('.detail').show()
 			});
 			//
+		    var areaArr = '';
 			/* 选中结果 */
 			function getResult() {
 				$('.result_name').empty();
@@ -637,7 +638,7 @@
 					}
 				}
 				$('.result_name').append(html);
-				localStorage.areaHtml = html;
+				areaArr = html;
 				isOpen()
 			}
 
@@ -754,6 +755,7 @@
 					 localStorage.city = citys.toString();
 					 localStorage.province = province.toString();
 					 localStorage.area = html;
+					 localStorage.areaHtml = areaArr;
 					 history.back();
 				 });
 				$('.reset-btn').click(function(){
@@ -796,8 +798,9 @@
 						 var province = [];
 						 for(var i in area){
 							 $(".tab").each(function(){
-								 let province = $(this).children(".province").text().replace(/\s/g,"")
-								 if(province === area[i]){
+								 let provinces = $(this).children(".province").text().replace(/\s/g,"");
+								 if(provinces === area[i]){
+									 province.push(area[i]);
 									 $(this).next().children(".city").addClass("active");
 									 $(this).next().find(".city").each(function () {
 										 var city = $(this).text();
@@ -808,21 +811,25 @@
 									 if($(this).prop("class") !== "tab municipality"){
 										 $(this).next().slideDown();
 									 }
-									 if(province === "全国"){
-										 $(".other").prop("checked", true);
-										 $(".reset-btn").hide();
-									 }
 								 }
 							 });
-							 province.push(area[i]);
+							 $(".tab_content").find(".city").each(function(){
+								 if($(this).text() === area[i]){
+									 $(this).addClass("active");
+									 if($(this).parent().prev().prop("class") !== "tab municipality"){
+										 $(this).parent().slideDown();
+									 }
+								 }
+							 })
 						 }
 						 localStorage.city = citys.toString();
 						 localStorage.province = province.toString();
+						 getResult();
 					 }else{
 						 $(".other").prop("checked", true);
 						 $(".reset-btn").hide();
+						 getResult();
 					 }
-					 getResult();
 				 }
 				 //
 				 $(".tab_content").find(".city.active").each(function(){

+ 0 - 4
src/jfw/modules/app/src/web/templates/dataExport/dataExport_payOrder.html

@@ -313,10 +313,6 @@
 				window.location.href="/jyapp/front/staticPage/dataExport_serviceterms.html";
 			}
 			$(function() {     
-				//进入其他页面 验证码显示 
-				if(sessionStorage.email_sign=="1"){
-					$(".verification").show();
-				}
 				//返回键
 				$(".app-layout-header .app-back_").unbind("tap").on("tap",function(){
 						setTimeout(function(){

+ 0 - 1
src/jfw/modules/app/src/web/templates/dataExport/dataExport_subType.html

@@ -306,7 +306,6 @@
                 //     return e !== "";
                 // });
                 for(var i in subType){
-                    console.log(subType[i]);
                     $(".list ul li").find("dd").each(function(){
                         if($(this).text() === subType[i]){
                             $(this).addClass("active");

+ 1 - 1
src/jfw/modules/app/src/web/templates/dataExport/dataExport_toMyOrder.html

@@ -812,7 +812,7 @@
 									if (r.success) {
 										//更改缓存内容
 										$(".loading_").show();
-										changeCache(this_e);
+										//changeCache(this_e);
 										setTimeout(function(){
 											//存缓存
 											$(".loading_").hide();

+ 2 - 0
src/jfw/modules/app/src/web/templates/dataExport/dataExport_toOrderDetail.html

@@ -555,12 +555,14 @@
 							<p class="text ellipsis">支付时间:{{.T.o.pay_time}}</p>
 							<p class="text ellipsis">产品类型:{{.T.o.product_type}}</p>
 							{{if ne .T.o.order_status -2}}
+							{{if .T.o.pay_time}}
 							{{if eq .T.o.pay_way "wx_js"}}        
 								<p class="text ellipsis">微信支付单号:{{.T.o.transaction_id}}</p>
 					        {{end}}
 					        {{if eq .T.o.pay_way "ali_app"}}        
 								<p class="text ellipsis">支付宝单号:{{.T.o.transaction_id}}</p>
 					        {{end}}
+							{{end}}
 					        {{end}}
 							<p class="text ellipsis">数据类型:{{.T.o.data_spec}}</p>
 							<p class="text ellipsis">数据量:{{.T.o.data_count}}条</p>

+ 63 - 0
src/web/staticres/wx_dataExport/css/dataExport.css

@@ -202,4 +202,67 @@ html .page .elseChoose .elseChooseList ul li a i {
   /*	max-width: 260px;*/
   text-align: center;
   display: none;
+}
+html .match_way .box {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  background: #fff;
+  z-index: 9999;
+}
+
+html .match_way .box .box_hd {
+  padding: 0 .4rem;
+  height: .88rem;
+  line-height: .88rem;
+  background: #F4F4F9;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  border-bottom: 1px solid #eee;
+}
+
+html .match_way .box .box_hd h3 {
+  color: #1D1D1D;
+  font-size: .32rem;
+}
+
+html .match_way .box .box_hd .cancel {
+  color: #2CB7CA;
+  font-size: .32rem;
+}
+
+html .match_way .box .box_bd .weui-cells:after {
+  border: 0 !important;
+}
+
+html .match_way .box .box_bd .weui-cells:before {
+  border: 0;
+}
+
+html .match_way .box .box_bd .choose-form {
+  margin: 0;
+}
+
+html .match_way .box .box_bd .cont_label {
+  padding: .49rem .3rem .44rem;
+}
+
+html .match_way .box .box_bd .title_label {
+  padding: .44rem .3rem;
+}
+
+html .match_way .box .box_bd p {
+  font-size: .32rem;
+}
+
+html .match_way .box .box_bd img {
+  width: .8rem;
+  height: .8rem;
+  margin-right: .3rem;
+}
+
+html .match_way .box .box_bd .weui-check:checked + .weui-icon-checked:before {
+  color: #2CB7CA;
 }

+ 56 - 2
src/web/templates/weixin/dataExport/dataExport.html

@@ -9,7 +9,8 @@
     <title>数据导出</title>
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/base.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/dataExport.css?v={{Msg "seo" "version"}}9">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/dataExport.css?v={{Msg "seo" "version"}}11">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/weui.min.css">
     <script src="{{Msg "seo" "cdn"}}/wx_dataExport/js/rem.js?v={{Msg "seo" "version"}}"></script>
     {{include "/common/weixin.html"}}
     <script src="/js/jquery.js"></script>
@@ -174,6 +175,11 @@
                            <span id="keyWord"></span>
                            <i class="iconfont icon-arrow"></i>
                         </a></li>
+                       <li><a href="JavaScript:;">
+                           <strong style="width: 2.2rem;">关键词匹配方式</strong>
+                           <span style="width: 4rem;" class="match">按标题匹配</span>
+                           <i class="iconfont icon-arrow"></i>
+                       </a></li>
                         
                         <li><a href="/front/wx_dataExport/price">
                             <strong>金额</strong>
@@ -212,6 +218,38 @@
             <button class="reset">重置</button>
             <button class="saveData">确认</button>
         </div>
+        <div class="js_dialog match_way" id="match_way" style="display: none;">
+            <div class="weui-mask"></div>
+            <div class="box">
+                <div class="box_hd">
+                    <!-- <span></span> -->
+                    <h3>关键词匹配方式</h3>
+                    <span class="cancel">取消</span>
+                </div>
+                <div class="box_bd">
+                    <div class="weui-cells weui-cells_checkbox choose-form">
+                        <label class="weui-cell weui-check__label cont_label" for="cont_way">
+                            <div class="weui-cell__bd read">
+                                <p>按全文匹配</p>
+                            </div>
+                            <div class="weui-cell__hd">
+                                <input type="radio" class="weui-check" name="way" value="按全文匹配" id="cont_way" checked />
+                                <i class="weui-icon-checked"></i>
+                            </div>
+                        </label>
+                        <label class="weui-cell weui-check__label title_label" for="title_way">
+                            <div class="weui-cell__bd read">
+                                <p>按标题匹配</p>
+                            </div>
+                            <div class="weui-cell__hd">
+                                <input type="radio" class="weui-check" name="way" value="按标题匹配" id="title_way" />
+                                <i class="weui-icon-checked"></i>
+                            </div>
+                        </label>
+                    </div>
+                </div>
+            </div>
+        </div>
 
     </div>
 
@@ -227,6 +265,20 @@
                 window.location.reload();
             }
         });
+        //
+        $('.match').click(function () {
+            $('.match_way').slideDown('slow')
+        });
+        /* 选择匹配方式*/
+        $('input:radio[name="way"]').click(function() {
+            var checkValue = $('input:radio[name="way"]:checked').val();
+            $('.match_way').hide(200);
+            $('.match').html(checkValue)
+        });
+        $(".cancel").click(function() {
+            $('.match_way').hide(200)
+        });
+        //
         //筛选日期选中
         $(".chooseTime ul li").click(function(){
             $(".chooseTime ul li").removeClass('active');
@@ -445,7 +497,7 @@
 				// localStorage.area = "";
 			}
 			if(filter["region"]!=null&&filter["region"]!=""){
-				localStorage.areaHtml = filter["region"];
+                localStorage.areaHtml = filter["region"].join(',').replace(/,/g,"、");
 			}else{
 				localStorage.areaHtml = filter["area"].join(',').replace(/,/g,"、");
 			}
@@ -469,8 +521,10 @@
 	        //信息类型
 			if(filter["subtype"]!=null&&filter["subtype"]!=""){
 				localStorage.subTypes = filter["subtype"].replace(/,/g," ");
+				localStorage.subType = filter["subtype"].replace(/,/g," ");
 			}else{
 				localStorage.subTypes = "";
+				localStorage.subType = "";
 			}
 			//采购单位
 	        if(filter["buyer"]!=null&&filter["buyer"].length>0){

+ 16 - 9
src/web/templates/weixin/dataExport/dataExport_area.html

@@ -505,6 +505,7 @@
 				$('.detail').show()
 			});
 			//
+			var areaArr = '';
 			/* 选中结果 */
 			function getResult() {
 				$('.result_name').empty();
@@ -599,7 +600,7 @@
 					}
 				}
 				$('.result_name').append(html);
-				localStorage.areaHtml = html;
+				areaArr = html;
 				isOpen()
 			}
 			//
@@ -712,6 +713,7 @@
 					localStorage.city = citys.toString();
 					localStorage.province = province.toString();
 					localStorage.area = html;
+					localStorage.areaHtml = areaArr;
 					history.back();
 				});
 				$('.reset-btn').click(function(){
@@ -760,8 +762,9 @@
 						 var province = [];
 						 for(var i in area){
 							 $(".tab").each(function(){
-								 let province = $(this).children(".province").text().replace(/\s/g,"")
-								 if(province === area[i]){
+								 let provinces = $(this).children(".province").text().replace(/\s/g,"");
+								 if(provinces === area[i]){
+									 province.push(area[i]);
 									 $(this).next().children(".city").addClass("active");
 									 $(this).next().find(".city").each(function () {
 										 var city = $(this).text();
@@ -772,21 +775,25 @@
 									 if($(this).prop("class") !== "tab municipality"){
 										 $(this).next().slideDown();
 									 }
-									 if(province === "全国"){
-										 $(".other").prop("checked", true);
-										 $(".reset-btn").hide();
-									 }
 								 }
 							 });
-							 province.push(area[i]);
+							 $(".tab_content").find(".city").each(function(){
+								 if($(this).text() === area[i]){
+									 $(this).addClass("active");
+									 if($(this).parent().prev().prop("class") !== "tab municipality"){
+										 $(this).parent().slideDown();
+									 }
+								 }
+							 })
 						 }
 						 localStorage.city = citys.toString();
 						 localStorage.province = province.toString();
+						 getResult();
 					 }else{
 						 $(".other").prop("checked", true);
 						 $(".reset-btn").hide();
+						 getResult();
 					 }
-					 getResult();
 				 }
 				 //
 				 $(".tab_content").find(".city.active").each(function(){

+ 0 - 4
src/web/templates/weixin/dataExport/dataExport_payOrder.html

@@ -306,10 +306,6 @@
 			}
 			//
             $(function() {			
-            	//进入其他页面 验证码显示 
-				if(sessionStorage.email_sign=="1"){
-					$(".form-control").show();
-				}
             	if(sessionStorage.index=="1"){
             		$(".choose .choose-item").eq(sessionStorage.index).addClass("active").siblings().removeClass("active");
             		dataType=2;

+ 1 - 1
src/web/templates/weixin/dataExport/dataExport_toMyOrder.html

@@ -280,7 +280,7 @@
 							setTimeout(function(){
 								setSessionStorage();
 								window.location.href="/front/wx_dataExport/paySuccessPage?email="+res["user_mail"]+"&orderCode="+res["order_code"]+"&payTime="+res["timestamp"];
-							},1000)
+							},500)
 						}else if(r.err_msg == "get_brand_wcpay_request:cancel"){
 							//取消支付 可以再次支付
 							canpay=true;