<template>
	<view>
		<view class="consult">
			<dHeader :title="$lang.lang.index.consult"></dHeader>
		</view>
		<view class="start-bar"></view>
		<view class="consultAdd">
			<view class="consult-item">
				<view class="consult-item-label">
					<image src="../../static/img/consulta-1.png" mode=""></image>
					<text>{{$lang.lang.consult.title}}</text>
				</view>
				<view class="consult-item-put">
					<text>{{params.title}}</text>
				</view>			
			</view>
			<view class="consult-item">
				<view class="consult-item-label">
					<image src="../../static/img/consulta-1.png" mode=""></image>
					<text>{{$lang.lang.consult.type}}</text>
				</view>
				<view class="consult-item-put">
					{{params.type==1?$lang.lang.index.consult:$lang.lang.consult.advice}}
				</view>			
			</view>
			<view class="consult-item">
				<view class="consult-item-label">
					<image src="../../static/img/consulta-3.png" mode=""></image>
					<text>{{$lang.lang.consult.name}}</text>
				</view>
				<view class="consult-item-put">
					{{params.name}}
				</view>
			</view>
			<view class="consult-item">
				<view class="consult-item-label">
					<image src="../../static/img/consulta-4.png" mode=""></image>
					<text>{{$lang.lang.consult.phone}}</text>
				</view>
				<view class="consult-item-put">
					{{params.phone}}
				</view>
			</view>
			<view class="consult-item">
				<view class="consult-item-label">
					<image src="../../static/img/consulta-5.png" mode=""></image>
					<text>{{$lang.lang.consult.orderNo}}</text>
				</view>
				<view class="consult-item-put">
					{{params.orderCode}}
				</view>
			</view>
			<view class="consult-item-2">
				<view class="consult-item-label-2">
					<image src="../../static/img/consulta-6.png" mode=""></image>
					<text>{{$lang.lang.consult.content}}</text>
				</view>
				<view class="consult-item-put-2">
					<text>{{params.content}}</text>
				</view>
			</view>
		</view>
		<view class="footer">
			<!-- <view class="footer_title">状态 ： {{params.status==1?'待回复':'已回复'}}</view> -->
			<view class="apply_content" v-if="params.status">
				<text>{{$lang.lang.complaintAdd.status}} ： {{params.status==1?$lang.lang.consult.reply:$lang.lang.consult.replyed}}</text>
				<text v-if="params.status==2">{{$lang.lang.consult.time}}：{{$request.getLocalTime(params.replyTime)}}</text>
				<text v-if="params.status==2">{{$lang.lang.consult.replyContent}}：{{params.replyContent}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	import dHeader from '../../components/dHeader/index.vue'
	export default {
		components: {
			dHeader
		},
		data() {
			return {
				params: {

				},
			}
		},
		onLoad (op) {
			if(op.id){
				this.getData(op.id)
			}
		},
		methods: {

			getData(id){
				this.$request.get('/app-api/ecw/message-leave/get',{id:id}).then(res => {
					if(res.code==0&&res.data){
						this.params = res.data
					}
				})
			},
		}
	}
</script>

<style>
	@import url("../../static/css/consult_add.css");
</style>
