<template>
	<view class="my-product">
		<view class="header">
			<view class="title">
				我的商品
			</view>
			<view style="position: relative;">
				<view class="sub-title">全部商品</view>
				<view class="release">
					<navigator url="/pages/product/product-edit">发布商品</navigator>
				</view>
			</view>
		</view>

		<view class="product-list">
			<view class="product-item">
				<view class="product-image">
					<image class="image" :src="image" mode="scaleToFill"></image>
				</view>
				<view>
					<view class="row row-1">
						<text class="title"><text class="sxzg-icon">省心直供</text>{{title}}</text>
					</view>
					<view class="row row-2">
						<text class="org-price">￥{{orgPrice}}</text>
					</view>
					<view class="row row-3">
						<text class="sxj-icon">省心价</text>
						<text class="price">￥{{price}}</text>
					</view>
					<view class="row row-4">
						<text>发布日期：</text>
						<text class="time">2021-02-25 13:12:41</text>
					</view>
				</view>

			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: "商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称",
				orgPrice: "102.20",
				price: "100.20"
			}
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.my-product {
		overflow: hidden;
	}

	.header {
		margin: 20upx;
		background: white;
		text-align: center;
		border-radius: 20upx;
		padding-bottom: 10upx;

		.title {
			height: 100upx;
			font-size: 32upx;
			line-height: 100upx;
			// font-weight: bold;
		}

		.sub-title {
			font-size: 28upx;
			color: #999999;
		}

		.release {
			position: absolute;
			right: 20upx;
			font-size: 24upx;
			bottom: 4upx;
		}
	}


	.product-list {
		.product-item {
			display: flex;
			background: white;
			margin: 20upx;
			padding: 20upx;

			.product-image {
				width: 180upx;
				height: 180upx;
				margin-right: 20upx;
			}

			.image {
				width: 180upx;
				height: 180upx;
				background: #EEEEEE;
			}
		}

		.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);
		}

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

		.row {
			// padding: 0 10upx;
		}

		.row-2 {
			display: flex;
			justify-content: space-between;
		}

		.org-price {
			font-size: 26rpx;
			color: #cccccc;
		}

		.org-price {
			text-decoration: line-through;
		}

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

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

		.row-4 {
			font-size: 24upx;
			color: #999999;
		}
	}
</style>
