Feat: 寻趣味改版(新增古镇模块)
This commit is contained in:
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<view class="service">
|
||||
<view class="map-cont">
|
||||
<map
|
||||
:longitude="info.longitude"
|
||||
:latitude="info.latitude"
|
||||
:markers="[{id:1, latitude: info.latitude,longitude: info.longitude,width: 20, height: 25, iconPath: webUrl + '/page/qianxian/icon-location.png'}]"
|
||||
style="width: 100%;height: 100%; border-radius: 20rpx;"
|
||||
/>
|
||||
</view>
|
||||
<view class="v12-px-3 v12-font-32 v12-font-bold">{{ info.name || '' }}</view>
|
||||
<view class="info-wrap">
|
||||
<view>
|
||||
<view class="v12-font-28 v12-mb-1 v12-dark1-text">{{ info.openTime || '' }}</view>
|
||||
<view class="v12-font-28 v12-mb-1 v12-dark1-text">{{ info.address || '' }}</view>
|
||||
<view class="v12-font-28 v12-mb-1 v12-dark1-text">{{ info.announcement || '' }}</view>
|
||||
</view>
|
||||
<view class="action-wrap">
|
||||
<view @click="showLocation">
|
||||
<view>
|
||||
<image :src="webUrl + '/page/qianxian/icon-addr.png'" class="img" />
|
||||
</view>
|
||||
<view class="text-center">导航</view>
|
||||
</view>
|
||||
<view @click="call">
|
||||
<view>
|
||||
<image :src="webUrl + '/page/qianxian/icon-phone.png'" class="img" />
|
||||
</view>
|
||||
<view class="text-center">咨询</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding: 0 20rpx;"><u-divider></u-divider></view>
|
||||
<view class="intro-wrap">
|
||||
<view class="v12-dark-text v12-font-bold">
|
||||
简介
|
||||
</view>
|
||||
<view class="intro-text">
|
||||
{{ info.desc || '' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
info: {
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showLocation() {
|
||||
|
||||
if (!this.info.latitude || !this.info.longitude) {
|
||||
this.$dialog.error('暂无位置信息')
|
||||
} else {
|
||||
uni.openLocation({
|
||||
latitude: this.info.latitude,
|
||||
longitude: this.info.longitude
|
||||
})
|
||||
}
|
||||
},
|
||||
call() {
|
||||
if (this.info.tel) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: this.info.tel
|
||||
})
|
||||
} else {
|
||||
this.$dialog.error('电话为空')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.service {
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
.intro-text{
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.intro-wrap{
|
||||
padding: 0 20rpx 20rpx;
|
||||
}
|
||||
.action-wrap{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.text-center{
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
.info-wrap{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 20rpx 0;
|
||||
}
|
||||
.service{
|
||||
position: relative;
|
||||
}
|
||||
.map-cont {
|
||||
height: 400rpx;
|
||||
border-radius: 20rpx;
|
||||
background: #fff;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
.img{
|
||||
display: block;
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
margin: 0 0 16rpx 16rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user