hotvenue.vue
2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<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>