From eb71fd6eacc6cac2e704f57c472e181cbb20990c Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 22 Dec 2021 16:04:52 +0800
Subject: [PATCH] +位置和细节,左侧导航栏接口,点击弹窗
---
src/components/mobilePopupOur/index.vue | 42 +++++++++++++++++++++++++++++++++++-------
1 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/src/components/mobilePopupOur/index.vue b/src/components/mobilePopupOur/index.vue
index 0c89a11..bf91d24 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.bgImg + ''"
+ :key="citem.icons + ''"
:ends="onlyData.length - 1 == cindex"
:onceData="citem"
></mobilePopupOurOnce>
@@ -61,10 +61,11 @@
></el-empty>
<mobilePopupOurOnce
v-for="(citem, cindex) in item.child"
- :key="citem.icon + ''"
+ :key="citem.icons"
:ends="item.child.length - 1 == cindex"
:onceData="citem"
></mobilePopupOurOnce>
+ <!-- {{ citem.icon }} -->
<div v-show="item.child.length != 0">
<el-divider content-position="left">
<i class="el-icon-s-promotion"></i> 暂无更多
@@ -141,7 +142,7 @@
getDataHeardDown() {
if (this.choiceMain == "机构单位") {
//不请求头部标签页数据
- this.getOutList(this.activeName, this.choiceKey);
+ this.getOutList(this.choiceKey);
return;
}
//获取头下部标签页
@@ -162,10 +163,34 @@
//请求
getOutList(campus, type) {
let that = this;
- this.choiceMethod({ campus: campus, type: type }).then((res) => {
+ let d;
+ if (this.choiceMain == "机构单位") {
+ // 不传标签页
+ d = {
+ type: type,
+ };
+ } else if (
+ this.choiceMain == "生活设施" ||
+ this.choiceMain == "出入口" ||
+ this.choiceMain == "停车场"
+ ) {
+ // 不传头部下拉菜单,因为请求链接不同
+ d = {
+ campus: campus,
+ };
+ } else {
+ d = {
+ campus: campus,
+ type: type,
+ };
+ }
+ this.choiceMethod(d).then((res) => {
const data = res.data.data;
let outList = [];
- if (this.choiceMain == "校园建筑") {
+ if (
+ this.mBigPopup.name == "校园建筑" ||
+ this.mBigPopup.name == "文化风景"
+ ) {
// 校园建筑使用该id获取具体信息
data.forEach((item) => {
let icon = item.tpurl.split(",");
@@ -173,6 +198,7 @@
id: item.id,
name: item.mechanismname,
icon: icon,
+ icons: icon + item.mechanismname, //图片响应改变
from: this.choiceMain,
buts:
this.mBigPopup.name == "校园建筑" ||
@@ -185,7 +211,7 @@
//正常获取全部数据
data.records.forEach((item) => {
let icon = item.tpurl.split(",");
- outList.push({
+ let useData = {
name: item.mechanismname,
lntLat: [item.jd, item.wd],
alt: item.gd,
@@ -194,6 +220,7 @@
roll: item.roll,
bgImg: item.tpurl,
icon: icon,
+ icons: icon + item.mechanismname, //图片响应改变
from: this.choiceMain,
QRImg: item.codeurl,
websiteUrl: item.websiteurl,
@@ -205,7 +232,8 @@
that.mBigPopup.name == "文化风景"
? ["定位", "实景", "图集"]
: ["定位"],
- });
+ };
+ outList.push(useData);
});
}
that.fullscreenLoading = false;
--
Gitblit v1.9.3