58ee748a by zrj

9.12 酒店弹框功能

1 parent 5b1df1e7
......@@ -23,13 +23,6 @@ export function getHotelById(id) {
})
}
export function getHotelEnById(id) {
return request({
url: `/ota/hotelEn/${id}`,
method: 'get'
})
}
export function getStudioById(id) {
return request({
url: `/ota/studio/${id}`,
......
......@@ -75,7 +75,7 @@ import * as booking from "@/apiPc/booking"
import {useRouter, useRoute} from "vue-router";
import {useStorage} from "@vueuse/core";
import useUserStore from "@/store/modules/user";
import {getHotelById, getHotelEnById} from "@/apiPc/booking"
import {getHotelById} from "@/apiPc/booking"
// import {ElMessageBox} from "element-plus";
// import {useRouteQuery} from '@vueuse/router'
import {onMounted} from "vue";
......@@ -122,8 +122,9 @@ function goDetail(item) {
return
}
selectItem.value = item
if (language.value == '0') {
if (query.value.meeting == '1') {
getHotelById(item.hotelId).then(res => {
content.value = res.data.meetText
show.value = true
......@@ -131,15 +132,8 @@ function goDetail(item) {
console.log(err)
})
} else {
getHotelEnById(item.hotelId).then(res => {
content.value = res.data.meetText
show.value = true
}).catch(err => {
console.log(err)
})
ok()
}
}
function ok(){
......@@ -154,34 +148,46 @@ function ok(){
}
})
if (selectItem.value.meeting == '1') {
ElMessageBox.confirm(selectItem.value.meetText, '', {
cancelButtonText: language.value == 1 ? 'Close ' : '关闭',
confirmButtonText: language.value == 1 ? 'Continue to book' : '继续预订',
dangerouslyUseHTMLString: true,
type: 'warning',
}).then((res) => {
router.push({
name: 'hotelDetail',
params: {
hotelId: selectItem.value.hotelId,
},
query: {
id: selectItem.value.id
}
})
})
} else {
router.push({
name: 'hotelDetail',
params: {
hotelId: selectItem.value.hotelId,
},
query: {
id: selectItem.value.id
}
})
}
// ElMessageBox.confirm(selectItem.value.meetText, '', {
// cancelButtonText: language.value == 1 ? 'Close ' : '关闭',
// confirmButtonText: language.value == 1 ? 'Continue to book' : '继续预订',
// dangerouslyUseHTMLString: true,
// type: 'warning',
// }).then((res) => {
// router.push({
// name: 'hotelDetail',
// params: {
// hotelId: selectItem.value.hotelId,
// },
// query: {
// id: selectItem.value.id
// }
// })
// })
// router.push({
// name: 'hotelDetail',
// params: {
// hotelId: selectItem.value.hotelId,
// },
// query: {
// id: selectItem.value.id
// }
// })
// if (selectItem.value.meeting == '1') {
//
// } else {
// router.push({
// name: 'hotelDetail',
// params: {
// hotelId: selectItem.value.hotelId,
// },
// query: {
// id: selectItem.value.id
// }
// })
// }
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!