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.

195 lines
4.2 KiB

2 years ago
<template>
<view class="content">
<view class='contop'>
<view class='title'>{{info.name?info.name:''}}</view>
2 years ago
<view class='time'><span>时间{{info.release_time?cancelTime(info.release_time):''}}</span><span>来源{{info.source?info.source:''}}</span></view>
2 years ago
<view class='head'>
<img :src="info.head_upload.url" alt="">
<view class='head_unit'>
2 years ago
<view v-if="organizer_list.length>0">
<view>主办单位</view>
<view>
<view v-for="o in organizer_list">
{{o}}
</view>
</view>
</view>
2 years ago
<view v-if="guidance_unit_list.length>0">
<view>指导单位</view>
<view>
<view v-for="g in guidance_unit_list">
{{g}}
</view>
</view>
</view>
<view v-if="sponsor_list.length>0">
<view>承办单位</view>
<view>
<view v-for="s in sponsor_list">
{{s}}
</view>
</view>
</view>
<view v-if="bear_unit_list.length>0">
<view>协办单位</view>
<view>
<view v-for="b in bear_unit_list">
{{b}}
</view>
</view>
</view>
2 years ago
<view v-if='info.dateRange'>
<view>展出时间</view>
<view>
<view>
{{info.dateRange}}
</view>
</view>
</view>
2 years ago
</view>
</view>
</view>
<view class='bg40'></view>
<view class='detail'>
2 years ago
<u-parse v-if='showContent' :content="info.content?info.content:' '"/>
2 years ago
</view>
<tabbar :current-page="3"></tabbar>
</view>
</template>
<script>
import uParse from '@/components/gaoyia-parse/parse.vue'
import tabbar from "../../components/tabbar/tabbar.vue"
export default {
components: {
uParse,
tabbar
},
data() {
return {
info: {},
2 years ago
id: '',
showContent:false,
organizer_list:[],
2 years ago
guidance_unit_list: [],
sponsor_list: [],
bear_unit_list: []
}
},
onLoad(options) {
this.id = options.id ? options.id : ''
this.loadDetail()
},
2 years ago
methods: {
cancelTime(val){
return val.substring(0,10)
},
2 years ago
loadDetail() {
var that = this;
this.util.request({
api: '/api/mobile/exhibit-hall/show',
data: {
id: that.id
},
2 years ago
utilSuccess: function(res) {
res.dateRange = that.util.splitTime(res.start_time,res.over_time)
that.info = res
const host = that.util.HOST
that.info.content = that.util.replaceImgUrl(that.info.content,'../storage/files',`${host}/storage/files`)
that.organizer_list = res.organizer?res.organizer.split('、'):[]
that.guidance_unit_list = res.guidance_unit?res.guidance_unit.split('、'):[]
that.sponsor_list = res.sponsor?res.sponsor.split('、'):[]
that.bear_unit_list = res.bear_unit?res.bear_unit.split('、'):[],
that.showContent = true
2 years ago
},
utilFail: function(res) {
}
})
}
}
}
</script>
<style>
@import url("/components/gaoyia-parse/parse.css");
.content {
2 years ago
background-color: #fbf3ea;
/* padding-bottom:180rpx */
2 years ago
}
.contop{
padding:0 30rpx;
2 years ago
padding-bottom: 30rpx;
border-radius: 0 0 30rpx 30rpx;
background: #fff;
2 years ago
}
.title {
text-align: center;
2 years ago
padding: 30rpx 0rpx;
2 years ago
font-size: 36rpx;
font-weight:bold;
2 years ago
}
.time {
text-align: center;
color: #6e6e6e;
font-size: 28rpx;
padding-bottom: 30rpx;
border-bottom: 1px solid #fafaf9;
}
.time span {
margin: 0 10rpx;
}
.head {
margin:30rpx 0;
2 years ago
margin-bottom:0;
2 years ago
}
.head img {
width: 100%
}
.head_unit{
background-color: #fcf8f3;
border:8rpx solid #f8ebdb;
border-radius: 20rpx;
padding:35rpx;
2 years ago
margin:30rpx 0;
margin-bottom:0;
2 years ago
font-size: 28rpx;
2 years ago
}
.head_unit>view{
display: flex;
}
.head_unit>view>view:first-child{
2 years ago
width:28%;
2 years ago
}
.head_unit>view>view:last-child{
2 years ago
width:72%;
2 years ago
}
.head_unit>view>view:last-child view{
margin-bottom: 20rpx;
}
.bg40{
width:100%;
height:40rpx;
background-color: #fbf3ea;
}
.detail {
2 years ago
padding:0 60rpx;
2 years ago
background: #fff;
padding-top: 30rpx;
border-radius: 30rpx 30rpx 0 0;
padding-bottom:180rpx;
2 years ago
font-size: 28rpx;
2 years ago
}
.detail img {
2 years ago
width: 100%;
margin:10rpx 0;
2 years ago
}
.wxParse{
line-height: 2.3;
2 years ago
}
</style>