PitchList.vue
2.0 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
106
<template>
<view class="pitch_list">
<view v-for="item in pitchList" :key="item.groundId" class="pitch_item" @click="goRouter(`/pages_arenaControl/addArena/addArena?groundId=${item.groundId}`)">
<view class="left">
<image class="cover_img" :src="item.groundPhotos"></image>
</view>
<view class="right">
<view class="right_text">
<text class="f-w-500 f-28 l-h-38 col-3d mb-10">{{ item.groundNum }}号包间</text>
<text>{{ item.isOutdoor === 0 ? '室内' : '室外' }}<text class="m-l-20">{{ item.price }}¥/小时</text></text>
</view>
</view>
</view>
</view>
</template>
<script>
import { pro_http } from '@/utils/baseUrl.js'
export default {
name:"pitchCard",
props: {
pitchList: {
type: Array,
require: true
}
},
data() {
return {pro_http}
},
computed: {
formatPhoto(){
return (groundPhotos) => {
let imgList = groundPhotos.split(',')
return imgList[0]
}
}
},
methods: {
goRouter(path){
uni.navigateTo({
url: path
})
}
}
}
</script>
<style lang="scss" scoped>
.pitch_list{
display: flex;
flex-direction: column;
padding: 30rpx 20rpx;
.pitch_item{
position: relative;
display: flex;
align-items: center;
overflow: hidden;
margin-bottom: 20rpx;
&:last-child {
margin-bottom: 0;
}
.left{
width: 120rpx;
height: 120rpx;
border-radius: 12rpx;
margin-right: 40rpx;
overflow: hidden;
.cover_img{
width: 100%;
height: 100%;
}
}
.right{
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
.right_text{
display: flex;
flex-direction: column;
justify-content: center;
font-size: 24rpx;
line-height: 32rpx;
color: #FFD900;
}
.QRCode{
right: 60rpx;
width: 72rpx;
height: 72rpx;
}
}
}
.add_mode{
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
line-height: 38rpx;
color: #999;
height: 120rpx;
background: #FFFFFF;
margin-top: 20rpx;
border-radius: 12rpx;
}
}
</style>