hotvenue.vue 2.3 KB
<template>
	<view class="venue">
		<view class="title">热门场馆</view>
		<view class="content_list">
			<u-scroll-list indicatorWidth="0">
				<view class="list_item" v-for="(item, index) in list" :key="index" @click="goArenaDetail">
					<image class="cover" :src="item.thumb"></image>
					<text class="name">{{ item.title }}</text>
					<view class="tip">
						<CommonIconNav icon-name="map" :title-content="item.address" />
						<text class="price">¥{{ item.price }}人</text>
					</view>
				</view>
			</u-scroll-list>
		</view>
	</view>
</template>

<script>
	import bg1 from '@/static/images/home/bg-1.png'
	import CommonIconNav from '@/components/commonIconNav.vue'
	export default {
		components: { CommonIconNav },
		data(){
			return {
				list: [
					{ thumb: bg1, title: '彩虹体育馆', address: '青秀区', price: 23 },	
					{ thumb: bg1, title: '飞人网球场', address: '兴宁区', price: 23 },	
					{ thumb: bg1, title: 'L2T体育馆', address: '西乡塘', price: 23 },
					{ thumb: bg1, title: '广西体育馆', address: '五象新区', price: 24 },	
				]
			}
		},
		methods: {
			goArenaDetail(){
				uni.navigateTo({
					url: '/pages/arenaDetail/arenaDetail'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.venue{
		margin-top: 28rpx;
		.title{
			position: relative;
			padding-left: 18rpx;
			color: #333333;
			font-size: 32rpx;
			line-height: 36rpx;
			margin-bottom: 24rpx;
			&::before{
				position: absolute;
				left: 0;
				top: 50%;
				transform: translateY(-50%);
				content: '';
				width: 8rpx;
				height: 26rpx;
				background-color: $uni-color-primary;
			}
		}
		
		.content_list{
			padding: 24rpx;
			padding-bottom: 0;
			height: 284rpx;
			background: #FFFFFF;
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			box-sizing: border-box;
			.list_item{
				display: flex;
				flex-direction: column;
				margin-right: 20rpx;
				&:last-child{
					margin-right: 0;
				}
				.cover{
					width: 220rpx;
					height: 156rpx;
					border-radius: 12rpx;
					margin-bottom: 16rpx;
				}
				.name{
					color: #333333;
					font-weight: 500;
					line-height: 34rpx;
					font-size: 24rpx;
					margin-bottom: 6rpx;
				}
				.tip{
					display: flex;
					align-items: center;
					color: #666;
					font-size: 20rpx;
					.price{
						margin-left: 16rpx;
					}
				}
			}
		}
	}
</style>