47c213a0 by zhangmeng

版本优化

1 parent f83daab5
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 <div> 2 <div>
3 <div class="box"> 3 <div class="box">
4 <el-card v-loading="loading" class="mt30"> 4 <el-card v-loading="loading" class="mt30">
5 <el-row v-if="form" class="hotel" align="middle" :gutter="20"> 5 <el-row v-if="form" :gutter="20" align="middle" class="hotel">
6 <!-- <el-col :span="6">--> 6 <!-- <el-col :span="6">-->
7 <!-- <img class="w100" :src="fillImgUrl(form.photos?.split(',')[0])"/>--> 7 <!-- <img class="w100" :src="fillImgUrl(form.photos?.split(',')[0])"/>-->
8 <!-- </el-col>--> 8 <!-- </el-col>-->
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
12 <img v-for="i in Number(form?.starLevel||0)" src="@/assets/booking/star.png"> 12 <img v-for="i in Number(form?.starLevel||0)" src="@/assets/booking/star.png">
13 </div> 13 </div>
14 </h3> 14 </h3>
15 15
16 <div class="tagbox"> 16 <div class="tagbox">
17 <span v-for="(t,index) in form?.label?.split(',')" v-show="index<4">{{ t }}</span> 17 <span v-for="(t,index) in form?.label?.split(',')" v-show="index<4">{{ t }}</span>
18 <a v-show="form?.label?.split(',').length>4">{{ language == 0 ? '更多' : 'MORE' }} ></a> 18 <a v-show="form?.label?.split(',').length>4">{{ language == 0 ? '更多' : 'MORE' }} ></a>
...@@ -42,19 +42,19 @@ ...@@ -42,19 +42,19 @@
42 </el-row> 42 </el-row>
43 <el-empty v-else :image="`/img/order_no.png`" :image-size="228" description="" /> 43 <el-empty v-else :image="`/img/order_no.png`" :image-size="228" description="" />
44 </el-card> 44 </el-card>
45 45
46 <div class="mt30"> 46 <div class="mt30">
47 <el-row :gutter="20"> 47 <el-row :gutter="20">
48 <el-col :span="10"> 48 <el-col :span="10">
49 <div class="imgbox hotelImg"> 49 <div class="imgbox hotelImg">
50 <el-image 50 <el-image
51 :src="fillImgUrl(form?.photos?.split(',')[0])" fit="cover" 51 :preview-src-list="form?.photos?.split(',')" :src="fillImgUrl(form?.photos?.split(',')[0])"
52 :preview-src-list="form?.photos?.split(',')" 52 fit="cover"
53 /> 53 />
54 </div> 54 </div>
55 </el-col> 55 </el-col>
56 <el-col :span="14"> 56 <el-col :span="14">
57 <el-row class="h100" :gutter="20"> 57 <el-row :gutter="20" class="h100">
58 <el-col v-for="(p,index) in form?.photos?.split(',').slice(1,7)" :span="8" class="oddmb"> 58 <el-col v-for="(p,index) in form?.photos?.split(',').slice(1,7)" :span="8" class="oddmb">
59 <div class="imgbox hotelImg"> 59 <div class="imgbox hotelImg">
60 <el-image :src="fillImgUrl(p)" fit="cover" /> 60 <el-image :src="fillImgUrl(p)" fit="cover" />
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
64 </el-col> 64 </el-col>
65 </el-row> 65 </el-row>
66 </div> 66 </div>
67 67
68 <el-card class="mt30 mb60"> 68 <el-card class="mt30 mb60">
69 <div class="lineHead"> 69 <div class="lineHead">
70 <ul> 70 <ul>
...@@ -73,11 +73,11 @@ ...@@ -73,11 +73,11 @@
73 <span style="margin-left: 100px" @click="initTime"> 73 <span style="margin-left: 100px" @click="initTime">
74 <el-date-picker 74 <el-date-picker
75 v-model="hotTime" 75 v-model="hotTime"
76 type="daterange" 76 :clearable="false"
77 :disabled-date="disabledDateRZ" 77 :disabled-date="disabledDateRZ"
78 :placeholder="language==0?'选择日期':'Select date'" 78 :placeholder="language==0?'选择日期':'Select date'"
79 format="YYYY-MM-DD" 79 format="YYYY-MM-DD"
80 :clearable="false" 80 type="daterange"
81 value-format="YYYY-MM-DD" 81 value-format="YYYY-MM-DD"
82 @change="getDaysBetween" 82 @change="getDaysBetween"
83 /> 83 />
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
112 </el-row> 112 </el-row>
113 <div class="tagbox esp"> 113 <div class="tagbox esp">
114 <span v-for="(t,index) in r.label?.split(',')" v-show="index<4">{{ t }}</span> 114 <span v-for="(t,index) in r.label?.split(',')" v-show="index<4">{{ t }}</span>
115 <a v-show="r.label?.split(',').length>4">{{ language==0?'更多':'MORE' }} ></a> 115 <a v-show="r.label?.split(',').length>4">{{ language == 0 ? '更多' : 'MORE' }} ></a>
116 </div> 116 </div>
117 </el-col> 117 </el-col>
118 <el-col :span="3"> 118 <el-col :span="3">
...@@ -130,9 +130,9 @@ ...@@ -130,9 +130,9 @@
130 <div>{{ language == 0 ? '在线付' : 'Online' }}</div> 130 <div>{{ language == 0 ? '在线付' : 'Online' }}</div>
131 </el-button> 131 </el-button>
132 <el-button 132 <el-button
133 v-else style="color: #fff" :disabled="!r.useCount && !hotTime" 133 v-else :class="{'forbid':!(!hotTime[0] || r.useCount>0)}" :disabled="!r.useCount && !hotTime"
134 :class="{'forbid':!(!hotTime[0] || r.useCount>0)}" 134 class="btn-lineG w100"
135 class="btn-lineG w100" round 135 round style="color: #fff"
136 type="primary" @click="goOrder(r)" 136 type="primary" @click="goOrder(r)"
137 > 137 >
138 Select 138 Select
...@@ -145,11 +145,11 @@ ...@@ -145,11 +145,11 @@
145 {{ r.useCount }} Remaining rooms 145 {{ r.useCount }} Remaining rooms
146 </div> 146 </div>
147 </div> 147 </div>
148 148
149 </el-col> 149 </el-col>
150 </el-row> 150 </el-row>
151 </div> 151 </div>
152 152
153 <el-empty v-if="roomList.length == 0" :image="`/img/order_no.png`" :image-size="228" description="" /> 153 <el-empty v-if="roomList.length == 0" :image="`/img/order_no.png`" :image-size="228" description="" />
154 </div> 154 </div>
155 </el-card> 155 </el-card>
...@@ -199,7 +199,7 @@ onMounted(() => { ...@@ -199,7 +199,7 @@ onMounted(() => {
199 }).finally(() => { 199 }).finally(() => {
200 console.log(formTime.value) 200 console.log(formTime.value)
201 getDateTime() 201 getDateTime()
202 202
203 getData() 203 getData()
204 }) 204 })
205 }) 205 })
...@@ -236,6 +236,7 @@ function getData() { ...@@ -236,6 +236,7 @@ function getData() {
236 }) 236 })
237 getRoomList() 237 getRoomList()
238 } 238 }
239
239 function getRoomList() { 240 function getRoomList() {
240 query.value.hotelId = route.query.id 241 query.value.hotelId = route.query.id
241 query.value.rzStart = hotTime.value ? hotTime.value[0] : null 242 query.value.rzStart = hotTime.value ? hotTime.value[0] : null
...@@ -245,6 +246,7 @@ function getRoomList() { ...@@ -245,6 +246,7 @@ function getRoomList() {
245 console.log(roomList.value) 246 console.log(roomList.value)
246 }) 247 })
247 } 248 }
249
248 function initMap() { 250 function initMap() {
249 // const TMap = (window as any).TMap 251 // const TMap = (window as any).TMap
250 var center = new TMap.LatLng(form.value.latitude, form.value.longitude)// 设置中心点坐标' 252 var center = new TMap.LatLng(form.value.latitude, form.value.longitude)// 设置中心点坐标'
...@@ -287,16 +289,20 @@ function initMap() { ...@@ -287,16 +289,20 @@ function initMap() {
287 }) 289 })
288 } 290 }
289 291
290 function goOrder(room) { 292 async function goOrder(room) {
293 const { data } = await getBaseInfoByActiveId(route.params.cptId)
294 if (data.isJdView == 0) {
295 return proxy.$modal.confirm(language.value == 0 ? '感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。' : 'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.')
296 }
297
298
291 if (!hotTime.value[0]) { 299 if (!hotTime.value[0]) {
292 proxy.$modal.msgError(language.value == 0 ? '请先选择入住日期' : 'Please choose the date of check-in first') 300 proxy.$modal.msgError(language.value == 0 ? '请先选择入住日期' : 'Please choose the date of check-in first')
293 return 301 return
294 } 302 }
295 if (room.useCount <= 0) { 303 if (room.useCount <= 0) {
296 ElMessageBox.confirm(language.value == 0 ? `您当前选择的日期是${hotTime.value[0]}${hotTime.value[1]},该时间段暂无可预订房间,请选择其他日期` 304 ElMessageBox.confirm(language.value == 0 ? `您当前选择的日期是${hotTime.value[0]}${hotTime.value[1]},该时间段暂无可预订房间,请选择其他日期`
297 : `You currently select the check-in date of ${hotTime.value[0]} to ${hotTime.value[1]}, there is no room available for booking at this time period, please choose another date`, { type: 'warning' }).then({ 305 : `You currently select the check-in date of ${hotTime.value[0]} to ${hotTime.value[1]}, there is no room available for booking at this time period, please choose another date`, { type: 'warning' }).then({})
298
299 })
300 return 306 return
301 } 307 }
302 ElMessageBox.confirm(language.value == 0 ? '你当前选择的入住时间为' + hotTime.value[0] + '至' + hotTime.value[1] + ',是否确定?' : 'Your current check-in time is' + hotTime.value[0] + '~' + hotTime.value[1] + 'Are you sure?', { type: 'warning' }).then({}).then(() => { 308 ElMessageBox.confirm(language.value == 0 ? '你当前选择的入住时间为' + hotTime.value[0] + '至' + hotTime.value[1] + ',是否确定?' : 'Your current check-in time is' + hotTime.value[0] + '~' + hotTime.value[1] + 'Are you sure?', { type: 'warning' }).then({}).then(() => {
...@@ -380,23 +386,23 @@ function goMap() { ...@@ -380,23 +386,23 @@ function goMap() {
380 386
381 </script> 387 </script>
382 388
383 <style scoped lang="scss"> 389 <style lang="scss" scoped>
384 .room { 390 .room {
385 background: #FAFBFD; 391 background: #FAFBFD;
386 margin: 20px 0 0; 392 margin: 20px 0 0;
387 padding: 20px; 393 padding: 20px;
388 border: 1px solid #E5E5E5; 394 border: 1px solid #E5E5E5;
389 395
390 .name { 396 .name {
391 font-size: 20px; 397 font-size: 20px;
392 margin: 0 0 10px; 398 margin: 0 0 10px;
393 } 399 }
394 400
395 .roomImg { 401 .roomImg {
396 aspect-ratio: 16/9; 402 aspect-ratio: 16/9;
397 border-radius: 10px; 403 border-radius: 10px;
398 overflow: hidden; 404 overflow: hidden;
399 405
400 img { 406 img {
401 width: 100%; 407 width: 100%;
402 object-fit: cover; 408 object-fit: cover;
...@@ -404,17 +410,17 @@ function goMap() { ...@@ -404,17 +410,17 @@ function goMap() {
404 height: 100%; 410 height: 100%;
405 } 411 }
406 } 412 }
407 413
408 .price { 414 .price {
409 color: #FF8124; 415 color: #FF8124;
410 font-size: 24px; 416 font-size: 24px;
411 417
412 span { 418 span {
413 font-size: 36px; 419 font-size: 36px;
414 font-family: "DIN Alternate" 420 font-family: "DIN Alternate"
415 } 421 }
416 } 422 }
417 423
418 .bg-lineg { 424 .bg-lineg {
419 margin: auto; 425 margin: auto;
420 border-radius: 10px; 426 border-radius: 10px;
...@@ -423,7 +429,7 @@ function goMap() { ...@@ -423,7 +429,7 @@ function goMap() {
423 font-size: 24px; 429 font-size: 24px;
424 width: 66px; 430 width: 66px;
425 cursor: pointer; 431 cursor: pointer;
426 432
427 div { 433 div {
428 background: #fff; 434 background: #fff;
429 font-size: 13px; 435 font-size: 13px;
...@@ -439,30 +445,30 @@ function goMap() { ...@@ -439,30 +445,30 @@ function goMap() {
439 h3 { 445 h3 {
440 margin: 0 0 20px; 446 margin: 0 0 20px;
441 } 447 }
442 448
443 img.w100 { 449 img.w100 {
444 object-fit: cover; 450 object-fit: cover;
445 aspect-ratio: 16/9 451 aspect-ratio: 16/9
446 } 452 }
447 453
448 .addr { 454 .addr {
449 font-size: 16px; 455 font-size: 16px;
450 color: #929AA0; 456 color: #929AA0;
451 font-weight: 400; 457 font-weight: 400;
452 } 458 }
453 459
454 .price { 460 .price {
455 margin: 0 0 25px; 461 margin: 0 0 25px;
456 color: #FF8124; 462 color: #FF8124;
457 font-size: 18px; 463 font-size: 18px;
458 464
459 span { 465 span {
460 font-size: 24px; 466 font-size: 24px;
461 margin: 0 8px; 467 margin: 0 8px;
462 font-family: 'DINAlternate-Bold'; 468 font-family: 'DINAlternate-Bold';
463 font-weight: 600; 469 font-weight: 600;
464 } 470 }
465 471
466 i { 472 i {
467 font-style: normal; 473 font-style: normal;
468 color: #929AA0; 474 color: #929AA0;
...@@ -475,15 +481,15 @@ function goMap() { ...@@ -475,15 +481,15 @@ function goMap() {
475 height: 55px; 481 height: 55px;
476 width: auto; 482 width: auto;
477 color: #fff; 483 color: #fff;
478 484
479 span { 485 span {
480 display: block !important; 486 display: block !important;
481 487
482 div { 488 div {
483 margin-top: 3px; 489 margin-top: 3px;
484 } 490 }
485 } 491 }
486 492
487 } 493 }
488 494
489 .starBox { 495 .starBox {
...@@ -495,12 +501,12 @@ function goMap() { ...@@ -495,12 +501,12 @@ function goMap() {
495 501
496 .tagbox { 502 .tagbox {
497 margin: 15px 0; 503 margin: 15px 0;
498 504
499 a { 505 a {
500 color: #AFB5B9; 506 color: #AFB5B9;
501 font-size: 12px; 507 font-size: 12px;
502 } 508 }
503 509
504 span { 510 span {
505 border-radius: 13px; 511 border-radius: 13px;
506 font-size: 12px; 512 font-size: 12px;
...@@ -508,22 +514,22 @@ function goMap() { ...@@ -508,22 +514,22 @@ function goMap() {
508 margin-right: 10px; 514 margin-right: 10px;
509 font-weight: 400; 515 font-weight: 400;
510 } 516 }
511 517
512 span:nth-child(4n) { 518 span:nth-child(4n) {
513 background: rgba(50, 177, 108, 0.2); 519 background: rgba(50, 177, 108, 0.2);
514 color: rgba(50, 177, 108, 1); 520 color: rgba(50, 177, 108, 1);
515 } 521 }
516 522
517 span:nth-child(4n+1) { 523 span:nth-child(4n+1) {
518 background: rgba(243, 152, 0, 0.2); 524 background: rgba(243, 152, 0, 0.2);
519 color: rgba(243, 152, 0, 1); 525 color: rgba(243, 152, 0, 1);
520 } 526 }
521 527
522 span:nth-child(4n+2) { 528 span:nth-child(4n+2) {
523 background: rgba(0, 160, 233, 0.2); 529 background: rgba(0, 160, 233, 0.2);
524 color: rgba(0, 160, 233, 1); 530 color: rgba(0, 160, 233, 1);
525 } 531 }
526 532
527 span:nth-child(4n+3) { 533 span:nth-child(4n+3) {
528 background: rgba(247, 64, 166, 0.2); 534 background: rgba(247, 64, 166, 0.2);
529 color: rgba(247, 64, 166, 1); 535 color: rgba(247, 64, 166, 1);
...@@ -534,7 +540,7 @@ function goMap() { ...@@ -534,7 +540,7 @@ function goMap() {
534 position: relative; 540 position: relative;
535 overflow: hidden; 541 overflow: hidden;
536 height: 200px; 542 height: 200px;
537 543
538 #map { 544 #map {
539 position: relative; 545 position: relative;
540 left: -70px; 546 left: -70px;
...@@ -546,7 +552,7 @@ function goMap() { ...@@ -546,7 +552,7 @@ function goMap() {
546 border-radius: 10px; 552 border-radius: 10px;
547 overflow: hidden; 553 overflow: hidden;
548 aspect-ratio: 16/9; 554 aspect-ratio: 16/9;
549 555
550 img { 556 img {
551 object-fit: cover; 557 object-fit: cover;
552 object-position: center; 558 object-position: center;
...@@ -559,7 +565,7 @@ function goMap() { ...@@ -559,7 +565,7 @@ function goMap() {
559 font-weight: 400; 565 font-weight: 400;
560 font-size: 14px; 566 font-size: 14px;
561 color: #929AA0; 567 color: #929AA0;
562 568
563 .el-icon { 569 .el-icon {
564 margin-right: 5px; 570 margin-right: 5px;
565 } 571 }
...@@ -571,7 +577,8 @@ function goMap() { ...@@ -571,7 +577,8 @@ function goMap() {
571 577
572 .forbid { 578 .forbid {
573 cursor: not-allowed !important; 579 cursor: not-allowed !important;
574 filter:grayscale(0.4);opacity: 0.7; 580 filter: grayscale(0.4);
581 opacity: 0.7;
575 } 582 }
576 583
577 .forbid:hover { 584 .forbid:hover {
......
...@@ -319,6 +319,7 @@ const overdueView = ref('1') ...@@ -319,6 +319,7 @@ const overdueView = ref('1')
319 const isOver = ref(false) 319 const isOver = ref(false)
320 const leftCount = ref(-999) 320 const leftCount = ref(-999)
321 321
322
322 watch(show, (val) => { 323 watch(show, (val) => {
323 if (!val) { 324 if (!val) {
324 showUrl.value = '' 325 showUrl.value = ''
...@@ -464,9 +465,11 @@ function selectTick(v) { ...@@ -464,9 +465,11 @@ function selectTick(v) {
464 } 465 }
465 } 466 }
466 467
467 function toSelectSeat() { 468 async function toSelectSeat() {
468 // if (!selectForm.value.latId) return ElMessage.error(language.value == 0 ? '请选择票档' : 'Please select a ticket file') 469 const { data } = await getBaseInfoByActiveId(activeId.value)
469 // if (!selectForm.value.id) return ElMessage.error(language.value == 0 ? '请选择时间' : 'Please select time') 470 if (data.isTicketView == 0) {
471 return proxy.$modal.confirm(language.value == 0 ? '感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。' : 'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.')
472 }
470 if (!user.value) { 473 if (!user.value) {
471 useStore.setVisitor() 474 useStore.setVisitor()
472 return 475 return
...@@ -474,7 +477,7 @@ function toSelectSeat() { ...@@ -474,7 +477,7 @@ function toSelectSeat() {
474 if (!selectForm.value.latstId) { 477 if (!selectForm.value.latstId) {
475 return proxy.$modal.confirm(language.value == 0 ? '请选择票型' : 'Please select a ticket type') 478 return proxy.$modal.confirm(language.value == 0 ? '请选择票型' : 'Please select a ticket type')
476 } 479 }
477 checkNonPayment().then(res => { 480 await checkNonPayment().then(res => {
478 if (res.data) { 481 if (res.data) {
479 router.push({ 482 router.push({
480 name: 'confirmOrder', 483 name: 'confirmOrder',
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!