<template>
	<!-- 20221223 -->
	<view class="feedback-detail-page">
		<!-- 页面内容 -->
		<view class="page-content">

			<!-- 类型和状态 -->
			<view class="padding-lr-30 line-height-90 bg-ff flex align-center justify-between">
				<view>
					问题类型：{{detail.category_name}}
				</view>
				<view>
					{{detail.status_text}}
				</view>
			</view>

			<view class="margin-top-15 padding-30 bg-ff">
				<!-- 我的反馈 -->
				<view>
					<view class="flex align-center">
						<view class="margin-right-50" v-if="detail.linkman">
							{{detail.linkman}}
						</view>
						<view class="">
							{{detail.mobile_phone}}
						</view>
					</view>

					<view class="margin-top-10">
						<view class="text-24 text-b3">{{detail.create_time}}</view>
					</view>

					<view class="margin-top-20">
						<view class="text-26 text-4d line-30">{{detail.content}}</view>
					</view>
					
					<view class="margin-top-20">
						<ty-image-images :list="detail.image_path" width="165" height="165" space="10" column="4"></ty-image-images>
					</view>
				</view>
				
				<!-- 后台回复 -->
				<view v-if="detail.is_reply == 1">
					<view class="margin-top-20 padding-20 bg-f5">
						<view class="text-28">后台回复</view>
						
						<view class="margin-top-20" v-for="(item,index) in replyList" :key="index">
							<view class="text-24 text-b3">{{item.show_create_time}}</view>
							<view class="margin-top-20 text-26 text-4d line-30">{{item.content}}</view>
							<view class="margin-top-20">
								<ty-image-images :list="item.img_url" width="155" height="155" space="9" column="4"></ty-image-images>
							</view>
						</view>
					</view>
				</view>
			</view>

			
		</view>
		
		<!-- 页面浮层 -->
		<view class="page-layer">

		</view>
	</view>

</template>

<script>
	import feedback from "./api/feedback.js"
	export default {
		data() {
			return {
				// 意见反馈ID
				feedbackId: 0,
				// 详情
				detail: {
					image_path:[]
				},
				// 回复列表
				replyList: [],
				showPage:false
			}
		},

		onLoad(options) {
			this.feedbackId = options.id
		},

		onReady() {
			this.getFeedback()
		},

		methods: {
			/**
			 * 加载详情
			 * @date 2022-12-23
			 */
			getFeedback() {
				feedback.getFeedback(this.feedbackId).then(res => {
					if (res.code == 0) {
						// 数据
						this.detail = res.data.feedback
						// 回复
						this.replyList = res.data.reply_list
						this.showPage = true;
					}
				})
			}
		}
	}
</script>

<style>

</style>
