版本优化
Showing
2 changed files
with
30 additions
and
20 deletions
| ... | @@ -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>--> |
| ... | @@ -48,13 +48,13 @@ | ... | @@ -48,13 +48,13 @@ |
| 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" /> |
| ... | @@ -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 |
| ... | @@ -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,7 +386,7 @@ function goMap() { | ... | @@ -380,7 +386,7 @@ 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; |
| ... | @@ -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', | ... | ... |
-
Please register or sign in to post a comment