<template>
	<view class="body">
		<view class="details_title">
			<view class="shipped" v-if="details_index==0">
				<view class="shipped_left">
					<image src="../../static/img/order_shipped.png" mode=""></image>
				</view>
				<view>
					<text class="shipped_right_text">Ready for shipment</text>
					<view>The buyer has paid,Waiting for the merchant to deliver</view>
				</view>
			</view>
			
			<view class="cancelled" v-if="details_index==1">
				<view class="cancelled_left">
					<image src="../../static/img/close2.png" mode=""></image>
					<view class="cancelled_left_info">
						<text class="shipped_right_text">Deal’s off</text>
						<view>The transaction has been closed, looking forward to your re-selection</view>
					</view>
				</view>
				
			</view>
			
			<view class="cancelled completed" v-if="details_index==2">
				<view class="cancelled_left">
					<image src="../../static/img/completed.png" mode=""></image>
					<view class="cancelled_left_info">
						<text class="shipped_right_text">Signed for</text>
						<view>2022-04-27  21:15:55</view>
					</view>
				</view>
				<view class="cancelled_right">
					<image src="../../static/img/right2.png" mode=""></image>
				</view>
			</view>
			
			<view class="cancelled toPaid" v-if="details_index==3">
				<view class="cancelled_left">
					<view >
						<text class="shipped_right_text">Waiting for payment</text>
						<view>The timeout order will be closed automatically</view>
					</view>
				</view>
				<view class="cancelled_right">
					<text class="shipped_right_text">23:59:58</text>
					<view>T-minus payment</view>
				</view>
			</view>
			<navigator url="/pages/order/logisticsDetails" class="cancelled transit" v-if="details_index==4">
				<view class="cancelled_left">
					<image src="../../static/img/transit.png" mode=""></image>
					<view class="cancelled_left_info">
						<view class="shipped_right_text">【New York】Has arrived statesHas arrived states</view>
						<view>2022-04-27  21:15:55</view>
					</view>
				</view>
				<view class="cancelled_right">
					<image src="../../static/img/right2.png" mode=""></image>
				</view>
			</navigator>
			
		</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">
					<text>B Oakdale Mall</text>
					<view >Johnson City NEW YORKUnitedStates13790-1294</view>
				</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_popup_commodity">
			<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">
							<text>US$314.00</text>
							<button v-if="details_index!=3 && details_index!=1">RREFUND</button>
						</view>
					</view>
				</view>
			</view>
			
		</view>
		
		<view class="summary">
			<view class="summary_title">Order summary</view>
			<view class="summary_item">
				<view>
					Subtotal
					<text :class="details_index==4?'summary_item_text1':'summary_item_text'">（Tax included）</text>
				</view>
				<view class="summary_item_right">US$12.5</view>
			</view>
			<view class="summary_item">
				<view>Shipping</view>
				<view class="summary_item_right">US$12.5</view>
			</view>
			<view class="summary_item">
				<view>Coupon</view>
				<view class="summary_item_right1">-US$12.5</view>
			</view>
			<view class="summary_item">
				<view>Order total</view>
				<view>US$12.5</view>
			</view>
			<view class="summary_tips" v-if="details_index==3">
				<image src="../../static/img/gantan1.png" mode=""></image>
				<text>Reward 10 points</text>
			</view>
		</view>
		
		<view class="summary">
			<view class="summary_title">Order information</view>
			<view class="summary_item">
				<view>Order id</view>
				<view class="summary_item_right">
					<text>2013461121212</text>
					<button>copy</button>
				</view>
			</view>
			<view class="summary_item">
				<view>Shipping</view>
				<view class="summary_item_right">standard shipping</view>
			</view>
			<view class="summary_item">
				<view>Coupon</view>
				<view class="summary_item_right">21/04/2022 15:42:31</view>
			</view>
			<view class="summary_item" v-if="details_index!=3">
				<view>Payment time</view>
				<view class="summary_item_right">21/04/2022 15:42:31</view>
			</view>
			<template v-if="details_index==2">
				<view class="summary_item">
					<view>Delivery time</view>
					<view class="summary_item_right">21/04/2022 15:42:31</view>
				</view>
				<view class="summary_item">
					<view>Completion time</view>
					<view class="summary_item_right">21/04/2022 15:42:31</view>
				</view>
			</template>
			
		</view>
		
		<view class="details_footer" v-if="details_index!=0">
			<button class="white" v-if="details_index==2 || details_index==4">LOGISTICS</button>
			<button class="white" v-if="details_index==1 || details_index==2">DELETE ORDER</button>
			<button class="black" v-if="details_index==2">COMMENT</button>
			
			<button class="white" v-if="details_index==3 ">CANCEL ORDER</button>
			<button class="black" v-if="details_index==3">PAY NOW</button>
			
			<button class="black" v-if="details_index==4">CONFIRM RECEIPT</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 0、代发货 1、已取消 2、已完成 3、待支付 4、运输中
				details_index:4
			}
		},
		methods:{
			
		},
		onLoad(e){
			console.info(e)
			this.details_index=e.details_index
		}
	}
</script>

<style lang="scss" scoped>
	@import "@/common/scss/order.scss";
	page{
		
	}
	.body{
		padding-bottom: 130rpx;
	}
	
</style>