From acb45c731c3ccd0a67061efb4e7bdf4f56005672 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 12 Jan 2022 08:52:13 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/school-web

---
 src/components/mobilePopupOur/index.vue |   70 +++++++++++++++++++++++++++++++---
 1 files changed, 63 insertions(+), 7 deletions(-)

diff --git a/src/components/mobilePopupOur/index.vue b/src/components/mobilePopupOur/index.vue
index 87571b6..1270934 100644
--- a/src/components/mobilePopupOur/index.vue
+++ b/src/components/mobilePopupOur/index.vue
@@ -7,7 +7,7 @@
       <div class="m_p_h_center">
         <div>
           <div v-if="mBigPopup.search" style="color: #fff">
-            查询结果{{ searchLabel ? "--" + searchLabel : "" }}
+            查询结果{{ searchLabel ? " -- " + searchLabel : "" }}
           </div>
           <el-dropdown trigger="click" @command="choiceIt" v-else>
             <span class="el-dropdown-link">
@@ -81,6 +81,8 @@
 <script>
 import { getListarc } from "@/api/mobile/public/arc"; //头部下标签页数据
 import { mapGetters } from "vuex";
+//搜索
+import { getListSearch } from "@/api/mobile/search/index";
 export default {
   computed: {
     ...mapGetters(["mBigPopup", "popupOurOpenData"]),
@@ -108,9 +110,10 @@
       // console.log("查询搜索结果", this.mBigPopup.value);
       this.fullscreenLoading = false;
       this.choiceMain = "搜索";
+      this.getListSearchMethod(this.mBigPopup.value);
       return;
     }
-    this.choiceMain = this.popupOurOpenData.qurey; // 进入的主题:列:机构单位,校园建筑
+    this.choiceMain = this.popupOurOpenData.qurey; // 进入的主题:列:机构单位,社区建筑
     this.choiceData = this.popupOurOpenData.main; //带入数据  包括name、type、method
 
     this.choiceValue = this.popupOurOpenData.main[0].name;
@@ -189,10 +192,10 @@
         const data = res.data.data;
         let outList = [];
         if (
-          this.mBigPopup.name == "校园建筑" ||
+          this.mBigPopup.name == "社区建筑" ||
           this.mBigPopup.name == "文化风景"
         ) {
-          // 校园建筑使用该id获取具体信息
+          // 社区建筑使用该id获取具体信息
           data.forEach((item) => {
             let icon = item.tpurl.split(",");
             outList.push({
@@ -201,8 +204,9 @@
               icon: icon,
               icons: icon + item.mechanismname, //图片响应改变
               from: this.choiceMain,
+              video: item.videourl,
               buts:
-                this.mBigPopup.name == "校园建筑" ||
+                this.mBigPopup.name == "社区建筑" ||
                 this.mBigPopup.name == "文化风景"
                   ? ["定位", "实景", "图集"]
                   : ["定位"],
@@ -228,8 +232,9 @@
               telePhone: item.telephone,
               address: item.address,
               introduce: item.introduce,
+              video: item.videourl,
               buts:
-                that.mBigPopup.name == "校园建筑" ||
+                that.mBigPopup.name == "社区建筑" ||
                 that.mBigPopup.name == "文化风景"
                   ? ["定位", "实景", "图集"]
                   : ["定位"],
@@ -244,7 +249,58 @@
         }
         that.tabTable[+campus - 1].child = outList;
       });
+      this.notLine();
+    },
+    //搜索请求
+    getListSearchMethod(name) {
+      let val = {
+          mechanismName: name,
+        },
+        that = this;
+      getListSearch(val).then((res) => {
+        if (res.data.code != 200) {
+          return;
+        }
+        const data = res.data.data;
+        //正常获取全部数据
+        let outList = [];
+        data.forEach((item) => {
+          let icon = item.list.tpurl.split(",");
+          let useData = {
+            name: item.list.mechanismname,
+            lntLat: [item.list.jd, item.list.wd],
+            alt: item.list.gd,
+            heading: item.list.heading,
+            pitch: item.list.pitch,
+            roll: item.list.roll,
+            bgImg: item.list.tpurl,
+            icon: icon,
+            icons: icon + item.list.mechanismname, //图片响应改变
+            from: this.choiceMain,
+            QRImg: item.list.codeurl,
+            websiteUrl: item.list.websiteurl,
+            telePhone: item.list.telephone,
+            address: item.list.address,
+            introduce: item.list.introduce,
+            video: item.list.videourl,
+            buts:
+              that.mBigPopup.name == "社区建筑" ||
+              that.mBigPopup.name == "文化风景"
+                ? ["定位", "实景", "图集"]
+                : ["定位"],
+          };
+          outList.push(useData);
+        });
+        that.fullscreenLoading = false;
+        that.onlyData = outList;
+      });
+      this.notLine();
+    },
+    notLine() {
+      setTimeout(() => {
+        this.fullscreenLoading = false;
+      }, 5000);
     },
   },
 };
-</script>
\ No newline at end of file
+</script>

--
Gitblit v1.9.3