This commit is contained in:
2025-12-25 08:26:09 +08:00
parent ab5c01bf5c
commit 964e4f9c33
72 changed files with 2474 additions and 1065 deletions

View File

@@ -2,40 +2,28 @@
<view class="asset-detail">
<!-- 顶部导航栏 -->
<customNavbar
title="不动资产详情"
></customNavbar>
title="不动资产详情" ref="navbar"/>
<!-- 顶部信息块 -->
<view class="top-block u-flex u-row-between u-p-20">
<!-- 左侧轮播图 -->
<view class="left-swiper">
<u-swiper
<view :style="{ paddingTop: navTotalHeight + 'px' }">
<!-- <u-swiper
:list="asset.images"
height="220"
border-radius="12"
autoplay
interval="3000"
></u-swiper>
</view>
></u-swiper> -->
<AssetGallery
:insideImages="asset.images"
:vrImage="asset.vrImage"
:vrSrc="asset.vr"
:videos="asset.videos"
:plans="asset.plans"
:adImage="asset.adImage"
@vr-click="viewVR"
@video-play="playVideo"
@ad-click="onAdClick"
/>
<!-- 右侧信息块 -->
<view class="right-info u-flex u-flex-col u-justify-between">
<view>
<view class="asset-name">{{ asset.name }}</view>
<view class="asset-community">所属小区{{ asset.community }}</view>
<view class="asset-rent">租金<text class="price">¥{{ formatMoney(asset.rent) }}/</text></view>
</view>
<view class="btn-group">
<u-button
size="mini"
type="primary"
icon="map"
@click="viewVR"
>
查看VR图
</u-button>
</view>
</view>
</view>
<view class="content">
@@ -93,17 +81,18 @@
<script>
import mycard from '../../components/card/mycard.vue';
import assetBottomBar from '../../components/bottom/assetBottomBar.vue';
import AssetGallery from '../../components/gallery/AssetGallery.vue'
export default {
components:{
mycard,
assetBottomBar
assetBottomBar,
AssetGallery
},
data() {
return {
// 控制预约弹窗显示
showReserve: false,
navTotalHeight: 0,
// 预约表单数据
reserveName: '',
reservePhone: '',
@@ -131,6 +120,13 @@ export default {
onLoad(options) {
this.assetId = options.id || 'A001';
this.loadAssetDetail();
// this.recordView();
},
mounted() {
const navbar = this.$refs.navbar;
const navHeight = navbar.navContentHeight; // 直接拿子组件 data
this.navTotalHeight = navHeight; // 加上额外间距
},
methods: {
// 模拟接口请求
@@ -150,12 +146,15 @@ export default {
lat: 23.135,
lng: 113.327,
images: [
'https://cdn.uviewui.com/uview/swiper/swiper1.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
{
image:'/static/img/index/swiper/swiper3.jpg'
}
],
remark: '该资产目前用于办公出租,维护状态良好。',
isFavorite: false,
status: 1
status: 0
};
this.markers = [
{
@@ -192,7 +191,15 @@ export default {
submitReserve (){
console.log('提交预约看房申请')
this.showReserve = false;
}
},
recordView(assetId) {
let lifeData = uni.getStorageSync('lifeData');
let token = lifeData.vuex_token
let url = "/assets/viewRecord";
this.$u.get(url, {}, {'WT': token}).then(obj => {
});
}
},
};
</script>