<template>
	<view class="content">
		<view class="box">
			<view class="hflex acenter jbetween box_top">
				<view class="title">反馈内容</view>
				<view class="text_style1">{{detail.create_time}}</view>
			</view>
			<view class="text">{{detail.content}}</view>
			<view class="hflex acenter">
				<block v-for="(item,index) in detail.image" :key="index">
					<image mode="aspectFill" :src="item" class="img"></image>
				</block>
			</view>
		</view>
		<view class="box" v-if="detail.reply">
			<view class="hflex acenter jbetween box_top">
				<view class="title">回复</view>
				<view class="text_style1">{{detail.reply_time}}</view>
			</view>
			<view class="text">{{detail.repaly}}</view>
		</view>
	</view>
</template>

<script>
	import $api from '@/static/js/api.js'
	var that = ''
	export default {
		data() {
			return {
				id: '',
				detail: {}
			}
		},
		onLoad(options) {
			that = this
			if(options.id) {
				that.id = options.id
				that.getData(options.id)
			}
		},
		methods: {
			getData(id) {
				var pages = getCurrentPages()
				var prePage = pages[pages.length - 2]
				var list = prePage.$vm.pageList
				for(var i=0;i<list.length;i++) {
					if(list[i].id == id) {
						that.detail = list[i]
						that.detail.image = list[i].image.split(',')
					}
				}
			},
		},
	}
</script>

<style lang="scss" scoped>
	.content {
		background: #F5F5F5;
		padding: 0 30rpx;
		.box {
			margin-top: 20rpx;
			width: 100%;
			background: #FFFFFF;
			border-radius: 20rpx;
			box-sizing: border-box;
			padding: 24rpx 20rpx;
			.box_top {
				width: 100%;
				padding-bottom: 14rpx;
				border-bottom: 1rpx solid #F5F5F5;
				.title {
					font-size: 30rpx;
					font-weight: 500;
					color: #222222;
				}
				.text_style1 {
					font-size: 26rpx;
					font-weight: 400;
					color: #666666;
				}
			}
			.text {
				font-size: 26rpx;
				font-weight: 400;
				color: #222222;
				line-height: 36rpx;
				margin: 24rpx 0 20rpx;
			}
			.img {
				width: 208rpx;
				height: 208rpx;
				border-radius: 20rpx;
				margin: 0 14rpx 20rpx 0;
			}
		}
	}
</style>