47c213a0 by zhangmeng

版本优化

1 parent f83daab5
......@@ -2,7 +2,7 @@
<div>
<div class="box">
<el-card v-loading="loading" class="mt30">
<el-row v-if="form" class="hotel" align="middle" :gutter="20">
<el-row v-if="form" :gutter="20" align="middle" class="hotel">
<!-- <el-col :span="6">-->
<!-- <img class="w100" :src="fillImgUrl(form.photos?.split(',')[0])"/>-->
<!-- </el-col>-->
......@@ -48,13 +48,13 @@
<el-col :span="10">
<div class="imgbox hotelImg">
<el-image
:src="fillImgUrl(form?.photos?.split(',')[0])" fit="cover"
:preview-src-list="form?.photos?.split(',')"
:preview-src-list="form?.photos?.split(',')" :src="fillImgUrl(form?.photos?.split(',')[0])"
fit="cover"
/>
</div>
</el-col>
<el-col :span="14">
<el-row class="h100" :gutter="20">
<el-row :gutter="20" class="h100">
<el-col v-for="(p,index) in form?.photos?.split(',').slice(1,7)" :span="8" class="oddmb">
<div class="imgbox hotelImg">
<el-image :src="fillImgUrl(p)" fit="cover" />
......@@ -73,11 +73,11 @@
<span style="margin-left: 100px" @click="initTime">
<el-date-picker
v-model="hotTime"
type="daterange"
:clearable="false"
:disabled-date="disabledDateRZ"
:placeholder="language==0?'选择日期':'Select date'"
format="YYYY-MM-DD"
:clearable="false"
type="daterange"
value-format="YYYY-MM-DD"
@change="getDaysBetween"
/>
......@@ -112,7 +112,7 @@
</el-row>
<div class="tagbox esp">
<span v-for="(t,index) in r.label?.split(',')" v-show="index<4">{{ t }}</span>
<a v-show="r.label?.split(',').length>4">{{ language==0?'更多':'MORE' }} ></a>
<a v-show="r.label?.split(',').length>4">{{ language == 0 ? '更多' : 'MORE' }} ></a>
</div>
</el-col>
<el-col :span="3">
......@@ -130,9 +130,9 @@
<div>{{ language == 0 ? '在线付' : 'Online' }}</div>
</el-button>
<el-button
v-else style="color: #fff" :disabled="!r.useCount && !hotTime"
:class="{'forbid':!(!hotTime[0] || r.useCount>0)}"
class="btn-lineG w100" round
v-else :class="{'forbid':!(!hotTime[0] || r.useCount>0)}" :disabled="!r.useCount && !hotTime"
class="btn-lineG w100"
round style="color: #fff"
type="primary" @click="goOrder(r)"
>
Select
......@@ -236,6 +236,7 @@ function getData() {
})
getRoomList()
}
function getRoomList() {
query.value.hotelId = route.query.id
query.value.rzStart = hotTime.value ? hotTime.value[0] : null
......@@ -245,6 +246,7 @@ function getRoomList() {
console.log(roomList.value)
})
}
function initMap() {
// const TMap = (window as any).TMap
var center = new TMap.LatLng(form.value.latitude, form.value.longitude)// 设置中心点坐标'
......@@ -287,16 +289,20 @@ function initMap() {
})
}
function goOrder(room) {
async function goOrder(room) {
const { data } = await getBaseInfoByActiveId(route.params.cptId)
if (data.isJdView == 0) {
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.')
}
if (!hotTime.value[0]) {
proxy.$modal.msgError(language.value == 0 ? '请先选择入住日期' : 'Please choose the date of check-in first')
return
}
if (room.useCount <= 0) {
ElMessageBox.confirm(language.value == 0 ? `您当前选择的日期是${hotTime.value[0]}${hotTime.value[1]},该时间段暂无可预订房间,请选择其他日期`
: `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({
})
: `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({})
return
}
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() {
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
.room {
background: #FAFBFD;
margin: 20px 0 0;
......@@ -571,7 +577,8 @@ function goMap() {
.forbid {
cursor: not-allowed !important;
filter:grayscale(0.4);opacity: 0.7;
filter: grayscale(0.4);
opacity: 0.7;
}
.forbid:hover {
......
......@@ -319,6 +319,7 @@ const overdueView = ref('1')
const isOver = ref(false)
const leftCount = ref(-999)
watch(show, (val) => {
if (!val) {
showUrl.value = ''
......@@ -464,9 +465,11 @@ function selectTick(v) {
}
}
function toSelectSeat() {
// if (!selectForm.value.latId) return ElMessage.error(language.value == 0 ? '请选择票档' : 'Please select a ticket file')
// if (!selectForm.value.id) return ElMessage.error(language.value == 0 ? '请选择时间' : 'Please select time')
async function toSelectSeat() {
const { data } = await getBaseInfoByActiveId(activeId.value)
if (data.isTicketView == 0) {
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.')
}
if (!user.value) {
useStore.setVisitor()
return
......@@ -474,7 +477,7 @@ function toSelectSeat() {
if (!selectForm.value.latstId) {
return proxy.$modal.confirm(language.value == 0 ? '请选择票型' : 'Please select a ticket type')
}
checkNonPayment().then(res => {
await checkNonPayment().then(res => {
if (res.data) {
router.push({
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!