|
|
@ -13,9 +13,12 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="se-pr-30 se-flex se-flex-v-c"> |
|
|
|
<!-- <uv-icon name="photo"></uv-icon> --> |
|
|
|
<button class="se-w-140 se-h-60 se-lh-60 se-fs-22 se-bgc-green se-c-white se-py-0 se-br-30 se-px-20 se-m-0" open-type="share">分享</button> |
|
|
|
<!-- <text class="se-c-black se-fs-20">分享</text> --> |
|
|
|
|
|
|
|
|
|
|
|
<button style="justify-content: center;" class="se-w-140 se-flex se-flex-ai-c se-h-60 se-lh-60 se-fs-22 se-bgc-green se-c-white se-py-0 se-br-30 se-px-20 se-m-0" open-type="share"> |
|
|
|
<uv-icon name="share" color="#fff"></uv-icon> |
|
|
|
<text class="se-fs-20 se-pl-5">分享</text> |
|
|
|
</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="se-mt-30 se-bgc-white se-py-30 se-flex se-flex-h-fs"> |
|
|
@ -55,20 +58,24 @@ |
|
|
|
<text class="se-c-black se-fw-6">{{detail.address}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- <view class="se-flex bgc-active-lg se-py-20 se-br-10"> |
|
|
|
<view class="se-flex bgc-active-lg se-py-20 se-br-10"> |
|
|
|
<view class="se-w-p-85 se-pl-30"> |
|
|
|
<view class=" se-c-black se-fw-6 se-fs-24"> |
|
|
|
具体地址:{{detail.address}} |
|
|
|
具体地址:{{address}} |
|
|
|
</view> |
|
|
|
<view class="se-fs-22 se-py-5"> |
|
|
|
<!-- <view class="se-fs-22 se-py-5"> |
|
|
|
距离你1.4km 骑行9分钟 步行18分钟 |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
<view class="se-w-p-15 se-pr-30 se-flex se-flex-v-c"> |
|
|
|
<uv-icon name="photo"></uv-icon> |
|
|
|
<button class="default-btn se-w-p-15 se-pr-30 se-flex se-flex-v-c" open-type="getUserInfo" @click="openMap"> |
|
|
|
<uv-icon name="map-fill"></uv-icon> |
|
|
|
<text class="se-c-black se-fs-20 se-mt-10">导航</text> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
</button> |
|
|
|
<!-- <view class="se-w-p-15 se-pr-30 se-flex se-flex-v-c" @click="onDaoHang"> |
|
|
|
<uv-icon name="map-fill"></uv-icon> |
|
|
|
<text class="se-c-black se-fs-20 se-mt-10">导航</text> |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
<view class="se-flex se-fs-24"> |
|
|
|
<view class="se-flex-2 se-py-20"> |
|
|
|
<text class="se-c-66 se-mr-20">房屋周边</text> |
|
|
@ -194,8 +201,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="se-flex se-mt-20"> |
|
|
|
<image class="se-w-320 se-h-180 se-br-5" :src="detail.homeTf" mode=""></image> |
|
|
|
<image class="se-w-320 se-h-180 se-br-5 se-ml-10" :src="detail.image" mode=""></image> |
|
|
|
<image @click="previewImage(detail.homeImages, items)" v-for="(items,indexs) in detail.homeImages" :key="indexs" class="se-w-320 se-h-180 se-br-5 se-mr-10" :src="items" mode=""></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="se-mt-30 se-p-40 se-bgc-white"> |
|
|
@ -266,13 +272,14 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { houseDetail,saveComment,commentPageList } from "@/common/api.js" |
|
|
|
|
|
|
|
import QQMapWX from "@/util/qqmap-wx-jssdk.min.js" |
|
|
|
export default{ |
|
|
|
data(){ |
|
|
|
return{ |
|
|
|
show:false, |
|
|
|
content:"", |
|
|
|
id:null, |
|
|
|
address:"", |
|
|
|
detail:{}, |
|
|
|
|
|
|
|
list:[], |
|
|
@ -298,13 +305,30 @@ |
|
|
|
if(options.userId){ |
|
|
|
uni.setStorageSync('userId',options.userId) |
|
|
|
} |
|
|
|
this.getLocation() |
|
|
|
this.onHouseDetail() |
|
|
|
this.onCommentPageList() |
|
|
|
}, |
|
|
|
onShareTimeline(){ |
|
|
|
let share = { |
|
|
|
title:this.detail.title, |
|
|
|
path:"/pages_subpack/detail/index?id="+this.id+"&userId="+uni.getStorageSync('userInfo').id, |
|
|
|
imageUrl:this.list[0].url, |
|
|
|
success:(res) => { |
|
|
|
console.info(res) |
|
|
|
}, |
|
|
|
fail:(err)=>{ |
|
|
|
console.info(err) |
|
|
|
} |
|
|
|
} |
|
|
|
console.info(share) |
|
|
|
return share |
|
|
|
}, |
|
|
|
onShareAppMessage() { |
|
|
|
let share = { |
|
|
|
title:"首页分享", |
|
|
|
title:this.detail.title, |
|
|
|
path:"/pages_subpack/detail/index?id="+this.id+"&userId="+uni.getStorageSync('userInfo').id, |
|
|
|
imageUrl:this.list[0].url, |
|
|
|
success:(res) => { |
|
|
|
console.info(res) |
|
|
|
}, |
|
|
@ -316,6 +340,47 @@ |
|
|
|
return share |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
openMap() { |
|
|
|
var that = this; |
|
|
|
uni.openLocation({ |
|
|
|
longitude: parseFloat(that.detail.longitude), |
|
|
|
latitude: parseFloat(that.detail.latitude), |
|
|
|
scale: 18, |
|
|
|
name: that.detail.title, |
|
|
|
address: that.detail.address, |
|
|
|
success: function () { |
|
|
|
console.log('success'); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getLocation(){ |
|
|
|
const that = this; |
|
|
|
wx.getLocation({ |
|
|
|
type: 'wgs84', |
|
|
|
success: function (res) { |
|
|
|
console.log('当前位置的经度:' + res.longitude); |
|
|
|
console.log('当前位置的纬度:' + res.latitude); |
|
|
|
const qqmapsdk = new QQMapWX({ |
|
|
|
key: 'TT7BZ-Z3LW4-KOAUB-KWHOA-SBJJ6-Y5B6R' // 必填 |
|
|
|
}); |
|
|
|
|
|
|
|
qqmapsdk.reverseGeocoder({ |
|
|
|
location: { |
|
|
|
latitude: res.latitude, |
|
|
|
longitude: res.longitude |
|
|
|
}, |
|
|
|
success: function(response) { |
|
|
|
that.address = response.result.address |
|
|
|
console.log('逆地理编码结果:', response); |
|
|
|
|
|
|
|
}, |
|
|
|
fail: function(error) { |
|
|
|
console.error('逆地理编码失败:', error); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
previewImage(urls, current) { |
|
|
|
uni.previewImage({ |
|
|
|
urls: urls, // 需要预览的图片 HTTP 链接列表 |
|
|
@ -394,13 +459,29 @@ |
|
|
|
houseDetail({houseId:that.id}).then(response=>{ |
|
|
|
let items = response.result |
|
|
|
console.info('response',response.result) |
|
|
|
if(items.homeMp4){ |
|
|
|
that.list.push({ |
|
|
|
url: items.homeMp4, |
|
|
|
type: 'video' |
|
|
|
}) |
|
|
|
} |
|
|
|
if(items.image){ |
|
|
|
console.info('items.image.split()',items.image.split(',')) |
|
|
|
items.image.split(',').forEach(items=>{ |
|
|
|
items.image.split(',').forEach(item=>{ |
|
|
|
that.list.push({ |
|
|
|
url: items |
|
|
|
url: item, |
|
|
|
type: 'image' |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
if(items.homeImage){ |
|
|
|
items.homeImages=[] |
|
|
|
items.homeImage.split(',').forEach(item=>{ |
|
|
|
items.homeImages.push(item) |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
items.homeImages=[] |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -415,7 +496,7 @@ |
|
|
|
|
|
|
|
<style> |
|
|
|
.default-btn{ |
|
|
|
background-color: #fff; |
|
|
|
background-color: transparent; |
|
|
|
} |
|
|
|
.default-btn::after{ |
|
|
|
content: ""; |
|
|
|