This commit is contained in:
A1300399510
2023-07-27 10:44:08 +08:00
parent b35cb8069f
commit 920e1a337c
5 changed files with 27 additions and 13 deletions

View File

@@ -243,6 +243,7 @@ img {
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
color: #AAAAAA; color: #AAAAAA;
cursor: pointer;
} }
} }

View File

@@ -7,7 +7,7 @@
</div> </div>
<div id="container"> <div id="container">
<div class="location-bj flexcenter" @click="showPop" v-if="!show"> <div class="location-bj flexcenter" @click="showPop" v-if="!show">
<div class="location-site flexacenter"> <div class="location-site flexacenter" v-if="props['name']">
<img class="tracingPoint" src="@/assets/img/publicImage/u1704.png" /> <img class="tracingPoint" src="@/assets/img/publicImage/u1704.png" />
<div class="location-name">{{ props['name'] }}</div> <div class="location-name">{{ props['name'] }}</div>
<img class="location-arrows" src="@/assets/img/publicImage/u353.svg" /> <img class="location-arrows" src="@/assets/img/publicImage/u353.svg" />
@@ -28,8 +28,9 @@ const props = defineProps({
let key = ref("MVNBZ-PEFWI-O4OGT-5ADVJ-7QAYJ-NBFY4") let key = ref("MVNBZ-PEFWI-O4OGT-5ADVJ-7QAYJ-NBFY4")
console.log("props.latlng", props.latlng['latitude'], props.latlng['longitude']);
const initMap = () => { const initMap = () => {
let center = new TMap.LatLng(props.latlng['longitude'], props.latlng['latitude']); let center = new TMap.LatLng(props.latlng['latitude'], props.latlng['longitude']);
let map = new TMap.Map("container", { let map = new TMap.Map("container", {
zoom: 15, zoom: 15,
disableDefaultUI: true, //禁止所有控件 disableDefaultUI: true, //禁止所有控件
@@ -44,7 +45,7 @@ const initMap = () => {
id: "marker-layer", id: "marker-layer",
map: map, map: map,
geometries: [{ geometries: [{
"position": new TMap.LatLng(props.latlng['longitude'], props.latlng['latitude']), "position": new TMap.LatLng(props.latlng['latitude'], props.latlng['longitude']),
}] }]
}); });
} }

View File

@@ -95,7 +95,8 @@ const routes = [
path: "/apartmentDetail", path: "/apartmentDetail",
component: () => import(/* webpackChunkName: "housing" */ '@/views/apartmentDetail.vue'), component: () => import(/* webpackChunkName: "housing" */ '@/views/apartmentDetail.vue'),
meta: { meta: {
title: "品牌公寓详情" title: "品牌公寓详情",
path:'/apartmentDetail'
} }
} }
] ]

View File

@@ -179,8 +179,8 @@
<img class="icon" src="@/assets/img/apartmentDetail/location-icon.png"> <img class="icon" src="@/assets/img/apartmentDetail/location-icon.png">
{{ info.location || '位置' }} {{ info.location || '位置' }}
</div> </div>
<view-map :latlng="{ longitude: info['coordinate'][0], latitude: info['coordinate'][1] }" <view-map :latlng="{ latitude: info['coordinate'][0], longitude: info['coordinate'][1] }"
:name="info['address']"></view-map> :name="info['address']"></view-map>{{ info['coordinate'][0] }} 11 {{ info['coordinate'][1] }}
<!-- 交通 --> <!-- 交通 -->
<div class="traffic-box" v-if="info['traffic']"> <div class="traffic-box" v-if="info['traffic']">
@@ -290,7 +290,7 @@
<div class="site flexacenter"> <div class="site flexacenter">
<img class="site-icon" src="@/assets/img/publicImage/location-icon.png"> <img class="site-icon" src="@/assets/img/publicImage/location-icon.png">
{{ item['address'] }} <div class="site-text ellipsis">{{ item['address'] }}</div>
</div> </div>
<div class="price-box"> <div class="price-box">
@@ -355,7 +355,7 @@
</template> </template>
<script setup> <script setup>
import { ref, onMounted, toRefs, watch, getCurrentInstance, nextTick } from 'vue'; import { ref, onMounted, onUnmounted, toRefs, watch, getCurrentInstance, nextTick } from 'vue';
import { ElMessage, valueEquals } from 'element-plus' import { ElMessage, valueEquals } from 'element-plus'
import { useStore } from 'vuex'; import { useStore } from 'vuex';
@@ -371,7 +371,6 @@ let router = useRouter()
let { uniqid } = router.currentRoute.value.query let { uniqid } = router.currentRoute.value.query
import { copyToClipboard } from '@/utils/util.js' import { copyToClipboard } from '@/utils/util.js'
// const uniqid = "aWqSz58aKKvn"
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const store = useStore(); const store = useStore();
@@ -422,8 +421,6 @@ proxy.$get("/tenement/pc/api/apartment/details", { uniqid }).then(res => {
token = data['token'] token = data['token']
qrcode.value = data['qrcode'] qrcode.value = data['qrcode']
handleAllCarouselsData() handleAllCarouselsData()
@@ -617,6 +614,20 @@ const slideshowType = type => slideshowItem(carouselsconfig.value[type].index)
let detailsLeft = ref(null) let detailsLeft = ref(null)
onMounted(() => {
window.addEventListener('scroll', handleScroll);
});
onUnmounted(() => {
window.removeEventListener('scroll', handleScroll);
});
const handleScroll = () => {
// 处理滚动事件
}
</script> </script>

View File

@@ -427,8 +427,8 @@
<div class="dis-f jus-x" style="margin-top:15px;"> <div class="dis-f jus-x" style="margin-top:15px;">
<div v-if="housingInfo['data']"> <div v-if="housingInfo['data']">
<mapInfo :latlng="{ <mapInfo :latlng="{
latitude: housingInfo['data'].info.longitude * 1, longitude: housingInfo['data'].info.longitude * 1,
longitude: housingInfo['data'].info.latitude * 1 latitude: housingInfo['data'].info.latitude * 1
}" :name="housingInfo['data'].info.address"></mapInfo> }" :name="housingInfo['data'].info.address"></mapInfo>
</div> </div>
</div> </div>