<template>
	<view class="box">
		<view class="boxlist">
			<view @click="nextTo(item)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
				<view class="imgbox dffs flex1">
					<image :src="item.user_img" mode=""></image>
					<text class="fontsm ">{{item.nickname}}</text>
				</view>
				<view class="auth dffs">
					<view class="fontssm dffs">还差<text class="red">{{item.cha}}</text> 人成团</view>
					<text class="btn">去拼团</text>
				</view>
			</view>
			<u-empty v-if="list.length<1" text="还没有商品哦" mode="list"></u-empty>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {};
	},
	props: {
		list: {
			type: Array,
			default: []
		},
		flag: {
			type: [String, Number],
			default: 1
		}
	},
	methods: {
		nextTo(item) {
			this.$emit('getPid',item.id)
		}
	}
};
</script>

<style scoped lang="scss">
.boxlist {
	.vidLi {
		width: 100%;
		padding: 30rpx 0;
		background-color: #fff; 
		.imgbox { 
			margin-right:  15rpx; 
			image {
				width: 70rpx;
				height: 70rpx;
				margin-right: 20rpx;
				border-radius: 50%;
			}
		} 
		.auth {  
			.btn {
				width: 120rpx;
				height: 44rpx;
				line-height: 44rpx;
				text-align: center;
				background: #FF4944;
				border-radius: 22rpx;
				color: #fff;
				font-size: 20rpx;
				margin-left: 47rpx;
			}
		}
	}
}
</style>
