<!DOCTYPE html>
<html>
	{include file="head.html"}
	<body>
		<div class="header">
			<a href="/module.php?m=s2c_user" class="header-back"></a>
			<div class="header-title">我的订单</div>
		</div>
		<div class="header-row"></div>
		<div class="main-body">
			<div id="app" style="display: none;">
				<div class="tabs-border">
					<div @click="setType('all')" v-bind:class="{'tabs-border-active':type=='all'}" class="tabs-border-item ">全部</div>
					<div @click="setType('unpay')"  v-bind:class="{'tabs-border-active':type=='unpay'}" class="tabs-border-item">待付款</div>
					<div @click="setType('unsend')"  v-bind:class="{'tabs-border-active':type=='unsend'}" class="tabs-border-item">待发货</div>
					<div @click="setType('unreceive')"  v-bind:class="{'tabs-border-active':type=='unreceive'}" class="tabs-border-item">待收货</div>
					<div @click="setType('unraty')"  v-bind:class="{'tabs-border-active':type=='unraty'}" class="tabs-border-item">待评价</div>
				</div>
				<div class="item row-box mgb-10" v-for="(item,index) in pageData.list" :key="index">
					<div class="flex bd-mp-5">
						<div class="flex-1 cl2">订单号：{{item.orderno}}</div>
						<div class="cl-primary">{{item.status_name}}</div>
					</div>
					<div class="flexlist-item" v-for="(pro,proIndex) in item.prolist" :key="proIndex">
						<img class="flexlist-img" :src="pro.imgurl+'.100x100.jpg'">
						<div class="flex-1">
							<div class="flexlist-title">{{pro.title}}</div>
							<div class="flexlist-ks">{{pro.ks_title}}</div>
							<div class="flex ">
								<div class="flex-1 cl-money">￥{{pro.price}}</div>
								<div class="cl3">x {{pro.amount}}</div>
							</div>
							
						</div>
					</div>
					 
					<div class="flex mgb-10">
						 共<div class="cl-num">{{item.total_num}}</div>件商品  
						 合计：<div class="cl-money">￥{{item.money}}</div>元 
						 <div class="flex-1"></div> 
						 
					</div>
					<div v-if="item.status==0" class="flex flex-jc-end">
						<div class="cl3 f12">{{item.timeago}}</div>
						<div class="flex-1"></div>
						<div @click="pay(item.orderid)" v-if="item.ispay==0" class="btn-small btn-outline-danger mgr-10">去支付</div>
						<div class="btn-small  btn-outline-danger" @click="goOrder(item.orderid)">查看详情</div>
					</div>
					<div v-else-if="item.status==1" class="flex flex-jc-end">
						<div class="cl3 f12">{{item.timeago}}</div>
						<div class="flex-1"></div>
						<div class="btn-small  btn-outline-danger" @click="goOrder(item.orderid)">查看详情</div>
					</div>
					<div v-else-if="item.status==2" class="flex flex-jc-end">
						<div class="cl3 f12">{{item.timeago}}</div>
						<div class="flex-1"></div>
						<div class="btn-small  btn-outline-danger" @click="goOrder(item.orderid)">查看详情</div>
					</div>
					<div v-else-if="item.status==3" class="flex flex-jc-end">
						<div class="cl3 f12">{{item.timeago}}</div>
						<div class="flex-1"></div>
						<div class="btn-small  btn-outline-danger" @click="goOrder(item.orderid)">查看详情</div>
					</div>	
				</div>
			</div>
		</div>
		{include file="footer.html"}
		<script>
			var type="{$type}";
		</script>
		<script src="{$skins}s2c_order/my.js"></script>
	</body>
</html>
