Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
dance-pc
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
58ee748a
authored
2025-09-12 17:52:38 +0800
by
zrj
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
9.12 酒店弹框功能
1 parent
5b1df1e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
45 deletions
src/apiPc/booking.js
src/viewsPc/booking/hotel.vue
src/apiPc/booking.js
View file @
58ee748
...
...
@@ -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
}
`
,
...
...
src/viewsPc/booking/hotel.vue
View file @
58ee748
...
...
@@ -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
// }
// })
// }
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment