From 81773ab04fd259e893c2d7f08dbdc9be772d01c4 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 21 Dec 2021 17:18:45 +0800
Subject: [PATCH] +,请求数据,弹框显示,优化代码长度
---
src/components/mobilePopupOurOnce/index.vue | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/src/components/mobilePopupOurOnce/index.vue b/src/components/mobilePopupOurOnce/index.vue
index 6ef5d47..bb20d60 100644
--- a/src/components/mobilePopupOurOnce/index.vue
+++ b/src/components/mobilePopupOurOnce/index.vue
@@ -23,7 +23,15 @@
<div class="mobilePopupOurOnce_r_down">
<div v-for="(item, index) in seebut" :key="index">
<el-link
- icon="el-icon-map-location"
+ :icon="
+ item.name == '实景'
+ ? 'el-icon-place'
+ : item.name == '图集'
+ ? 'el-icon-data-board'
+ : item.name == '定位'
+ ? 'el-icon-map-location'
+ : ''
+ "
class="mobilePopupOurOnce_r_d_in"
@click="openOnce(item.name)"
>{{ item.name }}</el-link
@@ -48,17 +56,13 @@
name: "mobilePopupOurOnce",
created() {
this.DC = global.DC;
- // console.log(this.onceData);
if (this.onceData.icon) {
this.srcList = this.onceData.icon;
this.icon = this.srcList[0];
}
if (this.onceData.from == "校园建筑") {
this.getOnceCampus(this.onceData.id);
- } else if (
- this.onceData.from == "机构单位" ||
- this.onceData.from == "生活设施"
- ) {
+ } else {
this.ourData = this.onceData;
}
},
@@ -111,7 +115,6 @@
"https://www.kuleiman.com/110487/index.html?m=1"
);
} else if (val == "图集") {
- console.log(this.srcList);
let imgsDom = document.getElementById("mobileBigImgs" + this.icon + "");
imgsDom.click();
}
@@ -120,7 +123,6 @@
getOnceCampus(id) {
getChildNavDetail({ id: id }).then((res) => {
var result = res.data.data[0].list;
- // console.log(result);
let d = {
name: result.mechanismname,
lntLat: [result.jd, result.wd],
@@ -132,6 +134,7 @@
QRImg: result.codeurl,
websiteUrl: result.websiteurl,
telePhone: result.telephone,
+ address: result.address,
};
this.ourData = d;
});
--
Gitblit v1.9.3