<template>
	<view class="box" style="height: 100vh-88rpx;">
		<view class="time">{{content.suggestionTime}}</view>
		<view class="box1">
			<view style="width: 224rpx;"></view>
			<view style="display: flex;align-items: center;margin-bottom: 100rpx;">
				<view class="content">{{content.suggestionContent}}</view>
				<view class="box2pic">
					<image src="@/static/mine/kehu.png" style="width: 90rpx;height: 91rpx;">
				</view>
			</view>
		</view>
		<!-- 回答方 -->
		<view class="time">{{content.replyTime}}</view>
		<view class="box2" v-if="content.suggestionReply">
			<view class="box2pic">
				<image src="@/static/mine/kefu.png" style="width: 90rpx;height: 91rpx;">
			</view>
			<view>
				<view class="kefu">人工客服</view>
				<view class="content">{{content.suggestionReply}}</view>
			</view>
		</view>
		<view class="bottom" v-if="content.suggestionReply">本次反馈已结束，若有疑问，可再次反馈</view>
		<view class="bottom" v-else>请耐心等待回复结果</view>
	</view>
</template>

<script>
	import {
		getSuggestion
	} from '@/api/indexpage/question/index.js'
	export default {
		onLoad(options) {
			this.optionsId = options.id
		},
		data() {
			return {
				optionsId: '',
				content: {}
			};
		},
		mounted() {
			this.getList()
		},
		methods: {
			getList() {
				getSuggestion(this.optionsId).then(res => {
					this.content = res.data
					console.log(res);
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		overflow: hidden;
		padding: 20rpx;
		background: #F5F6FA !important;
		box-sizing: border-box !important;
	}

	// 时间
	.time {
		margin: 0 auto;
		text-align: center;
		width: 241rpx;
		// height: 36rpx;
		background: #D3D3D3;
		border-radius: 18rpx;
		// padding: 8rpx 25rpx;
		font-family: Noto Sans S Chinese;
		font-weight: 400;
		font-size: 20rpx;
		color: #FFFFFF;
		line-height: 40rpx;
		margin-bottom: 30rpx;
	}

	.box1 {
		display: flex;
		justify-content: space-between;

		.box2pic {
			width: 90rpx;
			height: 90rpx;
			margin-left: 15rpx;

			img {
				width: 100%;
				height: 100%;
			}
		}

		.content {
			// flex: 0.7;
			background: #4F8CDA;
			border-radius: 20rpx 20rpx 0rpx 20rpx;
			font-family: Noto Sans S Chinese;
			font-weight: 400;
			font-size: 28rpx;
			color: #FFFFFF;
			line-height: 40rpx;
			padding: 15rpx 30rpx;
		}
	}

	.box2 {
		display: flex;

		.box2pic {
			width: 90rpx;
			height: 90rpx;
			margin-right: 15rpx;

			img {
				width: 100%;
				height: 100%;
			}
		}

		.kefu {
			font-family: Noto Sans S Chinese;
			font-weight: 400;
			font-size: 26rpx;
			color: #999999;
			line-height: 40rpx;
			margin-bottom: 10rpx;
		}

		.content {
			// flex: 0.7;
			border-radius: 0rpx 20rpx 20rpx 20rpx;
			font-family: Noto Sans S Chinese;
			font-weight: 400;
			font-size: 28rpx;
			color: #333333;
			line-height: 40rpx;
			padding: 15rpx 30rpx;
			background-color: #fff;
			// width: 400rpx;
		}
	}

	.info1 {
		background: #4F8CDA;
		border-radius: 20rpx 20rpx 0rpx 20rpx;
		font-family: Noto Sans S Chinese;
		font-weight: 400;
		font-size: 28rpx;
		color: #FFFFFF;
		line-height: 40rpx;
		padding: 22rpx 57rpx;
		float: right;
	}

	.bottom {
		margin: 0 auto;
		text-align: center;
		width: 400rpx;
		// height: 36rpx;
		background: #D3D3D3;
		border-radius: 18rpx;
		// padding: 8rpx 25rpx;
		font-family: Noto Sans S Chinese;
		font-weight: 400;
		font-size: 20rpx;
		color: #FFFFFF;
		line-height: 40rpx;
		margin-top: 200rpx;
	}
</style>