From f5233339920a59103d53e8efadc6f3f5d0b64f31 Mon Sep 17 00:00:00 2001
From: lixuliang <lixuliang_hd@126.com>
Date: 星期三, 08 五月 2024 14:45:37 +0800
Subject: [PATCH] 移动端

---
 src/components/leftMenu/sousuo2.vue |   67 ++++++++++++++++++++++++++-------
 1 files changed, 52 insertions(+), 15 deletions(-)

diff --git a/src/components/leftMenu/sousuo2.vue b/src/components/leftMenu/sousuo2.vue
index 9686f35..def806e 100644
--- a/src/components/leftMenu/sousuo2.vue
+++ b/src/components/leftMenu/sousuo2.vue
@@ -5,7 +5,10 @@
       <span
         @click="ssjmxs"
         style="float: left; height: 100%; width: 80%; overflow: hidden"
-        ><i class="el-icon-search" style="padding: 0px 15px 0px 20px;font-size: 0.15rem;"></i
+        ><i
+          class="el-icon-search"
+          style="padding: 0px 15px 0px 20px; font-size: 0.15rem"
+        ></i
         >{{ syssval }}</span
       >
       <span
@@ -80,12 +83,6 @@
   </div>
 </template>
 <style scoped>
-/* 鎼滅储鎸夐挳鐨勬牱寮� */
-.iszd {
-  position: absolute;
-  left: 0.2rem;
-  top: 0.3rem;
-}
 
 /* 鎼滅储妗嗙殑鏍峰紡 */
 .ssk {
@@ -113,7 +110,7 @@
   top: 0;
   left: 0;
   background-color: #f3f3f3;
-  z-index: 99;
+  z-index: 1099;
 }
 .search-container {
   /* background-color: #fff; */
@@ -150,7 +147,6 @@
   width: 0.8rem;
   position: relative;
   font-size: 0.14rem;
-
 }
 .el-select:after {
   content: "";
@@ -209,7 +205,7 @@
   line-height: 20px;
 }
 .ssjg .addressBox {
-  text-indent: 27px;
+  margin-left: 27px;
   margin-top: 5px;
   color: #000;
   font-weight: 500;
@@ -349,7 +345,7 @@
       rectangle.maxy > 31.182515322 && (rectangle.maxy = 31.182515322);
       return `RECT(${rectangle.minx} ${rectangle.miny},${rectangle.maxx} ${rectangle.maxy})`;
     },
-    getPoi() {
+    getGdPoi() {
       axios
         .get(common.poiserve, {
           params: {
@@ -362,8 +358,6 @@
           },
         })
         .then((res) => {
-          // 楂樺痉
-          console.log("poiserve");
           if (res.data.status == "1") {
             res.data.pois &&
               res.data.pois
@@ -395,6 +389,49 @@
                     pname: val.province,
                     type: val.type,
                     typecode: val.typecode,
+                  };
+                  Allresults.push(obj);
+                });
+          }
+          this.total = Allresults.length;
+          this.poiList = Allresults;
+          this.showList = true;
+        });
+    },
+    getBdPoi() {
+      axios
+        .get(common.poiserve, {
+          params: {
+            request: "bdPoi",
+            query: this.poi_text,
+            output: "json",
+            coord: "cgcs2000",
+            page_num: 1,
+            page_size: 30,
+          },
+        })
+        .then((res) => {
+          console.log(res);
+          if (res.data.status == 0) {
+            res.data.results &&
+              res.data.results
+                .filter((item) => {
+                  var reg = new RegExp("[\\u4E00-\\u9FFF]+", "g");
+                  return (
+                    item.city.includes("鍖椾含") &&
+                    item.name.includes(this.poi_text)
+                  );
+                })
+                .forEach((val) => {
+                  let obj = {
+                    address: val.address,
+                    adname: val.area,
+                    cityname: val.city,
+                    id: val.uid,
+                    lat: parseFloat(val.location.lat),
+                    lng: parseFloat(val.location.lng),
+                    name: val.name,
+                    pname: val.province,
                   };
                   Allresults.push(obj);
                 });
@@ -454,7 +491,7 @@
         this.poiList = [];
         switch (this.select) {
           case "鍏ㄩ儴":
-            this.getPoi();
+            this.getBdPoi();
             this.getData();
             // axios
             //   .all([
@@ -580,7 +617,7 @@
             //   );
             break;
           case "POI":
-            this.getPoi();
+            this.getBdPoi();
             break;
           case "鍦板潡":
             this.getData();

--
Gitblit v1.9.3