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 |   85 ++++++++++++++++++++++++++++++------------
 1 files changed, 61 insertions(+), 24 deletions(-)

diff --git a/src/components/leftMenu/sousuo2.vue b/src/components/leftMenu/sousuo2.vue
index 06abd69..def806e 100644
--- a/src/components/leftMenu/sousuo2.vue
+++ b/src/components/leftMenu/sousuo2.vue
@@ -1,11 +1,14 @@
 <template>
   <div id="sousuo" class="sousuo">
     <!-- 鎼滅储妗� -->
-    <div class="ssk" v-show="ssk.show">
+    <div class="ssk" v-if="ssk.show">
       <span
         @click="ssjmxs"
         style="float: left; height: 100%; width: 80%; overflow: hidden"
-        ><i class="el-icon-search" style="padding: 0px 15px 0px 20px"></i
+        ><i
+          class="el-icon-search"
+          style="padding: 0px 15px 0px 20px; font-size: 0.15rem"
+        ></i
         >{{ syssval }}</span
       >
       <span
@@ -32,9 +35,9 @@
       </span> -->
     </div>
     <!-- 鎼滅储鐣岄潰 -->
-    <div class="ssjm" v-show="ssjm">
+    <div class="ssjm" v-if="ssjm">
       <!-- 鎼滅储妗� -->
-      <div class="search-container" style="margin: 0.1rem 0">
+      <div class="search-container">
         <div class="back" @click="cancless"></div>
         <el-input
           placeholder="杈撳叆鍏抽敭瀛楁悳绱㈠湴鍥�"
@@ -80,12 +83,6 @@
   </div>
 </template>
 <style scoped>
-/* 鎼滅储鎸夐挳鐨勬牱寮� */
-.iszd {
-  position: absolute;
-  left: 0.2rem;
-  top: 0.3rem;
-}
 
 /* 鎼滅储妗嗙殑鏍峰紡 */
 .ssk {
@@ -98,7 +95,7 @@
   height: 0.4rem;
   line-height: 0.4rem;
   background: #fff;
-  border-radius: 0.15rem;
+  border-radius: 0.14rem;
   color: black;
   font-size: 0.14rem;
 }
@@ -111,8 +108,9 @@
   width: 100%;
   height: 100%;
   top: 0;
+  left: 0;
   background-color: #f3f3f3;
-  z-index: 99;
+  z-index: 1099;
 }
 .search-container {
   /* background-color: #fff; */
@@ -142,12 +140,13 @@
 .el-input /deep/ .el-input__inner {
   border: none;
   font-weight: 500;
-  font-size: 17px;
+  font-size: 0.14rem;
   color: #3e3d3d;
 }
 .el-select {
-  width: 80px;
+  width: 0.8rem;
   position: relative;
+  font-size: 0.14rem;
 }
 .el-select:after {
   content: "";
@@ -163,14 +162,11 @@
   padding-right: 25px;
 }
 .el-input /deep/ .el-input-group__append .el-button {
-  font-size: 15px;
+  font-size: 0.14rem;
   color: #ffffff;
-  line-height: 17px;
   background: #2477ff;
   border-radius: 13px;
   padding: 10px;
-  width: 62px;
-  height: 33px;
 }
 
 .el-scrollbar .hover {
@@ -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