<template>
	<view>
		<view class="card_box">
			<view class="card_head_box">
				<view class="card_head_item" v-for="(item,index) in 8" :key="index"></view>
			</view>
			<view class="card">
				<!-- 订单头部 -->
				<view class="top">
					<view class="title">
						<view>自提凭证</view>
					</view>
				</view>
				<view class="card_item">
					<view>
						<view class="code">提货码：241578956432</view>
						<tki-qrcode ref="tkiQrcode" show :size="qrcodeSize"></tki-qrcode>
					</view>
					
					<view class="semicircle_icon" >
						<view class="semicircle_left_icon"></view>
						<view class="semicircle_right_icon"></view>
					</view>
				</view>
			
				<view class="total-wrap">
					<view class="info">
						<u-icon name="map" color="#666" size="28"></u-icon>
						<view class="shopName">自取店：{{ listinfo.name }}</view>
						<u-icon name="phone" color="#666" size="28"></u-icon>
						<view class="phone">15303589754</view>
					</view>
					<view class="address">
						<view class="lable">门店地址：</view>
						<view>门店地址门店地址门店地址门店地址门店地址门店地址门店地址门店地址</view>
					</view>
				</view>
			
			</view>
		</view>
		<view class="product">
			<view></view>
			<view class="product_info">
				<view class="name">DIMO联名马克杯</view>
				<view class="numBox"><view class="points">100积分</view><view class="num">X1</view></view>
			</view>
			<!-- <view class="productInfo"></view> -->
		</view>
		<view class="orderInfo">
			<view class="row">
				<text class="t">支付方式：</text>
				<text class="info">{{listinfo.name}}</text>
			</view>
			<view class="row">
				<text class="t">兑换时间：</text>
				<text class="info">{{$u.timeFormat(listinfo.time, 'yyyy-mm-dd hh:MM:ss')}}</text>
			</view>
			<view class="row" @click="copyHandle(listinfo.orderNo)">
				<text class="t">订单编号：</text>
				<text class="info">{{listinfo.orderNo}}（点击复制）</text>
			</view>
		</view>
	</view>

</template>

<script>
	import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
	export default {
	
		data() {
			return {
				qrcodeSize: 200,
				
			}
		},
		props:{
			listinfo:{
				type: Object
			}
		},
		mounted() {
			this.setQrcode();
		},
		methods: {
			
			setQrcode () {
				this.$refs.tkiQrcode.setval('241578956432') //操作属性
			},
			
			/**
			 * 复制订单号
			 * @param {Object} e
			 */
			copyHandle(e) {
				uni.setClipboardData({
					data: e,
					success() {
						uni.showToast({
							title: '复制成功',
							icon: 'none'
						});
					}
				});
			},
			
			
		}
	}
</script>

<style lang="scss">
	.card_box{
		background-color: #fff;
		// box-shadow: 0rpx 8rpx 12rpx 2rpx rgba(87,86,86,0.35);
		position: relative;
		width: 100%;
		height: 100%;
		// box-shadow: 0rpx 4rpx 12rpx 2rpx rgba(87,86,86,0.35);
		border-radius: 18rpx;
		padding-bottom: 32rpx;
		.card_head_box{
			width: 100%;
			display: flex;
			justify-content: space-between;
			position: absolute;
			top: -22.5rpx;
			padding: 0 44rpx;
			.card_head_item{
				width: 45rpx;
				height: 45rpx;
				background-color: #f9f9f9;
				border-radius: 50%;
				// box-shadow: inset 0rpx -13rpx 18rpx -16rpx rgba(87, 86, 86, 0.35);
			}
		
		}
		
		.card {
			// background-color: #fff;
			border-radius: 20upx;
			margin-bottom: 28upx;
			position: relative;
			.top{
				padding: 0 34rpx;
			}
			.title{
				font-weight: 500;
				font-size: 24rpx;
				color: #333333;
				border-bottom: 2rpx dashed #E3E3E3;
				padding-bottom: 36rpx;
				padding-top: 50rpx;
			}
			.card_item{
				display: flex;
				flex-direction: column;
				position: relative;
				padding: 32rpx 34rpx 48rpx 34rpx;
				border-bottom: 2rpx dashed #E3E3E3;
				align-items: center;
				.code{
					font-weight: bold;
					font-size: 28rpx;
					color: #333333;
					margin-bottom: 48rpx;
				}
				::v-deep.vue-ref{
					display: flex;
					justify-content: center;
				}
				
				.semicircle_icon{
					width: 100%;
					position: absolute;
					bottom: -22.5rpx;
					left: 0;
					display: flex;
					justify-content: space-between;
					.semicircle_left_icon{
						width: 45rpx;
						height: 45rpx;
						margin-left: -22.5rpx;
						background-color: #f9f9f9;
						border-radius: 50%;
						// box-shadow: inset -20rpx 0rpx 22rpx -20rpx rgba(87, 86, 86, 0.35);
						
					}
					.semicircle_right_icon{
						width: 45rpx;
						height: 45rpx;
						margin-right: -22.5rpx;
						background-color: #f9f9f9;
						border-radius: 50%;
						// box-shadow: inset 13rpx 0rpx 16rpx -9rpx rgba(87, 86, 86, 0.35);
					
					}
				}
			}
			
				
			.total-wrap {
				width: 100%;
				display: flex;
				flex-direction: column;
				padding: 0 34rpx;
				font-weight: bold;
				font-size: 28rpx;
				color: #333333;
				margin-top: 38rpx;
				.info{
					display: flex;
					align-items: center;
					font-weight: bold;
					font-size: 24rpx;
					color: #333333;
					.shopName{
						margin-right: 48rpx;
						margin-left: 16rpx;
					}
					.phone{
						margin-left: 16rpx;
					}
				}
				.address{
					margin-left: 36rpx;
					align-self: center;
					display: flex;
					font-weight: 400;
					font-size: 24rpx;
					color: #666666;
					margin-top: 24rpx;
					align-self: center;
					.lable{
						flex-shrink: 0;
					}
				}
			}
			
		}
	}
	.product{
		padding: 32rpx 34rpx;
		background-color: #FFFFFF;
		margin-top: 32rpx;
		.product_info{
			display: flex;
			flex-direction: column;
			margin-left: 16rpx;
			.name{
				font-weight: bold;
				font-size: 24rpx;
				color: #333333;
				margin-bottom: 24rpx;
			}
			.numBox{
				display: flex;
				align-items: center;
				justify-content: space-between;
				font-weight: 500;
				font-size: 24rpx;
				.points{
					color: #F7853D;
				}
				.num{
					color: #999999
				}
			}
		}
	}
	.orderInfo{
		background: #FFFFFF;
		border-radius: 18rpx 18rpx 18rpx 18rpx;
		margin-top: 32rpx;
		padding: 32rpx 34rpx;
		// box-shadow: 0rpx 4rpx 12rpx 2rpx rgba(87,86,86,0.35);
		.row {
			display: flex;
			justify-content: space-between;
			margin-bottom: 32rpx;
					
			.t {
				font-weight: bold;
				font-size: 28rpx;
				color: #333333;
			}
					
			.info {
				font-weight: 400;
				font-size: 28rpx;
				color: #666666;
			}
		}
		.row:last-child{
			margin-bottom: none;
		}
		
	}
	
</style>
