<template>
	<view class="content">
		<view class="online_box">
			<view class="online_title">{{datas.shopIllegal}}</view>
			<u-line color="#E6E6E6" />
			<view class="online" style="padding-top: 10rpx;">
				<view class="online_tit">违规说明</view>
				<view class="online_test">{{datas.wrongExplain}}</view>
			</view>
			<view class="online">
				<view class="online_tit">关联订单</view>
				<view class="online_text" v-if="datas.shipAddressDetail" >
					<image src="../static/black.png"></image>
					<text>{{datas.shipAddressDetail}}</text>
				</view>
				<view class="online_text" v-if="datas.deilveryAddressDetail">
					<image src="../static/orange.png"></image>
					<text>{{datas.deilveryAddressDetail}}</text>
				</view>
				
				<view class="online_text" v-if="datas.shopAddressDetail">
					<image src="../static/black.png"></image>
					<text>{{datas.shopAddressDetail}}</text>
				</view>
				<view class="online_text" v-if="datas.userAddressDetail">
					<image src="../static/orange.png"></image>
					<text>{{datas.userAddressDetail}}</text>
				</view>
				<view class="online_text" v-if="datas.indentNumber" @click="copyOrder(datas.indentNumber)">
					<image src="../static/orange.png"></image>
					<text>订单号：{{datas.indentNumber}}</text>
				</view>
			</view>
			<!-- <view class="online">
				<view class="online_tit">违规说明</view>
				<view style="font-size: 24rpx;margin-top: 10rpx;">{{datas.resultHanding}}</view>
				<view class="pnline_tip">如果配送中上报异常，审核成功后违规消除，不扣款</view>
			</view> -->
		</view>
		<!-- <view class="btn" v-if="datas.complaintState=='1'" @click="bindonline">在线申诉</view>
		<view class="btn btn1" v-if="datas.complaintState=='2'" >申诉中</view>
		<view class="btn" v-if="datas.complaintState=='3'"@click="bindonline" >申诉未通过</view>
		<view class="btn" v-if="datas.complaintState=='4'" >申诉通过</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
					id: 1,
					img: '../static/black.png',
					name: '西安智能大厦'
				}, {
					id: 2,
					img: '../static/orange.png',
					name: '用户地址隐藏',
				}],
				indentNumber:'',
				datas:{},
				complaintId: ''
			}
		},
		onLoad(options) {
			console.log(options)
			this.indentNumber =options.indentNumber
			this.complaintId = options.complaintId
			// this.bindorder()
		},
		onShow() {
			console.log('`````````````11111111')
			if(this.indentNumber!=''){
				this.bindorder()
			}
			
		},
		methods: {
			copyOrder(value) {
				uni.setClipboardData({
					data: value, //要被复制的内容
					success: () => { //复制成功的回调函数
						uni.showToast({ //提示
							title: '复制成功'
						})
					}
				});
			},
			bindonline() {
				uni.navigateTo({
					url: '/pages/riderMy/myOnline/myOnline?indentNumber='+this.indentNumber+'&complaintType='+this.datas.complaintType+'&complaintId='+this.complaintId
				})
			},
			// 获取数据
			bindorder() {
				this.$Request.getT('/app/shop/findComplaint',
				{
					complaintId: this.complaintId
				}).then(res => {
					if(res.code==0){
						this.datas = res.data
						
					}else{
						console.log('失败：',res.data)
					}
					
				});
			},
		}
	}
</script>

<style>
	body {
		background-color: #F5F5F5;
	}

	.content {
		width: 100%;
	}

	.online_box {
		width: 90%;
		margin: 0 auto;
		background: #FFFFFF;
		border-radius: 20rpx;
		margin-top: 30rpx;
	}

	.online_title {
		font-size: 28rpx;
		font-weight: bold;
		letter-spacing: 2rpx;
		width: 90%;
		margin: 0 auto;
		line-height: 80rpx;
	}

	.online {
		width: 90%;
		margin: 0 auto;
		padding-bottom: 34rpx;
	}

	.online_tit {
		font-size: 27rpx;
		letter-spacing: 2rpx;
		font-weight: bolder;
		line-height: 40rpx;

	}

	.online_test {
		color: #333333;
		font-size: 26rpx;
		letter-spacing: 2rpx;
		line-height: 38rpx;
	}

	.online_text {}

	.online_text image {
		width: 15rpx;
		height: 15rpx;
	}

	.online_text text {
		font-size: 21rpx;
		color: #333333;
		margin-left: 15rpx;
		letter-spacing: 1rpx;
	}

	.pnline_tip {
		color: #999999;
		font-size: 25rpx;
		line-height: 50rpx;
	}

	.btn {
		width: 90%;
		margin: 0 auto;
		background: #FF7F00;
		line-height: 90rpx;
		text-align: center;
		color: white;
		border-radius: 15rpx;
		margin-top: 20rpx;
		font-size: 28rpx;
	}
	.btn1{
		background: #ccc;
	}
</style>
