You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
142 lines
3.1 KiB
142 lines
3.1 KiB
<template>
|
|
<view>
|
|
<view class="info" v-if="detailInfo.description" v-html="detailInfo.description">
|
|
<!-- <text class="more" @click="checkBasicInformation('#jbxx')" v-if="detailInfo.introduction.length > 100">更多详情</text> -->
|
|
</view>
|
|
<!-- <view class="button-group">
|
|
<view :class="['button-group-item', item.title == activeIndex ? 'button-group-item-active' : '']"
|
|
v-for="item in baseinfoList" :key="item.title" @click="handleGroup(item)">
|
|
<image :src="item.title == activeIndex ? $getImg(item.activeIcon) : $getImg(item.icon)"></image>
|
|
{{ item.title }}
|
|
</view>
|
|
</view> -->
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
detailInfo: {
|
|
type: Object,
|
|
default: () => {}
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
baseinfoList: [],
|
|
activeIndex: '',
|
|
};
|
|
},
|
|
filters: {
|
|
richTextFormat(value) {
|
|
if (value && value.length > 100) {
|
|
return value.slice(0, 100) + '...';
|
|
}
|
|
return value;
|
|
}
|
|
},
|
|
mounted() {
|
|
if(this.detailInfo.bookDes!=''){
|
|
this.baseinfoList.push({
|
|
title: '预定说明',
|
|
icon: 'ouhai_xcx/hotel/ydsm.png',
|
|
activeIcon: 'ouhai_xcx/hotel/ydsmactive.png',
|
|
anchor: '#yysj'
|
|
})
|
|
}
|
|
if(this.detailInfo.userDes!=''){
|
|
this.baseinfoList.push({
|
|
title: '使用说明',
|
|
icon: 'ouhai_xcx/hotel/sysm.png',
|
|
activeIcon: 'ouhai_xcx/hotel/sysmactive.png',
|
|
anchor: '#tsjg'
|
|
})
|
|
}
|
|
if(this.detailInfo.returnDes!=''){
|
|
this.baseinfoList.push({
|
|
title: '退改说明',
|
|
icon: 'ouhai_xcx/hotel/tgsm.png',
|
|
activeIcon: 'ouhai_xcx/hotel/tgsmactive.png',
|
|
anchor: '#ylsj'
|
|
})
|
|
}
|
|
if(this.detailInfo.addServe!=''){
|
|
this.baseinfoList.push({
|
|
title: '增值服务',
|
|
icon: 'ouhai_xcx/hotel/zzfw.png',
|
|
activeIcon: 'ouhai_xcx/hotel/zzfwactive.png',
|
|
anchor: '#fwzx'
|
|
})
|
|
}
|
|
},
|
|
methods: {
|
|
checkBasicInformation(type) {
|
|
this.$emit('goMoreDetail', type)
|
|
},
|
|
handleGroup(item) {
|
|
this.activeIndex = item.title;
|
|
this.$emit('goMoreDetail', item.anchor)
|
|
},
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.info {
|
|
font-weight: 400;
|
|
color: #333333;
|
|
text-indent: 50rpx;
|
|
line-height: 48rpx;
|
|
font-size: 24rpx;
|
|
margin-top: 37rpx;
|
|
|
|
.more {
|
|
font-family: Adobe Heiti Std;
|
|
font-weight: normal;
|
|
color: #04bb6d;
|
|
background: url('https://niangao.oss-cn-hangzhou.aliyuncs.com/ouhai_xcx/scenic/icon-%E6%9B%B4%E5%A4%9A-%E7%BB%BF.png') no-repeat;
|
|
background-position: right;
|
|
padding-right: 20rpx;
|
|
background-size: 12rpx;
|
|
margin-left: 30rpx;
|
|
}
|
|
}
|
|
|
|
.button-group {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: space-between;
|
|
margin-top: 39rpx;
|
|
|
|
&-item {
|
|
width: 222rpx;
|
|
height: 56rpx;
|
|
border: 1rpx solid #dcdcdc;
|
|
border-radius: 28rpx;
|
|
margin-top: 16rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 26rpx;
|
|
font-family: PingFang;
|
|
font-weight: 500;
|
|
color: #333333;
|
|
|
|
&-active {
|
|
color: #ffffff;
|
|
background: #04bb6d;
|
|
}
|
|
}
|
|
|
|
image {
|
|
width: 28rpx;
|
|
height: 28rpx;
|
|
margin-right: 12rpx;
|
|
}
|
|
|
|
&:after {
|
|
content: '';
|
|
width: 32%;
|
|
}
|
|
}
|
|
</style>
|
|
|