<template name="sharealert">
	<view class="alert spec" :class="specClass">
		<view class="model-warp">
			<view class="content">
				<view class="content-title"></view>
				<view class="text-content">
					<view class="title">分享订单</view>
					<view class="share">您的分享码：<text class="txt">{{shareCode}}</text></view>
					<view class="text">
						<text>有效期为24小时。订单分享后若对方无法直接登录小程序查看订单，请提供该分享码给对方，通过输入分享码查看</text>
					</view>
				</view>				
				<view class="alert-btn">

				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { queryOrderShareCode } from "@/api/order.js" 
	export default{
		name:'sharealert',
		props:{
			orderID:{
				type:Number
			}
		},
		data() {
			return{
				shareCode:'',
			}
		},
		created() {
			
		},
		methods:{
			hideConfirm(){
				this.$parent.isShareModal = false
			},
			btnConfirm(code){//点击事件
				this.$emit('btnConfirm')
			}
		}
	}
</script>

<style lang="scss">
	/*弹窗*/
	 .model-warp.none{
		 display: none;
	 }
	 .model-warp.show{
		 display: block;
	 }
	 .model-warp{
		width: 100%;
		height: 100%;
		background: rgba(0,0,0,0.3);
		position: fixed;
		top: 0;
		left: 0;
		z-index: 10000;
		transition: all 0.4s;
		&.none{
			display: none;			
		}
		&.show{
			display: block;
		}
		.content{
			width: 540rpx;
			min-height: 310rpx;
			box-sizing: border-box;
			position: absolute;
			left: 50%;
			top: 50%;
			transform: translate(-50%,-50%);
			border-radius: 14rpx;
			.content-title{
				width: 100%;
				height: 232rpx;
				background: url(https://admin-b.caimei365.com/userfiles/1/images/photo/2020/08/alert%402x.png) no-repeat;
				background-size: contain;
			}
			.text-content{
				width: 448rpx;
				height: auto;
				padding: 20rpx 35rpx;
				float: left;
				.title{
					line-height: 40rpx;
					font-size: $font-size-28;
					color: $text-color;
					text-align: center;
					font-weight: bold;
					margin-bottom: 36rpx;
				}
				.share{
					line-height: 36rpx;
					font-size: $font-size-26;
					color: $text-color;
					text-align: justify;
					margin-top: 22rpx;
					font-weight: normal;
					.txt{
						margin-left: 10rpx;
						color: #FF2A2A;
					}
				}
				.text{
					line-height: 36rpx;
					font-size: $font-size-26;
					color: $text-color;
					text-align: justify;
					margin-top: 22rpx;
				}
			}
			.alert-btn{
				width: 80%;
				height: 70rpx;
				display: flex;
				margin: 0 auto;
			}
		}	
	}
</style>
