<template>
	<view class="shopping-cart">
		<view class="shopping-cart-item">
			<view class="shopping-cart-item-head">
				<view class="select"><checkbox class="checkbox" value="cb" checked="true" /></view>
				<view class="factory-name">省心一号工厂</view>
			</view>
			<view class="shopping-cart-info">
				<view class="product-item">
									<view class="select"><checkbox class="checkbox" value="cb" checked="true" /></view>

					<view class="product-image">
						<image class="image" src="https://img.alicdn.com/imgextra/i1/392147177/O1CN01Bh2NP022t7Dv5zazW_!!392147177.jpg"
						 mode="scaleToFill"></image>
					</view>
					<view class="product-info">
						<view class="row row-1">
							<text class="title"><text class="sxzg-icon">省心直供</text>白金打开链接分厘卡圣诞节防空雷达数据</text>
						</view>
						<view class="row">
							<view class="spec">白色</view>
						</view>
						<view class="row row-2">
							<text class="org-price">￥2.9</text>
						</view>
						<view class="row">
							<text class="sxj-icon">省心价</text>
							<text class="price">￥1.99</text>
						</view>
					</view>
					<view class="counter">
						<view class="sub">－</view>
						<input class="num" type="text" value="0" />
						<view class="plus">＋</view>
					</view>
				</view>
				<view class="product-item">
									<view class="select"><checkbox class="checkbox" value="cb" checked="true" /></view>

					<view class="product-image">
						<image class="image" src="https://img.alicdn.com/imgextra/i1/392147177/O1CN01Bh2NP022t7Dv5zazW_!!392147177.jpg"
						 mode="scaleToFill"></image>
					</view>
					<view class="product-info">
						<view class="row row-1">
							<text class="title"><text class="sxzg-icon">省心直供</text>白金打开链接分厘卡圣诞节防空雷达数据</text>
						</view>
						<view class="row">
							<view class="spec">白色</view>
						</view>
						<view class="row row-2">
							<text class="org-price">￥2.9</text>
						</view>
						<view class="row">
							<text class="sxj-icon">省心价</text>
							<text class="price">￥1.99</text>
						</view>
					</view>
					<view class="counter">
						<view class="sub">－</view>
						<input class="num" type="text" value="0" />
						<view class="plus">＋</view>
					</view>
				</view>
				<view class="product-item">
									<view class="select"><checkbox class="checkbox" value="cb" checked="true" /></view>

					<view class="product-image">
						<image class="image" src="https://img.alicdn.com/imgextra/i1/392147177/O1CN01Bh2NP022t7Dv5zazW_!!392147177.jpg"
						 mode="scaleToFill"></image>
					</view>
					<view class="product-info">
						<view class="row row-1">
							<text class="title"><text class="sxzg-icon">省心直供</text>白金打开链接分厘卡圣诞节防空雷达数据</text>
						</view>
						<view class="row">
							<view class="spec">白色</view>
						</view>
						<view class="row row-2">
							<text class="org-price">￥2.9</text>
						</view>
						<view class="row">
							<text class="sxj-icon">省心价</text>
							<text class="price">￥1.99</text>
						</view>
					</view>
					<view class="counter">
						<view class="sub">－</view>
						<input class="num" type="text" value="0" />
						<view class="plus">＋</view>
					</view>
				</view>
			</view>
		</view>

		<view class="shopping-cart-item">
			<view class="shopping-cart-item-head">
				<view class="checkbox"></view>
				<view class="factory-name">省心一号工厂</view>
			</view>
			<view class="shopping-cart-info">
				<view class="product-item">
									<view class="select"><checkbox class="checkbox" value="cb" checked="true" /></view>

					<view class="product-image">
						<image class="image" src="https://img.alicdn.com/imgextra/i1/392147177/O1CN01Bh2NP022t7Dv5zazW_!!392147177.jpg"
						 mode="scaleToFill"></image>
					</view>
					<view class="product-info">
						<view class="row row-1">
							<text class="title"><text class="sxzg-icon">省心直供</text>白金打开链接分厘卡圣诞节防空雷达数据</text>
						</view>
						<view class="row">
							<view class="spec">白色</view>
						</view>
						<view class="row row-2">
							<text class="org-price">￥2.9</text>
						</view>
						<view class="row">
							<text class="sxj-icon">省心价</text>
							<text class="price">￥1.99</text>
						</view>
					</view>
					<view class="counter">
						<view class="sub">－</view>
						<input class="num" type="text" value="0" />
						<view class="plus">＋</view>
					</view>
				</view>
				<view class="product-item">
									<view class="select"><checkbox class="checkbox" value="cb" checked="true" /></view>

					<view class="product-image">
						<image class="image" src="https://img.alicdn.com/imgextra/i1/392147177/O1CN01Bh2NP022t7Dv5zazW_!!392147177.jpg"
						 mode="scaleToFill"></image>
					</view>
					<view class="product-info">
						<view class="row row-1">
							<text class="title"><text class="sxzg-icon">省心直供</text>白金打开链接分厘卡圣诞节防空雷达数据</text>
						</view>
						<view class="row">
							<view class="spec">白色</view>
						</view>
						<view class="row row-2">
							<text class="org-price">￥2.9</text>
						</view>
						<view class="row">
							<text class="sxj-icon">省心价</text>
							<text class="price">￥1.99</text>
						</view>
					</view>
					<view class="counter">
						<view class="sub">－</view>
						<input class="num" type="text" value="0" />
						<view class="plus">＋</view>
					</view>
				</view>
				<view class="product-item">
									<view class="select"><checkbox class="checkbox" value="cb" checked="true" /></view>

					<view class="product-image">
						<image class="image" src="https://img.alicdn.com/imgextra/i1/392147177/O1CN01Bh2NP022t7Dv5zazW_!!392147177.jpg"
						 mode="scaleToFill"></image>
					</view>
					<view class="product-info">
						<view class="row row-1">
							<text class="title"><text class="sxzg-icon">省心直供</text>白金打开链接分厘卡圣诞节防空雷达数据</text>
						</view>
						<view class="row">
							<view class="spec">白色</view>
						</view>
						<view class="row row-2">
							<text class="org-price">￥2.9</text>
						</view>
						<view class="row">
							<text class="sxj-icon">省心价</text>
							<text class="price">￥1.99</text>
						</view>
					</view>
					<view class="counter">
						<view class="sub">－</view>
						<input class="num" type="text" value="0" />
						<view class="plus">＋</view>
					</view>
				</view>
			</view>
		</view>

		<view class="shopping-cart-item">
			<view class="shopping-cart-item-head">
				<view class="checkbox"></view>
				<view class="factory-name">省心一号工厂</view>
			</view>
			<view class="shopping-cart-info">
				<view class="product-item">
									<view class="select"><checkbox class="checkbox" value="cb" checked="true" /></view>

					<view class="product-image">
						<image class="image" src="https://img.alicdn.com/imgextra/i1/392147177/O1CN01Bh2NP022t7Dv5zazW_!!392147177.jpg"
						 mode="scaleToFill"></image>
					</view>
					<view class="product-info">
						<view class="row row-1">
							<text class="title"><text class="sxzg-icon">省心直供</text>白金打开链接分厘卡圣诞节防空雷达数据</text>
						</view>
						<view class="row">
							<view class="spec">白色</view>
						</view>
						<view class="row row-2">
							<text class="org-price">￥2.9</text>
						</view>
						<view class="row">
							<text class="sxj-icon">省心价</text>
							<text class="price">￥1.99</text>
						</view>
					</view>
					<view class="counter">
						<view class="sub">－</view>
						<input class="num" type="text" value="0" />
						<view class="plus">＋</view>
					</view>
				</view>
				<view class="product-item">
									<view class="select"><checkbox class="checkbox" value="cb" checked="true" /></view>

					<view class="product-image">
						<image class="image" src="https://img.alicdn.com/imgextra/i1/392147177/O1CN01Bh2NP022t7Dv5zazW_!!392147177.jpg"
						 mode="scaleToFill"></image>
					</view>
					<view class="product-info">
						<view class="row row-1">
							<text class="title"><text class="sxzg-icon">省心直供</text>白金打开链接分厘卡圣诞节防空雷达数据</text>
						</view>
						<view class="row">
							<view class="spec">白色</view>
						</view>
						<view class="row row-2">
							<text class="org-price">￥2.9</text>
						</view>
						<view class="row">
							<text class="sxj-icon">省心价</text>
							<text class="price">￥1.99</text>
						</view>
					</view>
					<view class="counter">
						<view class="sub">－</view>
						<input class="num" type="text" value="0" />
						<view class="plus">＋</view>
					</view>
				</view>
				<view class="product-item">
									<view class="select"><checkbox class="checkbox" value="cb" checked="true" /></view>

					<view class="product-image">
						<image class="image" src="https://img.alicdn.com/imgextra/i1/392147177/O1CN01Bh2NP022t7Dv5zazW_!!392147177.jpg"
						 mode="scaleToFill"></image>
					</view>
					<view class="product-info">
						<view class="row row-1">
							<text class="title"><text class="sxzg-icon">省心直供</text>白金打开链接分厘卡圣诞节防空雷达数据</text>
						</view>
						<view class="row">
							<view class="spec">白色</view>
						</view>
						<view class="row row-2">
							<text class="org-price">￥2.9</text>
						</view>
						<view class="row">
							<text class="sxj-icon">省心价</text>
							<text class="price">￥1.99</text>
						</view>
					</view>
					<view class="counter">
						<view class="sub">－</view>
						<input class="num" type="text" value="0" />
						<view class="plus">＋</view>
					</view>
				</view>
			</view>
		</view>

		<view class="footer">
			<view class="select-all">
				<label>
					<checkbox color="#ff5d5b" class="checkbox" value="cb" checked="true" />全选
				</label>
			</view>
			<view class="total">合计 <text>￥26.26</text></view>
			<view class="settlement"><button class="settlement-btn" type="default">结算</button></view>
		</view>
	</view>

