5b1df1e7 by zrj

9.10 接送服务等功能修改

1 parent cafeb030
......@@ -23,6 +23,13 @@ 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}`,
......
......@@ -56,7 +56,17 @@
<el-empty v-show="!loading&&list.length==0" :image="`/img/order_no.png`" :image-size="228" description=""/>
<div style="height: 50px"></div>
</div>
<el-dialog v-model="show">
<div>
<div class="or-html" v-if="content" v-html="content"/>
</div>
<template #footer>
<div class="dialog-footer text-center">
<el-button class="btn-lineG w200px" round type="primary" @click="ok">{{ language == 0 ? '确定' : 'Confirm' }}
</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
......@@ -65,6 +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 {ElMessageBox} from "element-plus";
// import {useRouteQuery} from '@vueuse/router'
import {onMounted} from "vue";
......@@ -102,52 +113,78 @@ function getList() {
})
}
const selectItem = ref()
const show = ref(false)
const content = ref('')
function goDetail(item) {
if (!user) {
useStore.setVisitor()
return
}
selectItem.value = item
if (language.value == '0') {
getHotelById(item.hotelId).then(res => {
content.value = res.data.meetText
show.value = true
}).catch(err => {
console.log(err)
})
} else {
getHotelEnById(item.hotelId).then(res => {
content.value = res.data.meetText
show.value = true
}).catch(err => {
console.log(err)
})
}
}
function ok(){
router.push({
name: 'hotelDetail',
params: {
hotelId: item.hotelId,
hotelId: selectItem.value.hotelId,
},
query: {
id: item.id,
id: selectItem.value.id,
meeting: query.value.meeting,
}
})
// if (item.meeting == '1') {
// ElMessageBox.confirm(item.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: item.hotelId,
// },
// query: {
// id: item.id
// }
// })
// })
// } else {
// router.push({
// name: 'hotelDetail',
// params: {
// hotelId: item.hotelId,
// },
// query: {
// id: item.id
// }
// })
// }
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
}
})
}
}
</script>
<style lang="scss" scoped>
......
......@@ -84,8 +84,8 @@ export default defineConfig(({mode, command}) => {
},
'/dev-api': {
// target: 'http://192.168.1.118:8082/',
// target: 'http://192.168.1.22:8082',
target: 'https://tk005.wxjylt.com/stage-api',
target: 'http://192.168.1.22:8082',
// target: 'https://tk005.wxjylt.com/stage-api',
// target: 'http://124.70.181.90:1880/stage-api',
// target: 'https://sys.2025wtcwuxi.com/stage-api/',
changeOrigin: true,
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!