Преглед изворни кода

关键词匹配方式回显

xuzhiheng пре 5 година
родитељ
комит
5544513d2e

+ 12 - 3
src/jfw/modules/app/src/web/templates/dataExport/dataExport.html

@@ -316,7 +316,14 @@
         });
         //
         $('.match').click(function () {
-            $('.match_way').slideDown('slow')
+            $('.match_way').slideDown('slow');
+            var selectType = $(this).text();
+            $(".read").each(function () {
+                var p = $(this).children().text();
+                if(p === selectType){
+                    $(this).next().find("input:radio").prop("checked", true);
+                }
+            });
         });
         /* 选择匹配方式*/
         $('input:radio[name="way"]').click(function() {
@@ -690,7 +697,7 @@
             }else if (selectType === "all"){
                 type = "按全文匹配";
             }
-            $("match").text(type);
+            $(".match").text(type);
         }
         //信息类型
         if(localStorage.subTypes!==undefined && localStorage.subTypes!==""){
@@ -850,7 +857,7 @@
             if(localStorage.selectType!==undefined&&localStorage.selectType!==""){
                 selectType = localStorage.selectType;
             }else{
-                var type = $(".mactch").text();
+                var type = $(".match").text();
                 if(type === "按标题匹配"){
                     selectType = "title";
                 }else if(type === "按全文匹配"){
@@ -892,6 +899,7 @@
             localStorage.removeItem("area");
             localStorage.removeItem("industry");
             localStorage.removeItem("keyWord");
+            localStorage.removeItem("selectType");
             localStorage.removeItem("price");
             localStorage.removeItem("subType");
             localStorage.removeItem("subTypes");
@@ -908,6 +916,7 @@
             $("#subType").text("");
             $("#winner").text("");
             $("#buyer").text("");
+            $(".match").text("按标题匹配");
             //
             $(".chooseTime ul li").removeClass('active');
             $(".chooseTime ul li:eq(0)").addClass('active');

+ 10 - 3
src/web/templates/weixin/dataExport/dataExport.html

@@ -267,7 +267,14 @@
         });
         //
         $('.match').click(function () {
-            $('.match_way').slideDown('slow')
+            $('.match_way').slideDown('slow');
+            var selectType = $(this).text();
+            $(".read").each(function () {
+                var p = $(this).children().text();
+                if(p === selectType){
+                    $(this).next().find("input:radio").prop("checked", true);
+                }
+            });
         });
         /* 选择匹配方式*/
         $('input:radio[name="way"]').click(function() {
@@ -642,7 +649,7 @@
             }else if (selectType === "all"){
                 type = "按全文匹配";
             }
-            $("match").text(type);
+            $(".match").text(type);
         }
         //信息类型
         if(localStorage.subTypes!==undefined && localStorage.subTypes!==""){
@@ -800,7 +807,7 @@
             if(localStorage.selectType!==undefined&&localStorage.selectType!==""){
                 selectType = localStorage.selectType;
             }else{
-                var type = $(".mactch").text();
+                var type = $(".match").text();
                 if(type === "按标题匹配"){
                     selectType = "title";
                 }else if(type === "按全文匹配"){