<template>
	<view class="center">
		<view class="input-box flex">
			<view class=" input-content flex">
				<view class="iconfont iconsearch"></view>
				<view class="input"><input type="text" disabled placeholder="输入关键字" /></view>
			</view>
		</view>
		<view class="main" v-for="(item, index) in list" :key="index">
			<view class="top flex">
				<view class="userinfo clamp">用户ID：{{ item.userID }}</view>
				<view class="type">{{ item.type == 1 ? '待收货' : item.type == 2 ? '待发货' : item.type == 3 ? '待付款' : '已完成' }}</view>
			</view>
			<view class="mainbox">
				<view class="bg"><image src="" mode=""></image></view>
				<view class="main-info flex">
					<view class="main-left">
						<view class="name clamp">{{ item.name }}</view>
						<view class="order">订单编号：{{ item.orderID }}</view>
						<view class="ordertype">{{ item.store_type == 1 ? '别店订单' : '本店订单' }}</view>
					</view>
					<view class="main-right">
						<view class="price">￥{{ item.price }}</view>
						<view class="num">x{{ item.num }}</view>
					</view>
				</view>
			</view>
			<view class="item-btm">共一件商品 合计：￥{{ item.sum }}</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			list: [
				{
					name: '满园春防脱发保湿滋养护法素',
					price: '24.9',
					num: '1',
					orderID: '55648785545',
					userID: '李丹丹',
					sum: '24.9',
					type: 1,
					store_type: 1
				},
				{
					name: '满园春防脱发保湿滋养护法素',
					price: '24.9',
					num: '1',
					orderID: '55648785545',
					userID: '李丹丹',
					sum: '24.9',
					type: 1,
					store_type: 1
				}
			]
		};
	},
	onLoad() {},
	methods: {}
};
</script>

<style lang="scss">
page {
	height: 100%;
	background: #f6f4f4;
}
.input-box {
	width: 100%;
	padding: 25rpx;
	background-color: #52c696;
	z-index: 999;
	height: 60px;
	.iconsearch {
		padding-left: 30%;
		font-size: 50rpx;
		color: #9f9f9f;
	}
	.input-content {
		border-radius: 99rpx;
		color: #9f9f9f;
		flex-grow: 1;
		padding: 10rpx 30rpx;
		background-color: #ffffff;
		.input {
			flex-grow: 1;
			input {
				font-size: $font-lg;
			}
		}
	}
	.input-button {
		padding-left: 20rpx;
		font-size: $font-lg;
		height: 100%;
	}
}
.main {
	padding: 30rpx 30rpx 60rpx 30rpx;
	width: 700rpx;
	margin: 20rpx auto 0;
	background: #ffffff;
	box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
	border-radius: 10rpx;
	.top {
		align-items: center;
		.userinfo {
			max-width: 70%;
			font-size: 24rpx;
			font-family: PingFang SC;
			font-weight: 400;
			color: #666666;
		}
		.type {
			font-size: 28rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #52c696;
		}
	}
	.mainbox {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		margin-top: 30rpx;
		align-items: flex-start;
		.bg {
			flex-shrink: 0;
			width: 160rpx;
			height: 160rpx;
			background: #4cd964;
			image {
				width: 100%;
				height: 100%;
			}
		}
		.main-info {
			justify-content: space-between;
			align-items: flex-start;
			width: 100%;
			.main-left {
				padding-left: 10rpx;
				.name {
					max-width: 338rpx;
					font-size: 26rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #3f454b;
				}
				.order {
					margin-top: 10rpx;
					font-size: 24rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #666666;
				}
				.ordertype {
					width: 120rpx;
					margin-top: 10rpx;
					background: #ffeae5;
					border-radius: 5rpx;
					font-size: 20rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #ff6f0f;
					text-align: center;
				}
			}
			.main-right {
				text-align: right;
				padding-top: 6rpx;
				.price {
					font-size: 26rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #333333;
				}
				.num {
					font-size: 26rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #666666;
				}
			}
		}
	}
	.item-btm {
		text-align: right;
		font-size: 26rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #333333;
	}
}
</style>
