ballCard.vue
1.6 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
<template>
<view class="ball_card">
<uni-collapse>
<uni-collapse-item :title="ballInfo.title" :thumb="ballInfo.iconName">
<view v-for="item in ballInfo.children" :key="item.groundId" class="content" @click="goRouter(item)">
<view class="dis-flex flex-y-center">
<image style="width: 44rpx;" :src="ballInfo.iconName" mode="widthFix"></image>
<text class="col-3d f-28 m-l-20">{{ item.groundNum }}号包间</text>
</view>
<u-icon name="arrow-right" color="#333" size="14"></u-icon>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</template>
<script>
import { pro_http } from '@/utils/baseUrl.js'
export default {
name:"ballCard",
props: {
ballInfo: {
type: Object,
require: true
},
isLock: {
type: Boolean,
default: false
}
},
data(){
return {
pro_http
}
},
computed: {
formatPhoto(){
return (groundPhotos) => {
let imgList = groundPhotos.split(',')
return imgList[0]
}
}
},
methods: {
// 前往球场详情
goRouter(info){
if(this.isLock) {
uni.navigateTo({
url: `/pages_arenaControl/lockArena/lockArena?groundId=${info.groundId}&sportsRange=${info.sportsRange}&groundNum=${info.groundNum}`
})
} else {
uni.navigateTo({
url: '/pages_arenaControl/addArena/addArena?groundId=' + info.groundId
})
}
}
}
}
</script>
<style lang="scss" scoped>
.ball_card{
background: #FFFFFF;
border-radius: 12rpx;
margin-bottom: 20rpx;
.content{
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
border-top: 2rpx solid #eee;
}
}
</style>