<template>
    <view class="com-list">
    	<view v-for="(item, index) in 3" :key="index"
    		@click="$wskj.authTo('/pages/home/goodsdetails?goodsId=' + item.id)" class="good-item" :style="{'margin-right': (index+1) % 2 === 0? '0' : '30rpx'}">
    		<image class="good-img" src="@/static/logo.png"></image>
    		<view class="bottom">
    			<text>商品标题</text>
				<!-- 价格 销量 -->
				<view class="sales-box">
					<text class="fw-600 fs-40" style="color: #FE2C24;">￥{{ 100 }}</text>
					<text class="fs-24" style="color: #999;">销量：2</text>
				</view>
			</view>
    	</view>
    </view>
</template>

<script>
export default {
	props: ['goodsDataList'],
    data() {
        return {
			
        };
    }
};
</script>

<style scoped>
	.com-list {
		display: flex;
		flex-wrap: wrap;
	}
	
	.good-item {
		width: 47.8%;
		display: flex;
		flex-direction: column;
		margin-bottom: 24rpx;
		position: relative;
		border-bottom-left-radius: 16rpx;
		border-bottom-right-radius: 16rpx;
	}
	.good-img {
		width: 100%;
		height: 330rpx;
		border-top-left-radius: 16rpx;
		border-top-right-radius: 16rpx;
	}
	.bottom {
		padding: 20rpx;
		display: flex;
		flex-direction: column;
		background-color: #FFF;
	}
	.sales-box {
		margin-top: 20rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
</style>
