<template>
	<view class="box">
		<view class="bgtop">
			<image src="../../static/img/nav_top.png" style="width: 100%;height: 100%;"></image>
		</view>
		<view class="bgcenter" :style="{height:height+'px'}">
			<view class="box-content">
				反馈时间：{{info.created_at||""}}
			</view>
			<view class="box-content" style="margin-top: 10px;">
				反馈内容：<rich-text :nodes="info.content"></rich-text>
			</view>
			<view class="box-content" style="margin-top: 40px;">
				回复时间：{{info.reply_time||""}}
			</view>
			<view class="box-content" style="margin-top: 10px;">
				回复内容：<rich-text :nodes="info.reply"></rich-text>
			</view>
		</view>
		<view class="bgbottom">
			<image src="../../static/img/nav_bottom.png" style="width: 100%;height: 100%;"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				height: 0,
				info: {}
			}
		},
		onLoad(options) {
			let that = this;
			uni.getSystemInfo({
				success: function(res) {
					that.height = res.windowHeight - 60;
				}
			});
			that.loadInfo(options.id);
		},
		methods: {
			loadInfo(id) {
				var that = this;
				this.util.request({
					api: "/api/mobile/other/tip-show",
					data: {
						id: id
					},
					utilSuccess: function(res) {
						res.content = res.content.replace(/\<img/g,
							"<img style='width:100%;height:auto;display:block'")
						that.info = res;
					},
					utilFail: function(res) {
						uni.showToast({
							icon: "none",
							title: res,
							duration: 2000
						})
					}
				})
			}
		}
	}
</script>

<style>
	.box {
		padding: 20rpx;
		box-sizing: border-box;
	}

	.bgtop {
		height: 40rpx;
	}

	.bgcenter {
		background: url("../../static/img/nav_middle.png") repeat-y;
		background-size: 100% 100%;
		padding: 15rpx 20rpx;
	}

	.time {
		padding: 20rpx 0;
	}

	.newbox {
		padding: 15rpx 20rpx;
		color: #351C1B;

		box-sizing: border-box;
	}

	.title {}

	.time {
		font-size: 24rpx;
	}

	.bgbottom {
		height: 40rpx;
	}
</style>
