58ee748a by zrj

9.12 酒店弹框功能

1 parent 5b1df1e7
...@@ -23,13 +23,6 @@ export function getHotelById(id) { ...@@ -23,13 +23,6 @@ export function getHotelById(id) {
23 }) 23 })
24 } 24 }
25 25
26 export function getHotelEnById(id) {
27 return request({
28 url: `/ota/hotelEn/${id}`,
29 method: 'get'
30 })
31 }
32
33 export function getStudioById(id) { 26 export function getStudioById(id) {
34 return request({ 27 return request({
35 url: `/ota/studio/${id}`, 28 url: `/ota/studio/${id}`,
......
...@@ -75,7 +75,7 @@ import * as booking from "@/apiPc/booking" ...@@ -75,7 +75,7 @@ import * as booking from "@/apiPc/booking"
75 import {useRouter, useRoute} from "vue-router"; 75 import {useRouter, useRoute} from "vue-router";
76 import {useStorage} from "@vueuse/core"; 76 import {useStorage} from "@vueuse/core";
77 import useUserStore from "@/store/modules/user"; 77 import useUserStore from "@/store/modules/user";
78 import {getHotelById, getHotelEnById} from "@/apiPc/booking" 78 import {getHotelById} from "@/apiPc/booking"
79 // import {ElMessageBox} from "element-plus"; 79 // import {ElMessageBox} from "element-plus";
80 // import {useRouteQuery} from '@vueuse/router' 80 // import {useRouteQuery} from '@vueuse/router'
81 import {onMounted} from "vue"; 81 import {onMounted} from "vue";
...@@ -122,8 +122,9 @@ function goDetail(item) { ...@@ -122,8 +122,9 @@ function goDetail(item) {
122 return 122 return
123 } 123 }
124 124
125
125 selectItem.value = item 126 selectItem.value = item
126 if (language.value == '0') { 127 if (query.value.meeting == '1') {
127 getHotelById(item.hotelId).then(res => { 128 getHotelById(item.hotelId).then(res => {
128 content.value = res.data.meetText 129 content.value = res.data.meetText
129 show.value = true 130 show.value = true
...@@ -131,15 +132,8 @@ function goDetail(item) { ...@@ -131,15 +132,8 @@ function goDetail(item) {
131 console.log(err) 132 console.log(err)
132 }) 133 })
133 } else { 134 } else {
134 getHotelEnById(item.hotelId).then(res => { 135 ok()
135 content.value = res.data.meetText
136 show.value = true
137 }).catch(err => {
138 console.log(err)
139 })
140 } 136 }
141
142
143 } 137 }
144 138
145 function ok(){ 139 function ok(){
...@@ -154,34 +148,46 @@ function ok(){ ...@@ -154,34 +148,46 @@ function ok(){
154 } 148 }
155 }) 149 })
156 150
157 if (selectItem.value.meeting == '1') { 151 // ElMessageBox.confirm(selectItem.value.meetText, '', {
158 ElMessageBox.confirm(selectItem.value.meetText, '', { 152 // cancelButtonText: language.value == 1 ? 'Close ' : '关闭',
159 cancelButtonText: language.value == 1 ? 'Close ' : '关闭', 153 // confirmButtonText: language.value == 1 ? 'Continue to book' : '继续预订',
160 confirmButtonText: language.value == 1 ? 'Continue to book' : '继续预订', 154 // dangerouslyUseHTMLString: true,
161 dangerouslyUseHTMLString: true, 155 // type: 'warning',
162 type: 'warning', 156 // }).then((res) => {
163 }).then((res) => { 157 // router.push({
164 router.push({ 158 // name: 'hotelDetail',
165 name: 'hotelDetail', 159 // params: {
166 params: { 160 // hotelId: selectItem.value.hotelId,
167 hotelId: selectItem.value.hotelId, 161 // },
168 }, 162 // query: {
169 query: { 163 // id: selectItem.value.id
170 id: selectItem.value.id 164 // }
171 } 165 // })
172 }) 166 // })
173 }) 167
174 } else { 168 // router.push({
175 router.push({ 169 // name: 'hotelDetail',
176 name: 'hotelDetail', 170 // params: {
177 params: { 171 // hotelId: selectItem.value.hotelId,
178 hotelId: selectItem.value.hotelId, 172 // },
179 }, 173 // query: {
180 query: { 174 // id: selectItem.value.id
181 id: selectItem.value.id 175 // }
182 } 176 // })
183 }) 177
184 } 178 // if (selectItem.value.meeting == '1') {
179 //
180 // } else {
181 // router.push({
182 // name: 'hotelDetail',
183 // params: {
184 // hotelId: selectItem.value.hotelId,
185 // },
186 // query: {
187 // id: selectItem.value.id
188 // }
189 // })
190 // }
185 } 191 }
186 192
187 193
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!