xxdetail.vue 1.96 KB
<template>
	<view class="page">
		<pyh-nv ref="nv" :config="nvConfig"></pyh-nv>
		<view class="listBox" :style="{'padding-top':(pageTop+'px')}">
		<view class="content" style="padding: 20rpx;background-color: #fff;">
			<view class="title">
				<span style="margin-right: 10rpx;">标题:</span>
				<span>{{info.title}}</span>
			</view>
			<view class="main">
				<image v-if="info.coverImage != null" :src="Baseapi + info.coverImage" style="width: 100%;" mode="widthFix"></image>
				<view class="main_footer">
					<view class="left">
						<span class="f1">发布人: {{info.publisherName}}</span>
					</view>
					<view class="right">
						<span class="f1">发布时间: {{info.publishTime}}</span>
					</view>
				</view>
			</view>
			<view class="content" v-html="info.content">
				
			</view>
		</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				Baseapi:"http://zhmz.rsxmzj.cn:8536",
				nvConfig:{
					title:"殡葬普法宣传",
					bgColor:"#ffffff",
					color:"#000000",
					fixedAssist:{
						hide:true,
					},
				},
				list:[],
				info:{}
			};
		},
		onPageScroll(e) {this.$refs.nv.pageScroll(e)},
		computed:{
			pageTop(){return parseInt(88*uni.getSystemInfoSync().windowWidth/750) + uni.getSystemInfoSync().statusBarHeight}
		},
		onLoad(item) {
			console.log("res",item);

			this.gain(item.info)
			// this.info = JSON.parse(item.info)
			// this.nvConfig.title = this.info.title + "详情页"
		},
		methods: {
			gain(e) {
				this.API.getfbgldata(e).then(res => {
					console.log(res);
					this.info = res.data
					// this.info = JSON.parse(item.info)
					this.nvConfig.title = this.info.title + "详情页"
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	@import 'xxdetail.scss';
	.title{
		padding: 20rpx;
	}
	.main{
		padding: 20rpx;
		.main_footer{
			display: flex;
			justify-content: space-between;
			margin-top: 10rpx;
			.f1{
				color: #c2c2c2;
			}
		}
	}
	.content{
		padding: 20rpx;
	}
</style>