<template>
	<view class="grid">
		<view class="item" style="--color : #5baaff">
			<!-- <image src="/static/image/activity/h.png" mode=""></image> -->
			<uv-icon size="40rpx" color="#5baaff" name="tags"></uv-icon>

			<view class="text">
				{{ item.type }}
			</view>
		</view>

		<view class="item" 
		style="--color : #f56c6c">
			<!-- <image src="/static/image/activity/price.png" mode=""></image> -->
			<uv-icon size="40rpx" color="#f56c6c" name="integral"></uv-icon>

			<view class="text"
			v-if="item.price">
				{{ item.price }}元/人
			</view>
			<view class="text"
			v-else>
				免费
			</view>
		</view>

		<view class="item" style="--color : #5ac725">
			<uv-icon size="40rpx" color="#5ac725" name="account"></uv-icon>
			
			<view class="text"
			v-if="item.sum">
				{{ item.num }}/{{ item.sum }}人
			</view>
			
			<view class="text"
			v-else>
				{{ item.num }}/不限
			</view>
		</view>

		<view class="addUser" @click.stop="addUser">
			<uv-icon size="40rpx" color="#5baaff" name="plus-circle"></uv-icon>
			加入
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			item: {},
		},
		data() {
			return {

			}
		},
		methods: {
			addUser() {
				uni.makePhoneCall({
					phoneNumber: this.item.phone,
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.grid {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 20rpx 0;

		image {
			width: 30rpx;
			height: 30rpx;
		}

		.item {
			display: flex;
			align-items: center;
			font-size: 26rpx;
			color: var(--color);

			.text {
				margin-left: 4rpx;
			}
		}

		.addUser {
			display: flex;
			align-items: center;
			font-size: 26rpx;
			color: $uni-color;
			margin-left: 10rpx;
			background: rgba($uni-color, 0.2);
			padding: 10rpx 20rpx;
			border-radius: 20rpx;

			.text {
				margin-left: 4rpx;
			}
		}
	}
</style>