Kaynağa Gözat

修改自驾和公交返回

李雪梅 2 yıl önce
ebeveyn
işleme
3d439316cf

+ 23 - 8
nngkxxdp/src/main/resources/static/district/js/sy_mobile.js

@@ -835,8 +835,10 @@ $(function () {
 		var endZJ = $("#zj-two").val();
         var line = JSON.parse(localStorage.getItem("line"));
         var lineText = JSON.parse(localStorage.getItem("lineText"));
+        var discern = localStorage.getItem("discern");
         if (gjzjtext == '公交') {
             if (startZJ == '' && endZJ == '') {
+                // console.log(1111)
                 $('.show-first').show().siblings().hide();
                 $('.top_search').show().siblings('.right-map').show();
                 $('.right-search').css('top',msHeight).siblings('.right-map').css('top','0px');
@@ -844,27 +846,33 @@ $(function () {
                 $('#gj-one').val(startZJ);
                 $('#gj-two').val(endZJ);
             } else if (startZJ == '' || endZJ == '') {
+                // console.log(2222)
                 $('.show-first').show().siblings().hide();
                 $('.top_search').show().siblings('.right-map').show();
                 $('.right-search').css('top',msHeight).siblings('.right-map').css('top','0px');
                 map.centerAndZoom(new BMap.Point(106.563, 29.523), 14);
                 $('#gj-one').val(startZJ);
                 $('#gj-two').val(endZJ);
-            } else if (startZJ == line[0] && endZJ == line[1]){
-                // console.log(1111)
+            } else if (discern == 1){
+				// console.log(3333);
+				// resultBusLine(startZJ,endZJ);
+				$('#gj-one').val(startZJ);
+                $('#gj-two').val(endZJ);
+			} else if (startZJ == line[0] && endZJ == line[1]){
+                // console.log(4444)
                 $('.show-third').hide().siblings('.show-second').show();
                 $('.show-second .content-third').show();
                 $("#gj-one").val(startZJ);
                 $("#gj-two").val(endZJ);
             } else if (lineText[0] == '' && lineText[1] == '') {
-                // console.log(2222)
+                // console.log(5555)
                 $('.show-first').show().siblings().hide();
                 $('.top_search').show().siblings('.right-map').show();
                 $('.right-search').css('top',msHeight).siblings('.right-map').css('top','0px');
                 $("#gj-one").val(startZJ);
                 $("#gj-two").val(endZJ);
             } else if(startZJ != lineText[0] || endZJ != lineText[1]){
-                // console.log(3333)
+                // console.log(6666)
                 busResultLine(startZJ,endZJ);
                 $("#gj-one").val(startZJ);
                 $("#gj-two").val(endZJ);
@@ -872,6 +880,7 @@ $(function () {
         }
         if (gjzjtext == '自驾') {
             if (startGJ == '' && endGJ == '') {
+                // console.log(7777)
                 $('.show-first').show().siblings().hide();
                 $('.top_search').show().siblings('.right-map').show();
                 $('.right-search').css('top',msHeight).siblings('.right-map').css('top','0px');
@@ -879,27 +888,33 @@ $(function () {
                 $("#zj-one").val(startGJ);
                 $("#zj-two").val(endGJ);
             } else if (startGJ == '' || endGJ == '') {
+                // console.log(8888)
                 $('.show-first').show().siblings().hide();
                 $('.top_search').show().siblings('.right-map').show();
                 $('.right-search').css('top',msHeight).siblings('.right-map').css('top','0px');
                 map.centerAndZoom(new BMap.Point(106.563, 29.523), 14);
                 $("#zj-one").val(startGJ);
                 $("#zj-two").val(endGJ);
-            } else if (startGJ == line[0] && endGJ == line[1]){
-                // console.log(4444)
+            } else if (discern == 1){
+				// console.log(9999);
+				// resultBusLine(startZJ,endZJ);
+				$("#zj-one").val(startGJ);
+                $("#zj-two").val(endGJ);
+			} else if (startGJ == line[0] && endGJ == line[1]){
+                // console.log(1010)
                 $('.show-second').hide().siblings('.show-third').show();
                 $('.show-third .content-third').show();
                 $("#zj-one").val(startGJ);
                 $("#zj-two").val(endGJ);
             } else if (lineText[0] == '' && lineText[1] == '') {
-                // console.log(5555)
+                // console.log(11111)
                 $('.show-first').show().siblings().hide();
                 $('.top_search').show().siblings('.right-map').show();
                 $('.right-search').css('top',msHeight).siblings('.right-map').css('top','0px');
                 $("#zj-one").val(startGJ);
                 $("#zj-two").val(endGJ);
             } else if(startGJ != lineText[0] || endGJ != lineText[1]){
-                // console.log(6666)
+                // console.log(1212)
                 drivingResultLine(startGJ,endGJ)
                 $("#zj-one").val(startGJ);
                 $("#zj-two").val(endGJ);