<template>
|
<view class="travel-detail">
|
<view v-if="dto.id">
|
<!-- 标题、价格、时间、地点 -->
|
<view class="infos">
|
<view class="name">{{dto.name||dto.title||'暂无标题'}}</view>
|
</view>
|
<view style="background: #F5F5F5;height: 24rpx;">
|
|
</view>
|
<view class="bg-white p10">
|
<image :src="dto.cover" v-if="dto.cover" mode="aspectFit" class="m-t-8"
|
style="display: block;margin: 0 auto;" @click="previewImg(dto.cover)"></image>
|
|
</view>
|
<!-- <uni-swiper-dot class="uni-swiper-dot-box" :mode="'dot'" field="content" v-if="dto.url&&dto.url.length>0">
|
<swiper class="swiper-box" :interval="10000" :circular="true" :current="0" :autoplay="true">
|
<swiper-item v-for="(url, index) in dto.url" :key="index">
|
<view class="swiper-item" :class="'swiper-item' + index">
|
|
<image class="home-banner-image" mode="scaleToFill" @click="previewImg(url)" :src="url">
|
</image>
|
</view>
|
</swiper-item>
|
</swiper>
|
</uni-swiper-dot> -->
|
|
<view style="background: #F5F5F5;height: 24rpx;">
|
|
</view>
|
|
<!-- 活动描述 -->
|
<view class="info-desc">
|
<view class="title">公告描述</view>
|
<view v-html="dto.content||'暂无'" class="rich" style="overflow: scroll;">
|
|
</view>
|
</view>
|
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
dto: {
|
// url: [],
|
},
|
peoples: [],
|
id: ''
|
};
|
},
|
async onLoad(options) {
|
this.id = options.id || ''
|
await this.init()
|
|
},
|
async onPullDownRefresh() {
|
await this.init()
|
uni.stopPullDownRefresh()
|
},
|
methods: {
|
async init() {
|
this.$message.showLoading()
|
const {
|
data
|
} = await this.$http.request('get', '/api/pub/announcement/page/view?id=' + this.id, {
|
|
})
|
|
this.$message.hideLoading()
|
// if (data && data.url) {
|
// data.url = JSON.parse(data.url) || []
|
// }
|
this.dto = {
|
...data
|
}
|
this.dto.content = this.$util.formatRichText(this.dto.content || '')
|
//处理url的问题
|
// console.log('dto',this.dto)
|
|
|
},
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.popup-form {
|
padding-bottom: 68rpx;
|
|
.bottom-img {
|
width: 118rpx;
|
height: 70rpx;
|
display: block;
|
margin: 0 auto;
|
}
|
|
.bottom-info {
|
font-weight: 400;
|
font-size: 28rpx;
|
color: #666666;
|
line-height: 40rpx;
|
text-align: center;
|
}
|
|
.title {
|
font-size: 32rpx;
|
color: #000000;
|
margin-bottom: 32rpx;
|
}
|
|
.people-name {
|
font-weight: 600;
|
font-size: 32rpx;
|
color: #000000;
|
line-height: 102rpx;
|
margin-left: 28rpx;
|
}
|
|
.people-img {
|
width: 102rpx;
|
height: 102rpx;
|
border: 2rpx solid #FFFFFF;
|
}
|
}
|
|
.travel-detail {
|
.info-peoples {
|
padding: 24rpx 30rpx;
|
background: #fff;
|
|
.title {
|
font-size: 32rpx;
|
color: #000000;
|
font-weight: 600;
|
|
}
|
|
.show-more-peoples {
|
font-size: 24rpx;
|
color: #26C3A5;
|
}
|
}
|
|
.info-desc {
|
padding: 24rpx 30rpx;
|
background: #fff;
|
|
.title {
|
margin-bottom: 20rpx;
|
font-weight: 600;
|
font-size: 32rpx;
|
color: #000000;
|
}
|
|
/deep/ img {
|
max-width: 600rpx;
|
|
}
|
}
|
|
.info-cover {
|
width: 750rpx;
|
height: 474rpx;
|
}
|
|
.infos {
|
padding: 24rpx 30rpx;
|
background: #fff;
|
|
.name {
|
font-weight: 600;
|
font-size: 40rpx;
|
color: #000000;
|
}
|
|
|
.price {
|
font-weight: 600;
|
line-height: 72rpx;
|
font-size: 50rpx;
|
color: #000000;
|
|
.dot {
|
font-size: 40rpx;
|
line-height: 56rpx;
|
}
|
}
|
|
.status {
|
width: 132rpx;
|
height: 50rpx;
|
border-radius: 26rpx;
|
border: 2rpx solid #999999;
|
color: #999999;
|
line-height: 50rpx;
|
font-size: 24rpx;
|
|
text-align: center;
|
margin-left: 16rpx;
|
}
|
|
.status.A,
|
.status.J {
|
border: 2rpx solid #04BA97;
|
color: #04BA97;
|
}
|
|
.icon-loc {
|
width: 24rpx;
|
height: 30rpx;
|
background-size: 100% 100%;
|
|
}
|
|
.icon-clock {
|
width: 24rpx;
|
height: 26rpx;
|
background-size: 100% 100%;
|
|
}
|
}
|
}
|
</style>
|