提交
This commit is contained in:
@@ -108,7 +108,8 @@ let watchInfo=()=>{
|
||||
router.push({
|
||||
path:itemData.type==='apartment'?'/apartmentDetail':'/detail',
|
||||
query: {
|
||||
id: itemData.type=='apartment'?itemData.id:itemData.uniqid,
|
||||
// id: itemData.type=='apartment'?itemData.id:itemData.uniqid,
|
||||
// [itemData.type=='apartment'?itemData.id:itemData.uniqid,]: itemData.type=='apartment'?itemData.id:itemData.uniqid,
|
||||
type:itemData.intermediary=='1'?2:itemData.intermediary=='6'?3:!itemData.intermediary?'':1
|
||||
}
|
||||
})
|
||||
|
||||
@@ -28,7 +28,6 @@ const props = defineProps({
|
||||
|
||||
let key = ref("MVNBZ-PEFWI-O4OGT-5ADVJ-7QAYJ-NBFY4")
|
||||
|
||||
console.log("props.latlng", props.latlng['latitude'], props.latlng['longitude']);
|
||||
const initMap = () => {
|
||||
let center = new TMap.LatLng(props.latlng['latitude'], props.latlng['longitude']);
|
||||
let map = new TMap.Map("container", {
|
||||
|
||||
@@ -14,7 +14,7 @@ axios.interceptors.request.use( //响应拦截
|
||||
showFullScreenLoading()
|
||||
// 开发时登录用的,可以直接替换小程序的 authorization
|
||||
// if (process.env.NODE_ENV == "development") config['headers']['authorization'] = "x2mmnl9grt51bpplj2k6ioiuummzhnw3"
|
||||
if (process.env.NODE_ENV == "development") config['headers']['authorization'] = "0h870ovk2xckoqfsh8a3t3sg4sg5z7eg"
|
||||
// if (process.env.NODE_ENV == "development") config['headers']['authorization'] = "0h870ovk2xckoqfsh8a3t3sg4sg5z7eg"
|
||||
return config;
|
||||
},
|
||||
error => {
|
||||
|
||||
@@ -6,11 +6,14 @@
|
||||
<div class="top flexflex">
|
||||
<div class="brand-name flexcenter">{{ company.title }}</div>
|
||||
<div class="brand-abstract">{{ info['propaganda'] }}</div>
|
||||
<div class="arc-bj">
|
||||
<div class="arc"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-content flexflex">
|
||||
<img class="arc" src="@/assets/img/publicImage/arc-shadow.png">
|
||||
<!-- <img class="arc" src="@/assets/img/publicImage/arc-shadow.png"> -->
|
||||
<div class="header-left">
|
||||
<image-watch style="z-index: 1003;" :show="imageShow" :close="cloaseImageShow"
|
||||
<image-watch style="z-index: 1003;" arrow="never" :show="imageShow" :close="cloaseImageShow"
|
||||
:list="imageList"></image-watch>
|
||||
<div class="slideshow">
|
||||
<el-carousel :autoplay="false" indicator-position="none" ref="remarkCaruselUp"
|
||||
@@ -180,7 +183,7 @@
|
||||
{{ info.location || '位置' }}
|
||||
</div>
|
||||
<view-map :latlng="{ latitude: info['coordinate'][0], longitude: info['coordinate'][1] }"
|
||||
:name="info['address']"></view-map>{{ info['coordinate'][0] }} 11 {{ info['coordinate'][1] }}
|
||||
:name="info['address']"></view-map>
|
||||
|
||||
<!-- 交通 -->
|
||||
<div class="traffic-box" v-if="info['traffic']">
|
||||
@@ -280,12 +283,12 @@
|
||||
</div>
|
||||
|
||||
<div class="same-brand-list" v-if="dualBrandList.length != 0">
|
||||
<div class="same-brand-item" v-for="item in dualBrandList">
|
||||
<div class="same-brand-item" v-for="item in dualBrandList" @click="gobrand(item)">
|
||||
<div class="same-brand-header">
|
||||
<img class="same-brand-img"
|
||||
src="https://axure-file.lanhuapp.com/md5__27da7a1a511d30b97b139f58626415e5.svg" />
|
||||
<div class="apartment-name">{{ item['title'] }}</div>
|
||||
<div class="apartment-synopsis">{{ item['propaganda'] }}</div>
|
||||
<div class="apartment-synopsis ellipsis">{{ item['propaganda'] }}</div>
|
||||
</div>
|
||||
|
||||
<div class="site flexacenter">
|
||||
@@ -364,9 +367,37 @@ import footerpage from '@/components/footer/footer.vue'
|
||||
import viewMap from '@/components/public/viewMap.vue'
|
||||
import transmitBtn from '@/components/public/transmitBtn.vue'
|
||||
import imageWatch from '@/components/detail/imageWatch.vue';
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
let router = useRouter()
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
|
||||
watch(route, () => {
|
||||
uniqid = router.currentRoute.value.query['uniqid']
|
||||
info.value = {}
|
||||
roomList.value = []
|
||||
carouselsconfig.value = { lives: {}, videos: {}, attachment: {} }
|
||||
navList.value = []
|
||||
navTab.value = 'roomEle'
|
||||
dualBrandList.value = []
|
||||
contactReservationState.value = false
|
||||
customerservicelist.value = []
|
||||
mediaBtnstate.value = {}
|
||||
|
||||
|
||||
slideshowList.value = null
|
||||
detailsLeft.value = null
|
||||
token = ""
|
||||
|
||||
carouselIndex.value = 0
|
||||
allCarouselsData.value = []
|
||||
// mediaBtnstate.value = {}
|
||||
|
||||
|
||||
init()
|
||||
|
||||
});
|
||||
|
||||
let { uniqid } = router.currentRoute.value.query
|
||||
|
||||
@@ -384,8 +415,6 @@ const cloaseImageShow = (list) => {
|
||||
imageShow.value = !imageShow.value
|
||||
}
|
||||
|
||||
// allCarouselsData
|
||||
|
||||
// 房间类型
|
||||
let roomList = ref([])
|
||||
let info = ref({})
|
||||
@@ -406,29 +435,37 @@ let qrcode = ref("") // 小程序详情二维码
|
||||
let allCarouselsData = ref([])
|
||||
|
||||
|
||||
proxy.$get("/tenement/pc/api/apartment/details", { uniqid }).then(res => {
|
||||
if (res.code != 200) return
|
||||
let data = res.data
|
||||
roomList.value = data['roomList']
|
||||
data['info']['coordinate'] = data['info']['coordinate'].split(',').map(item => {
|
||||
return +item
|
||||
})
|
||||
|
||||
info.value = data['info']
|
||||
attachment.value = data['info']['attachment']
|
||||
withsameapartments.value = data['withsameapartments']
|
||||
company = data['company']
|
||||
token = data['token']
|
||||
qrcode.value = data['qrcode']
|
||||
|
||||
handleAllCarouselsData()
|
||||
|
||||
|
||||
nextTick(() => handleNavData())
|
||||
|
||||
if (data.withsameapartments > 0) dualBrandData()
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
|
||||
const init = () => {
|
||||
proxy.$get("/tenement/pc/api/apartment/details", { uniqid }).then(res => {
|
||||
if (res.code != 200) return
|
||||
let data = res.data
|
||||
roomList.value = data['roomList']
|
||||
data['info']['coordinate'] = data['info']['coordinate'].split(',').map(item => {
|
||||
return +item
|
||||
})
|
||||
|
||||
info.value = data['info']
|
||||
attachment.value = data['info']['attachment']
|
||||
withsameapartments.value = data['withsameapartments']
|
||||
company = data['company']
|
||||
token = data['token']
|
||||
qrcode.value = data['qrcode']
|
||||
|
||||
handleAllCarouselsData()
|
||||
|
||||
|
||||
nextTick(() => handleNavData())
|
||||
|
||||
if (data.withsameapartments > 0) dualBrandData()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
let carouselsconfig = ref({ lives: {}, videos: {}, attachment: {} })
|
||||
|
||||
@@ -514,7 +551,7 @@ const handleNavData = () => {
|
||||
// 处理点击nav 滚动事件
|
||||
const handleClickNav = value => {
|
||||
let scrollTop = eval(value).value.offsetTop + 136
|
||||
if (value != 'eleseEle') navTab.value = value
|
||||
// if (value != 'eleseEle') navTab.value = value
|
||||
window.scrollTo({ top: scrollTop, behavior: 'smooth' });
|
||||
}
|
||||
|
||||
@@ -622,10 +659,23 @@ onUnmounted(() => {
|
||||
window.removeEventListener('scroll', handleScroll);
|
||||
});
|
||||
|
||||
const gobrand = item => {
|
||||
router.push(`/apartmentDetail?uniqid=${item.uniqid}`)
|
||||
}
|
||||
|
||||
const handleScroll = () => {
|
||||
if (Math.random() > 0.3) return
|
||||
for (let i = 0; i < navList.value.length; i++) {
|
||||
let element = navList.value[i]
|
||||
|
||||
const rect = eval(element.value).value.getBoundingClientRect();
|
||||
const distanceToTop = rect.top;
|
||||
if (distanceToTop >= 0) {
|
||||
navTab.value = element.value
|
||||
break;
|
||||
}
|
||||
|
||||
// 处理滚动事件
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -648,6 +698,7 @@ const handleScroll = () => {
|
||||
background: linear-gradient(93.1004914498078deg, rgba(253, 218, 85, 1) 0%, rgba(229, 215, 190, 1) 50%, rgba(203, 254, 191, 1) 100%);
|
||||
border-radius: 16px 16px 0 0;
|
||||
padding: 0 30px;
|
||||
position: relative;
|
||||
|
||||
.brand-name {
|
||||
height: 22px;
|
||||
@@ -666,6 +717,23 @@ const handleScroll = () => {
|
||||
font-size: 14px;
|
||||
padding-top: 13px;
|
||||
}
|
||||
|
||||
.arc-bj {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
right: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-color: #fff;
|
||||
|
||||
.arc {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(203, 254, 191, 1);
|
||||
border-radius: 0 0 100% 0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.header-content {
|
||||
@@ -675,13 +743,13 @@ const handleScroll = () => {
|
||||
border-radius: 16px 0 16px 16px;
|
||||
position: relative;
|
||||
|
||||
.arc {
|
||||
position: absolute;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
top: -12px;
|
||||
right: 0;
|
||||
}
|
||||
// .arc {
|
||||
// position: absolute;
|
||||
// width: 12px;
|
||||
// height: 12px;
|
||||
// top: -12px;
|
||||
// right: 0;
|
||||
// }
|
||||
|
||||
.header-left {
|
||||
width: 511px;
|
||||
@@ -1407,6 +1475,7 @@ const handleScroll = () => {
|
||||
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.156862745098039);
|
||||
padding: 8px 0;
|
||||
margin-bottom: 20px;
|
||||
cursor: pointer;
|
||||
|
||||
.same-brand-header {
|
||||
width: 288px;
|
||||
|
||||
Reference in New Issue
Block a user