homeQuick.vue
5.88 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<template>
<div class="itemBox" v-if="language == 0">
<el-row :gutter="20">
<el-col :sm="12" :lg="8">
<div class="item" @click="popRemark(1)"><img src="@/assets/dance/btn01.png">酒店预订</div>
</el-col>
<el-col :sm="12" :lg="8">
<div class="item" @click="popRemark(2)"><img src="@/assets/dance/btn02.png">车辆预订</div>
</el-col>
<el-col :sm="12" :lg="8">
<div class="item" @click="popRemark(3)"><img src="@/assets/dance/btn03.png">餐饮预订</div>
</el-col>
<el-col :sm="12" :lg="8">
<div class="item" @click="popRemark(0)"><img src="@/assets/dance/btn04.png">票务预订</div>
</el-col>
<el-col :sm="12" :lg="8">
<div class="item" @click="popRemark(4)"><img src="@/assets/dance/btn05.png">化妆预约</div>
</el-col>
<el-col :sm="12" :lg="8">
<div class="item" @click="popRemark(5)"><img src="@/assets/dance/btn06.png">拍照预约</div>
</el-col>
</el-row>
</div>
<div class="itemBox_en" v-else>
<el-row :gutter="20">
<el-col :sm="12" :lg="8">
<div class="item_en" @click="popRemark(1)"><img src="@/assets/dance/btn01.png">
<p>HOTEL RESERVATION</p>
</div>
</el-col>
<el-col :sm="12" :lg="8">
<div class="item_en" @click="popRemark(2)"><img src="@/assets/dance/btn02.png">
<p>TRANSPORTATION RESERVATION</p>
</div>
</el-col>
<el-col :sm="12" :lg="8">
<div class="item_en" @click="popRemark(3)"><img src="@/assets/dance/btn03.png">
<p>DINING RESERVATION</p>
</div>
</el-col>
<el-col :sm="12" :lg="8">
<div class="item_en" @click="popRemark(0)">
<img src="@/assets/dance/btn04.png">
<p>TICKET BOOKING</p>
</div>
</el-col>
<el-col :sm="12" :lg="8">
<div class="item_en" @click="popRemark(4)"><img src="@/assets/dance/btn05.png">
<p>MAKEUP APPOINTMENT</p>
</div>
</el-col>
<el-col :sm="12" :lg="8">
<div class="item_en" @click="popRemark(5)"><img src="@/assets/dance/btn06.png">
<p>PHOTOGRAPHY APPOINTMENT</p>
</div>
</el-col>
</el-row>
</div>
<order-remark ref="orderRemarkRef" @submit="goBooking"/>
</template>
<script setup>
import {useRouter} from "vue-router";
const router = useRouter()
import OrderRemark from '@/viewsPc/components/orderRemark'
const {proxy} = getCurrentInstance()
import {useStorage} from "@vueuse/core/index";
import {ElMessage} from "element-plus";
import {getCurrentInstance} from "@vue/runtime-core";
import {computed, onMounted, watch} from "vue";
import {getBaseInfoByActiveId} from "@/apiPc/booking";
const props = defineProps({
matchId: {
type: String,
required: true,
default: '0'
},
cptName: {
type: String,
required: true,
default: ''
}
})
const language = useStorage('language', 0)
const form = ref({})
const matchId = computed(() => props.matchId);
watch(matchId, (val) => {
if (val && val != '0') {
getBaseInfoByActiveId(props.matchId).then(res => {
form.value = res.data || null
}).catch(err => {
console.log(err)
form.value = null
})
}
})
onMounted(() => {
})
function building() {
ElMessage.warning(language.value == 0 ? '感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。' : 'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.')
return
}
function popRemark(type) {
if (!form.value) {
building()
return
}
if ((form.value.isJdView == 0 && type == '1')
|| (form.value.isCarView == 0 && type == '2')
|| (form.value.isFoodView == 0 && type == '3')
|| (form.value.isMealView == 0 && type == '4')
|| (form.value.isPhotoView == 0 && type == '5')
// || (type == '0')
) {
building()
return
}
const params = {
matchId: props.matchId,
title: language.value == 0 ? '预订说明' : 'Booking Instructions',
type: type,
cptName: props.cptName
}
proxy.$refs['orderRemarkRef'].open(params)
}
function goBooking(n) {
switch (n) {
case 0:
// 票务
router.push({
path: `/seat/detail`,
params: {id: 1},
query: {id: 1}
})
break;
case 1:
//酒店
router.push({path: `/booking/hotel/${props.matchId}`})
break;
case 2:
//车辆
router.push({path: `/booking/car/${props.matchId}`})
break;
case 3:
//餐饮
router.push({path: `/booking/dinner/${props.matchId}`})
break;
case 4:
//化妆
router.push({path: `/booking/makeup/${props.matchId}`})
break;
case 5:
//拍照
router.push({path: `/booking/photography/${props.matchId}`})
break;
}
}
</script>
<style scoped lang="scss">
.itemBox {
padding: 20px 40px;
}
.itemBox_en {
padding: 20px 40px;
p {
margin: 0;
height: 40px;
line-height: 20px;
display: flex;
align-items: center;
}
}
.item {
box-shadow: 0px 0px 21px 0px rgba(41, 23, 101, 0.14);
margin: 10px 0;
display: flex;
align-items: center;
font-size: 22px;
background: url("@/assets/dance/btn_bg.png") no-repeat left #FFFFFF;
background-size: 100% 100%;
border-radius: 15px;
img {
margin: 0 5%;
}
}
.item_en {
box-shadow: 0px 0px 21px 0px rgba(41, 23, 101, 0.14);
margin: 40px 0 0;
cursor: pointer;
display: flex;
align-items: center;
text-align: center;
color: #333;
font-size: 18px;
flex-direction: column;
padding: 35px 10px 20px;
background: url("@/assets/dance/znbb.png") no-repeat left #FFFFFF;
background-size: cover;
position: relative;
border-radius: 15px;
img {
position: absolute;
top: -30px;
transition: all 0.2s;
}
&:hover {
box-shadow: 0 0 10px #333;
img {
transform: rotateY(180deg);
}
p {
color: #000;
}
}
}
</style>