<template>
	<view class="page" :style="vuex_skin">
		<view class="" >
			<!-- 圆通快递 -->
			<view class="express">
				<view class="top ali-c">
					<view class="picture">
						<image class="img" mode="scaleToFill" :src="logo"></image>
					</view>
					<view class="text" style="display: flex;justify-content: center;align-items: center;">
						<view class="text1">
							<text>{{orderDetail.trackingName}}</text>
							<text class="margin-left-50">{{orderDetail.trackingNumber}}</text>
						</view>
					</view>
				</view>
				
				<view class="center margin-right-30 text-gray">
					<text @click="$util.copy(orderDetail.trackingNumber)">复制</text>
				</view>
			</view>

			<!-- 收货地址 -->
			<view class="content bgf">
				<view>
					<view class="flex list">
						<view class="time center">
							<view style="font-size: 28rpx;font-weight: 800;color: #111111;">
							</view>
						</view>
						<view class="info flex1">
							<view class="title address">[收货地址]{{orderDetail.address}}</view>
						</view>
					</view>
					<view class="flex list" :class="{one: index == 0 && wlInfo.State == 3}"
						v-for="(item, index) in wlInfo.Traces" :key="index">
						<view class="time">
							<view class="day">{{item.AcceptTime}}</view>
						</view>
						<view class="info flex1">
							<view class="title">{{index == 0 && wlInfo.State == 3 ? '已签收' : '配送中'}}</view>
							<view class="text">{{item.AcceptStation}}</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import config from "@/assets/http/config.js"
	export default {
		data() {
			return {
				logo:'',
				wlInfo: {},
				//商品订单
				id:'',
				orderDetail:{}
			}
		},
	   async onLoad(options) {
		   this.$dialog.showLoading('查询中')
			this.id=options.id
			await this.fetchDetail()
			this.queryLogistics()
			uni.hideLoading()
		},
		methods: {
			async queryLogistics(){
				let params={
					shipperCode:this.orderDetail.shipperCode,
					logisticCode:this.orderDetail.trackingNumber
				}
				let res=await this.$api.pointgoods.queryLogistics(params)
				this.wlInfo=res.data.data
			},
			async fetchDetail(){
				let params={
					id:this.id
				}
				let res=await this.$api.goodsorder.detail(params)
				this.orderDetail=res.data.data
				this.logo='/static/kd/'+this.orderDetail.shipperCode+'.png'
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page {
		height: 100vh;
		/* #ifdef H5 */
		height: calc(100vh - 44px);
		/* #endif */
		font-size: 24rpx;
		background-color: #F6F7F8;
		overflow-y: auto;
	}

	/*flex 转换成flex容器*/
	.flex {
		display: flex;
		flex-direction: row;
	}

	/*flex1 自动填充*/
	.flex1 {
		flex: 1;
	}

	/*ali-c 竖直居中*/
	.ali-c {
		display: flex;
		flex-direction: row;
		align-items: center;
	}

	.bgf {
		background-color: #fff;
	}

	.express {
		//圆通快递
		background-color: #ffffff;
		border-radius: 20rpx;
		margin: 30rpx 20rpx 30rpx 20rpx;
		display: flex;
		justify-content: space-between;

		.top {
			padding: 28rpx 29rpx 25rpx 29rpx;

			.img {
				display: block;
				width: 60rpx;
				height: 60rpx;
				border-radius: 50%;
			}

			.text {
				margin-left: 20rpx;

				.text1 {
					margin-bottom: 6rpx;
					font-size: 28rpx;
					color: #000000;
				}

				.text2 {
					font-size: 20rpx;
					color: #000000;
				}
			}
		}

		.right {
			background-color: rgba(8, 175, 254, 0.02);
			border-radius: 0rpx 0rpx 20rpx 20rpx;
			padding: 15rpx 30rpx 20rpx 30rpx;

			.text {
				color: #666666;
				font-size: 22rpx;
			}
		}
	}

	//收货地址
	.content {
		margin: 20rpx;
		padding: 56rpx 46rpx 56rpx 5rpx;
		border-radius: 20rpx;

		.list {
			&:first-child {
				.info::before {
					bottom: -20rpx;
					margin-top: 40rpx;
					border-left: 1px dashed #e5e5e5;
				}

				.title {
					margin-bottom: 56rpx;

					&::before {
						width: 46rpx;
						height: 46rpx;
						left: -23rpx;
						background: url('data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAHrklEQVRoQ+Waa2wcVxXH/2e8xN6Z2P0AtIUIGolKkEJVqXl4ZwiS89gZO8Q8RJGKBARIcSmUEl5NaYCkgRRIEAoF1NIHNAQEFAkI7sNz10kt0exd07oSUltaiIBSwqMSlRpnZ22zOwfd9c56d+3dmVlvqircL/HOnPs/53dnzr3n3gnhPGn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nW/ln8PWGzHyv1mbJs9+8aWcofhWq0q/hzIsGVFGnAV0MGO0MTmMfBsYNKdKN15c+xFZrA1itvq/shPMOavxHA6WCRTf0iSiDfMpWi5xKypdNY8a2xsmjaY7URu2l7E+CcNvLgoRxg54TTcv8/49Pb8GTOC8+hgYw58Xn6docyVv2CAEjYFQP1TqaQ4Sp8qF3VoTWfZFmrbDgOg7UJkCkWSsMRt2fMe3tDAwzsB3Aa6P0qbH5BwH3EzDaI8WyPr6GzlpxAiuY6S0+SJ1Yhv43Jw18PCkzx+Pot7LtKEingmpH53/BmtRgxup16AAAAABJRU5ErkJggg==') no-repeat center;
						background-size: 46rpx 46rpx;
					}
				}
			}

			&:last-child {
				.info::before {
					height: 32rpx;
				}
			}

			&.one {
				.info::before {
					margin-top: 20rpx;
				}

				.title {
					color: #111111;

					&::before {
						width: 46rpx;
						height: 46rpx;
						left: -23rpx;
						background: url('data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAFCklEQVRoQ92az28bRRTHv28cBbxuIgoCClRUICREixD9AfGaVEpJslZa5dCWgNQeUNU7CojChR9F5QIcyF9QLi2VKEokKAre9IdFacZpSYoQAeUCFNGChKAowWtI431oN9nEduzszuIktX3Zg9+vz+x7M29mllAnP6omx1S8o01AtBNRE7Pd7D6BZscHAZPMPEUk3KcN+0xT5nS6Wv7/F8hfrbvWNtozT7PN7SA8Q8CdKoEx8DsYH5OgM9Oi4extX352XUW/UDYUCPf0RHJXJ3vB3AtgfVjnJXq/gKgvel9zH508mVe1qQyS05P7GHYvQE+oOgsmz5cIoi8qUx8Gk5+VCgzCLV3NOWF/APAeFQfhZak/aosDNDI4GcRGIJDck8YDiOBTBjYFMVotGQLGkUd39KL5o59NX5DsU53byKYMgIifsWX6P8+C47ELQ18tZX9JkKl4xyMREt8tU4BKZvNsb2zKnP6+klJFkOz25D00w9eUvC2zMDfQvbHzqV/LuSkLwm1ta3LTjWkwti5zbGrmCaPRxuk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eMxtLHQbNFXwcHdN7o1MWRqbsu1Msh9kK91Pi1QsEKW/sXPR5MXVy9eTB1cRk635bUw/V04aJV8x8MFMLUxScchUA1/1FNpf6oZj9zCtfwLY/Wf/HouMfV4hN8AAAAAElFTkSuQmCC') no-repeat center;
						background-size: 46rpx 46rpx;
					}
				}

				.text {
					color: #555555;
				}

				.time {
					color: #333;

					.day {
						font-size: 26rpx;
					}
				}
			}
		}

		.time {
			width: 200rpx;
			padding-right: 30rpx;
			font-size: 20rpx;
			text-align: right;
			color: #999;

			.day {
				margin-bottom: 4rpx;
			}
		}

		.info {
			position: relative;
			padding-top: 12rpx;
			color: #999;

			&::before {
				content: "";
				position: absolute;
				left: 0;
				top: 0;
				bottom: 0;
				z-index: 1;
				width: 0;
				border-left: 1px solid #e5e5e5;
			}

			.title {
				position: relative;
				margin-bottom: 10rpx;
				padding-left: 32rpx;
				font-size: 28rpx;

				&::before {
					content: "";
					position: absolute;
					left: -3px;
					top: 0;
					bottom: 0;
					z-index: 1;
					width: 7px;
					height: 7px;
					margin: auto 0;
					border-radius: 50%;
					background-color: #cecece;
				}

				&.address {
					font-size: 24rpx;
					color: #333;
				}
			}

			.text {
				padding: 0 0 44rpx 32rpx;
			}
		}
	}
</style>
