<template>
	<view>
		<view class="address">
			<view class="address_left">
				<view class="address_title">
					<image src="../../static/img/address.png" mode=""></image>
					<view class="address_title_name">Nathanael</view>
					<text>5838590290</text>
				</view>
				<view class="address_content">
					B Oakdale Mall
					Johnson City NEW YORKUnitedStates13790-1294
				</view>
			</view>
			<image src="../../static/img/right.png" class="address_more"></image>
			<image src="../../static/img/address_xian.png" class="address_xian" mode=""></image>
		</view>
		
		<view class="order_info" @click="openMore(0)">
			<view class="info_title">
				<text>Items in cart</text>
				<view class="info_title_right">
					<text>4 ltems</text>
					<image src="../../static/img/right.png" mode="" class="address_more"></image>
				</view>
			</view>
			<view class="info_image">
				<view class="info_image_item" v-for="(item,index) in 4 " :key="index"></view>
			</view>
		</view>
		
		<view class="method">
			<view class="method_title">Shipping Method</view>
			<view class="method_item" v-for="(item,index) in 2 " :key="index">
				<image src="../../static/img/select2.png" mode=""></image>
				<view class="method_item_right">
					<view class="item_price">
						<text>STANDARD SHIPPING:</text>
						<text class="item_price_span">US$59</text>
					</view>
					<view class="item_time">
						<text class="item_time_span">estimated to be deliverd on </text>
						<text> 15/05/2022-04/05/2022</text>
					</view>
				</view>
			</view>
		</view>
		
		<view class="discount">
			<view class="discount_item" @click="openMore(1)">
				<text>Coupons</text>
				<view class="discount_item_right">
					<text>-US$12.5</text>
					<image src="../../static/img/right.png" mode="" class="address_more"></image>
				</view>
			</view>
			<view class="discount_item" @click="openMore(3)">
				<view class="discount_item_left">
					<text>Points</text>
					<text class="discount_item_left_span">(2.5)</text>
				</view>
				<view class="discount_item_right">
					<text>-US$2.5</text>
					<image src="../../static/img/right.png" mode="" class="address_more"></image>
				</view>
			</view>
		</view>
		
		<view class="settlement">
			<view class="settlement_item">
				<text>Subtotal:</text>
				<text class="settlement_item_right">US$12.5</text>
			</view>
			<view class="settlement_item">
				<text>Shipping fee:</text>
				<text class="settlement_item_right">US$1.5</text>
			</view>
			<view class="settlement_item">
				<text>Discount :</text>
				<text class="settlement_item_right1">-US$2.5</text>
			</view>
		</view>
		
		<view class="total">
			<text>Total: US$314.00</text>
			<button @click="openMore(2)">PLACE ORDER</button>
		</view>
		
		<view class="mask" v-show="isShow" @click="isShow=false"></view>
		<view class="order_popup" v-show="isShow">
			<view class="order_popup_title">
				<text>
					{{popup_index==0?'Commodity information':popup_index==1?'Coupons':popup_index==2?'Payment Method':'Points'}}<text v-show="popup_index==3">(total:<text class="order_popup_title_span" >2.5</text>)</text>
				</text>
				<image src="../../static/img/close1.png" mode="" @click="isShow=false"></image>
			</view>
			
			<view class="order_popup_commodity" v-show="popup_index==0">
				
				<view class="good_info" v-for="(item,index) in 3 " :key="index">
					<view class="good_info_left ">
						<view class="good_info_image" v-for="(item,index) in 1" :key="index"></view>
						<view class="left_info">
							<view class="info_name">Adidas Yeezy Boost 350 V2  DazzlingBlue Black GY7164 Men's</view>
							<view class="left_info_bottom">
								<view class="info_lable">
									<text>Multicolor;41</text>
									<image src="/static/img/bottom.png" mode=""></image>
								</view>
								<text>x1</text>
							</view>
							<view class="info_price">US$314.00</view>
						</view>
					</view>
				</view>
				
			</view>
			
			<view class="order_popup_coupons" v-show="popup_index==1">
				<view class="coupons_item" v-for="(item,index) in 3 " :key="index">
					<view class="coupons_item_left">
						<view class="item_left_prcie">$20.00</view>
						<text class="item_left_span">Min.spend</text>
						<view>$200.00</view>
					</view>
					<view class="coupons_item_right">
						<view class="coupons_right_info">
							<view class="coupons_right_info_title">All-purpose</view>
							<text>The tide zone is available</text>
							<view class="coupons_right_info_time">2022.09.23  10:37 - 2022.12.23  10:37</view>
						</view>
						<button>Use Now</button>
						<image src="../../static/img/select3.png" mode="" class="coupons_item_right_select"></image>
					</view>
				</view>
			</view>
			
			<view class="order_popup_pay" v-show="popup_index==2">
				<view class="pay_item">
					<image src="../../static/img/select1.png" mode="" class="pay_item_select"></image>
					<view class="pay_item_right">
						<image src="../../static/img/pay_pal.png" mode=""></image>
						<text>Pay Pal</text>
					</view>
				</view>
				<view class="pay_item">
					<image src="../../static/img/select2.png" mode="" class="pay_item_select"></image>
					<view class="pay_item_right">
						<image src="../../static/img/card.png" mode=""></image>
						<text>Credit/Debit Card</text>
					</view>
				</view>
				<view class="pay_item">
					<image src="../../static/img/select2.png" mode="" class="pay_item_select"></image>
					<view class="pay_item_right">
						<image src="../../static/img/GPay.png" mode=""></image>
						<text>Google Pay</text>
					</view>
				</view>
				<view class="pay_item">
					<image src="../../static/img/select2.png" mode="" class="pay_item_select"></image>
					<view class="pay_item_right">
						<image src="../../static/img/APay.png" mode=""></image>
						<text>Apple pay</text>
					</view>
				</view>
				<navigator url="/pages/order/paySuccess">
					<button>PAY NOW</button>
				</navigator>
			</view>
			
			<view class="order_popup_points" v-show="popup_index==3">
				<view class="points_item">
					<image src="../../static/img/select2.png" mode=""></image>
					<text>Use points</text>
				</view>
				<view class="points_item">
					<image src="../../static/img/select1.png" mode=""></image>
					<text>Do not use points</text>
				</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isShow:false,
				popup_index:''
			}
		},
		methods:{
			openMore(i){
				this.popup_index=i
				this.isShow=true
			}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		border-top:14.67rpx #F6F5FA solid ;
		padding-bottom: 140rpx;
	}
	.address_more{
		width: 20rpx;
		height: 20rpx;
	}
	.address{
		padding-top: 33.33rpx;
		padding-bottom: 36rpx;
		padding-left: 29.33rpx;
		padding-right: 22.67rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-bottom: 14.67rpx #F6F5FA solid;
		position: relative;
		.address_left{
			
			.address_title{
				display: flex;
				align-items: center;
				color: #666666;
				font-size: 24rpx;
				margin-bottom: 30.67rpx;
				
				image{
					width: 32rpx;
					height: 32rpx;
				}
				.address_title_name{
					font-size: 28rpx;
					color: black;
					font-weight: bold;
					margin-left: 24rpx;
					margin-right: 38.67rpx;
				}
			}
			.address_content{
				padding-left: 56rpx;
				color: #666666;
				font-size: 24rpx;
				font-weight: bold;
			}
		}
			
		.address_xian{
			height: 4rpx;
			width: 100%;
			position: absolute;
			left: 0;
			bottom: 0;
		}
	}
	.order_info{
		padding-left: 26.67rpx;
		padding-right: 22.67rpx;
		padding-top: 50.67rpx;
		padding-bottom: 42.67rpx;
		border-bottom:14.67rpx #F6F5FA solid ;
		.info_title{
			display: flex;
			align-items: center;
			justify-content: space-between;
			font-weight: bold;
			font-size: 26.67rpx;
			
			.info_title_right{
				display: flex;
				align-items: center;
				color: #666666;
				font-size: 24rpx;
				
				image{
					margin-left: 33.33rpx;
				}
			}
		}
		.info_image{
			display: flex;
			margin-top: 26.67rpx;
			.info_image_item{
				width: 133.33rpx;
				height: 133.33rpx;
				margin-right: 12rpx;
				background-color: #999999;
			}
		}
	}
	.method{
		border-bottom:14.67rpx #F6F5FA solid ;
		padding-top: 50rpx;
		
		.method_title{
			font-size: 26.67rpx;
			font-weight: bold;
			padding-left: 25.33rpx;
		}
		.method_item{
			padding:41.33rpx 0 ;
			border-bottom: 1px #E2E2E2 solid;
			padding-left: 42.67rpx;
			padding-right: 29.33rpx;
			display: flex;
			align-items: center;
			
			&:last-child{
				border-bottom: none;
			}
			image{
				width: 29.33rpx;
				height: 29.33rpx;
				margin-right: 30.67rpx;
			}
			.method_item_right{
				.item_price{
					font-size: 28rpx;
					margin-bottom: 14rpx;
					.item_price_span{
						color: #B22234;
					}
				}
				.item_time{
					font-size: 25.33rpx;
					font-weight: 400;
					.item_time_span{
						color: #555555;
					}
				}
			}
		}
	}
	.discount{
		border-bottom:14.67rpx #F6F5FA solid ;
		padding-left: 26rpx;
		padding-right: 22.67rpx;
		padding-top: 42rpx;
		padding-bottom: 45.33rpx;
		
		.discount_item{
			display: flex;
			align-items: center;
			justify-content: space-between;
			font-size: 28rpx;
			margin-bottom: 42rpx;
			&:last-child{
				margin-bottom: 0;
			}
			
			.discount_item_left{
				.discount_item_left_span{
					color: #666666;
				}
			}
			.discount_item_right{
				display: flex;
				align-items: center;
				color: #B22234;
				font-weight: bold;
				
				image{
					margin-left: 14rpx;
				}
			}
		}
	}
	.settlement{
		border-bottom:14.67rpx #F6F5FA solid ;
		padding: 44rpx 26rpx;
		
		.settlement_item{
			display: flex;
			align-items: center;
			justify-content: space-between;
			font-size: 28rpx;
			margin-bottom: 44rpx;
			&:last-child{
				margin-bottom: 0;
			}
			.settlement_item_right{
				color: #3C3B6E;
				font-weight: bold;
			}
			.settlement_item_right1{
				color: #B22234;
				font-weight: bold;
			}
		}
	}
	.total{
		padding: 30.67rpx 0;
		padding-left: 26rpx;
		padding-right: 19.33rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		position: fixed;
		bottom: 0;
		left: 0;
		background-color: white;
		z-index: 99;
		box-sizing: border-box;
		font-size: 36rpx;
		font-weight: 600;
		
		button{
			font-size: 26.67rpx;
			color: white;
			height: 73.33rpx;
			line-height: 73.33rpx;
			border-radius: 0;
			border: none;
			background-color: black;
			margin: 0;
		}
	} 
	.order_popup{
		position: fixed;
		z-index: 999;
		background-color: white;
		width: 100%;
		bottom: 0;
		
		.order_popup_title{
			position: relative;
			font-size: 32rpx;
			font-weight: bold;
			border-bottom: 1px solid #E2E2E2;
			display: flex;
			align-items: center;
			justify-content: center;
			padding-top: 44.67rpx;
			padding-bottom: 30.67rpx;
			
			image{
				width: 21.33rpx;
				height: 21.33rpx;
				position: absolute;
				right: 26rpx;
				top: 50%;
				margin-top: -5.5rpx;
			}
			.order_popup_title_span{
				color: #B22234;
			}
			
		}
		.order_popup_coupons{
			padding:0 26.67rpx;
			padding-top: 28rpx;
			padding-bottom: 106.67rpx;
			
		}
		.order_popup_commodity{
			padding:0 26rpx;
			padding-bottom: 40rpx;
			border-bottom:1px solid #E2E2E2 ;
			
			.good_info{
				padding: 40rpx 0;
				font-size: 22.67rpx;
				color: #666666;
				font-weight: bold;
				border-bottom: 2.67rpx solid #F1F1F1;
				&:last-child{
					border-bottom: none;
				}
				.good_info_left{
					display: flex;
					align-items: center;
					width: 100%;
					.good_info_image{
						width: 200rpx ;
						height: 200rpx;
						background-color: #999999;
						margin-right: 32.67rpx;
					}
					.left_info{
						
						.info_name{
							font-size: 26.67rpx;
							font-weight: 400;
							width: 461.33rpx;
						}
						.left_info_bottom{
							display: flex;
							align-items: center;
							justify-content: space-between;
							font-size: 32rpx;
							color: #909090;
							margin-top: 24rpx;
							.info_lable{
								padding: 5.33rpx 20rpx;
								font-size: 22.67rpx;
								border-radius: 33.33rpx;
								border: 1px solid #D3D3D3;
								image{
									width: 17.33rpx;
									height: 17.33rpx;
									margin-left: 14.67rpx;
								}
							}
						}
						.info_price{
							font-size: 28rpx;
							color: black;
							font-weight: bold;
							margin-top: 43.33rpx;
						}
					}
				}
			}
		}
		.order_popup_pay{
			padding: 0 26.67rpx;
			padding-bottom: 56.67rpx;
			
			.pay_item{
				border-bottom: 1px solid #EEEEEE;
				padding: 13.33rpx 0;
				display: flex;
				align-items: center;
				font-size: 28rpx;
				&:nth-child(4){
					border-bottom: none
				}
				.pay_item_select{
					width: 29.33rpx;
					height: 29.33rpx;
					margin-right: 26rpx;
					
				}
				.pay_item_right{
					display: flex;
					align-items: center;
					
					image{
						width: 74.67rpx;
						height: 74.67rpx;
						margin-right: 28.67rpx;
					}
				}
				
				
			}
			button{
				background: black;
				color: white;
				height: 88rpx;
				line-height: 88rpx;
				font-size: 26.67rpx;
				font-weight: bold;
				margin-top: 33.33rpx;
			}
		}
		.order_popup_points{
			padding-bottom: 63.33rpx;
			padding-left: 47.33rpx;
			padding-top: 34.67rpx;
			font-size: 28rpx;
			
			.points_item{
				display: flex;
				align-items: center;
				margin-bottom: 40rpx;
				&:last-child{
					margin-bottom: 0;
				}
				
				image{
					width: 29.33rpx;
					height: 29.33rpx;
					margin-right: 26rpx;
					
				}
			}
		}
	}
</style>