From bf58722dfd03ea1513f3acc7331d4d4403fca76e Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 18 Mar 2022 11:48:37 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/school-web

---
 src/components/mobilePopupOur/index.vue |  112 +++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 86 insertions(+), 26 deletions(-)

diff --git a/src/components/mobilePopupOur/index.vue b/src/components/mobilePopupOur/index.vue
index 92e36be..b0e91c2 100644
--- a/src/components/mobilePopupOur/index.vue
+++ b/src/components/mobilePopupOur/index.vue
@@ -37,7 +37,7 @@
         ></el-empty>
         <mobilePopupOurOnce
           v-for="(citem, cindex) in onlyData"
-          :key="citem.icons + ''"
+          :key="citem.name + cindex"
           :ends="onlyData.length - 1 == cindex"
           :onceData="citem"
         ></mobilePopupOurOnce>
@@ -113,7 +113,7 @@
       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;
@@ -123,6 +123,13 @@
     this.$store.commit("MSET_BIGPOPUPAFTER", false); //关闭前一个弹窗
     // console.log("请求对应街道接口", this.popupOurOpenData);
     this.getDataHeardDown();
+  },
+  watch: {
+    fullscreenLoading() {
+      if (this.fullscreenLoading) {
+        this.notLine();
+      }
+    },
   },
   methods: {
     handleClick(tab, event) {
@@ -143,9 +150,13 @@
       this.$store.commit("MSET_BIGPOPUP", false);
     },
     getDataHeardDown() {
-      if (this.choiceMain == "机构单位") {
+      if (this.choiceMain == "活动") {
         //不请求头部标签页数据
         this.getOutList(this.choiceKey);
+        return;
+      }
+      if (this.choiceMain == "机构单位") {
+        this.getOutList("", this.choiceKey);
         return;
       }
       //获取头下部标签页
@@ -165,6 +176,7 @@
     },
     //请求
     getOutList(campus, type) {
+      // console.log(this.choiceMain, campus, type, "see");
       let that = this;
       let d;
       if (this.choiceMain == "机构单位") {
@@ -192,12 +204,12 @@
         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(",");
+            let icon = item.tpurl ? item.tpurl.split(",") : item.id;
             outList.push({
               id: item.id,
               name: item.mechanismname,
@@ -206,11 +218,50 @@
               from: this.choiceMain,
               video: item.videourl,
               buts:
-                this.mBigPopup.name == "校园建筑" ||
+                this.mBigPopup.name == "校区建筑" ||
                 this.mBigPopup.name == "文化风景"
                   ? ["定位", "实景", "图集"]
                   : ["定位"],
             });
+          });
+        } else if (this.mBigPopup.name == "活动") {
+          // 校区建筑使用该id获取具体信息
+          data.records.forEach((item) => {
+            let icon = item.tpurl.split(",");
+            let useData = {
+              name: item.hdname,
+              // lntLat: [item.jd, item.wd],
+              // alt: item.gd,
+              // heading: item.heading,
+              // pitch: item.pitch,
+              // roll: item.roll,
+              bgImg: item.tpurl,
+              icon: icon,
+              icons: icon + item.hdname, //图片响应改变
+              from: this.choiceMain,
+              // QRImg: item.codeurl,
+              websiteUrl: item.websiteurl,
+              telePhone: item.telephone,
+              // address: item.address,
+              introduce: item.context,
+              video: item.videourl,
+              buts:
+                that.mBigPopup.name == "校区建筑" ||
+                that.mBigPopup.name == "文化风景"
+                  ? ["定位", "实景", "图集"]
+                  : ["定位"],
+              //活动添加的字段
+              addressname: item.addressname.split(";"),
+              address: item.address.split(";"),
+              lxname: item.lxname.split(";"),
+              lx: item.lx.split(";"),
+              lntLat: [
+                item.address.split(";")[0].split(",")[0],
+                item.address.split(";")[0].split(",")[1],
+              ],
+              panoramaurl: item.panoramaurl, //全景
+            };
+            outList.push(useData);
           });
         } else {
           //正常获取全部数据
@@ -234,16 +285,17 @@
               introduce: item.introduce,
               video: item.videourl,
               buts:
-                that.mBigPopup.name == "校园建筑" ||
+                that.mBigPopup.name == "校区建筑" ||
                 that.mBigPopup.name == "文化风景"
                   ? ["定位", "实景", "图集"]
                   : ["定位"],
+              panoramaurl: item.panoramaurl, //全景
             };
             outList.push(useData);
           });
         }
         that.fullscreenLoading = false;
-        if (this.choiceMain == "机构单位") {
+        if (this.choiceMain == "机构单位" || this.choiceMain == "活动") {
           that.onlyData = outList;
           return;
         }
@@ -264,29 +316,30 @@
         //正常获取全部数据
         let outList = [];
         data.forEach((item) => {
-          let icon = item.list.tpurl.split(",");
+          let icon = item.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,
+            name: item.mechanismname,
+            lntLat: [item.jd, item.wd],
+            alt: item.gd,
+            heading: item.heading,
+            pitch: item.pitch,
+            roll: item.roll,
+            bgImg: item.tpurl,
             icon: icon,
-            icons: icon + item.list.mechanismname, //图片响应改变
+            icons: icon + item.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,
+            QRImg: item.codeurl,
+            websiteUrl: item.websiteurl,
+            telePhone: item.telephone,
+            address: item.address,
+            introduce: item.introduce,
+            video: item.videourl,
             buts:
-              that.mBigPopup.name == "校园建筑" ||
+              that.mBigPopup.name == "校区建筑" ||
               that.mBigPopup.name == "文化风景"
                 ? ["定位", "实景", "图集"]
                 : ["定位"],
+            panoramaurl: item.panoramaurl, //全景
           };
           outList.push(useData);
         });
@@ -294,6 +347,13 @@
         that.onlyData = outList;
       });
     },
+    notLine() {
+      console.log("等待关闭");
+      setTimeout(() => {
+        this.fullscreenLoading = false;
+        console.log("关闭dolog");
+      }, 5000);
+    },
   },
 };
-</script>
\ No newline at end of file
+</script>

--
Gitblit v1.9.3