</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.shopping-cart {
		padding-bottom: 80upx;
		overflow: hidden;
		position: relative;
	}

	.shopping-cart-item {
		padding: 20upx;
		background: white;
		// padding-left: 100upx;
		margin: 20upx;
		border-radius: 20upx;

		.shopping-cart-item-head {
			margin-bottom: 20upx;
			font-size: 28upx;
			font-weight: bold;
			position: relative;
			display: flex;
		

		}
		.select{			
			align-self: center;
			position: relative;
			margin-top: -4upx;
			margin-right: 20upx;
		}
		.checkbox {
			transform: scale(0.7);
			/deep/ .uni-checkbox-input{
				border: 2upx solid #CCCCCC;
				&.uni-checkbox-input-checked{
					color: $primary-color!important;
				}
			}

			/deep/ .uni-checkbox-input:hover{
				border: 2upx solid #CCCCCC;
			}
		}

		.product-item {
			display: flex;
			position: relative;
			margin-bottom: 20upx;

			.checkbox::before {
				top: 70upx;
			}


			.product-image {
				margin-right: 20upx;

				.image {
					width: 180upx;
					height: 180upx;
					margin-top: 5upx;
				}
			}

			.title {
				font-size: 24rpx;
				display: inline-block;
				white-space: normal;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 2;
				overflow: hidden;
				height: 80upx;

			}

			.spec {
				font-size: 22upx;
				background: #CCCCCC;
				color: white;
				padding: 0 5upx;
				border-radius: 10upx;

				// display: inline-block;

			}

			.counter {
				position: absolute;
				bottom: 10upx;
				right: 10upx;
				display: flex;

				border: 2upx solid #CCCCCC;
				font-size: 28upx;
				align-items: center;
				border-radius: 10upx;

				.sub,
				.plus {
					// transform: scale(0.5);
					font-weight: 0;
					width: 42upx;
					text-align: center;

					&:active {
						background: rgba(0, 0, 0, .1);
					}
				}

				.num {
					text-align: center;
					font-size: 24upx;
					border-left: 2upx solid #EEEEEE;
					border-right: 2upx solid #EEEEEE;
					width: 50upx;
				}
			}
		}

	}

	.sxzg-icon {
		color: $primary-color;
		font-size: 16rpx;
		width: 80rpx;
		text-align: center;
		line-height: normal;
		border: 2rpx solid $primary-color;
		border-radius: 20rpx;
		display: inline-block;
		position: relative;
		top: -4rpx;
		margin-right: 10upx;
		// transform: scale(0.9);
	}

	.sxj-icon {
		background: $primary-color;
		color: white;
		font-size: 20upx;
		padding: 0 5upx;
		border-radius: 5upx;
		vertical-align: middle;
	}

	.row {
		display: flex;
		align-items: center;
	}

	.org-price {
		text-decoration: line-through;
		font-size: 26rpx;
		color: #cccccc;
	}

	.price {
		font-size: 26rpx;
		color: $primary-color;
		font-weight: bold;
	}

	.footer {
		display: flex;
		position: fixed;
		height: 100upx;
		background: $primary-color;
		bottom: 0;
		width: 100%;
		box-shadow: 0 0 10upx #999999;
		align-items: center;
		/* #ifdef H5 */
		bottom: 100upx;
		/* #endif */
		color: white;

		.select-all {
			width: 200upx;
			flex: 0 0 200upx;
			position: relative;
			margin-left: 20upx;

			.checkbox {
				transform: scale(0.7);
				position: relative;
				top:-4upx
			}
			/deep/ .uni-checkbox-input{
				border: none;
			}
			/deep/ .uni-checkbox-input:hover{
				border: none;
			}
		}

		.total {
			flex-grow: 1;
			text-align: right;
		}

		.settlement {
			flex-grow: 0;
			text-align: right;
			margin: 0 20upx;
		}

		.settlement-btn {
			background: #ffa82e;
			padding: 15upx 60upx;
			color: white;
			line-height: normal;
			font-size: 32upx;
			border-radius: 50upx;
		}
	}
</style>
