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>-->
......@@ -12,7 +12,7 @@
<img v-for="i in Number(form?.starLevel||0)" src="@/assets/booking/star.png">
</div>
</h3>
<div class="tagbox">
<span v-for="(t,index) in form?.label?.split(',')" v-show="index<4">{{ t }}</span>
<a v-show="form?.label?.split(',').length>4">{{ language == 0 ? '更多' : 'MORE' }} ></a>
......@@ -42,19 +42,19 @@
</el-row>
<el-empty v-else :image="`/img/order_no.png`" :image-size="228" description="" />
</el-card>
<div class="mt30">
<el-row :gutter="20">
<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" />
......@@ -64,7 +64,7 @@
</el-col>
</el-row>
</div>
<el-card class="mt30 mb60">
<div class="lineHead">
<ul>
......@@ -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
......@@ -145,11 +145,11 @@
{{ r.useCount }} Remaining rooms
</div>
</div>
</el-col>
</el-row>
</div>
<el-empty v-if="roomList.length == 0" :image="`/img/order_no.png`" :image-size="228" description="" />
</div>
</el-card>
......@@ -199,7 +199,7 @@ onMounted(() => {
}).finally(() => {
console.log(formTime.value)
getDateTime()
getData()
})
})
......@@ -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,23 +386,23 @@ function goMap() {
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
.room {
background: #FAFBFD;
margin: 20px 0 0;
padding: 20px;
border: 1px solid #E5E5E5;
.name {
font-size: 20px;
margin: 0 0 10px;
}
.roomImg {
aspect-ratio: 16/9;
border-radius: 10px;
overflow: hidden;
img {
width: 100%;
object-fit: cover;
......@@ -404,17 +410,17 @@ function goMap() {
height: 100%;
}
}
.price {
color: #FF8124;
font-size: 24px;
span {
font-size: 36px;
font-family: "DIN Alternate"
}
}
.bg-lineg {
margin: auto;
border-radius: 10px;
......@@ -423,7 +429,7 @@ function goMap() {
font-size: 24px;
width: 66px;
cursor: pointer;
div {
background: #fff;
font-size: 13px;
......@@ -439,30 +445,30 @@ function goMap() {
h3 {
margin: 0 0 20px;
}
img.w100 {
object-fit: cover;
aspect-ratio: 16/9
}
.addr {
font-size: 16px;
color: #929AA0;
font-weight: 400;
}
.price {
margin: 0 0 25px;
color: #FF8124;
font-size: 18px;
span {
font-size: 24px;
margin: 0 8px;
font-family: 'DINAlternate-Bold';
font-weight: 600;
}
i {
font-style: normal;
color: #929AA0;
......@@ -475,15 +481,15 @@ function goMap() {
height: 55px;
width: auto;
color: #fff;
span {
display: block !important;
div {
margin-top: 3px;
}
}
}
.starBox {
......@@ -495,12 +501,12 @@ function goMap() {
.tagbox {
margin: 15px 0;
a {
color: #AFB5B9;
font-size: 12px;
}
span {
border-radius: 13px;
font-size: 12px;
......@@ -508,22 +514,22 @@ function goMap() {
margin-right: 10px;
font-weight: 400;
}
span:nth-child(4n) {
background: rgba(50, 177, 108, 0.2);
color: rgba(50, 177, 108, 1);
}
span:nth-child(4n+1) {
background: rgba(243, 152, 0, 0.2);
color: rgba(243, 152, 0, 1);
}
span:nth-child(4n+2) {
background: rgba(0, 160, 233, 0.2);
color: rgba(0, 160, 233, 1);
}
span:nth-child(4n+3) {
background: rgba(247, 64, 166, 0.2);
color: rgba(247, 64, 166, 1);
......@@ -534,7 +540,7 @@ function goMap() {
position: relative;
overflow: hidden;
height: 200px;
#map {
position: relative;
left: -70px;
......@@ -546,7 +552,7 @@ function goMap() {
border-radius: 10px;
overflow: hidden;
aspect-ratio: 16/9;
img {
object-fit: cover;
object-position: center;
......@@ -559,7 +565,7 @@ function goMap() {
font-weight: 400;
font-size: 14px;
color: #929AA0;
.el-icon {
margin-right: 5px;
}
......@@ -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!