5b1df1e7 by zrj

9.10 接送服务等功能修改

1 parent cafeb030
...@@ -23,6 +23,13 @@ export function getHotelById(id) { ...@@ -23,6 +23,13 @@ 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
26 export function getStudioById(id) { 33 export function getStudioById(id) {
27 return request({ 34 return request({
28 url: `/ota/studio/${id}`, 35 url: `/ota/studio/${id}`,
......
...@@ -56,7 +56,17 @@ ...@@ -56,7 +56,17 @@
56 <el-empty v-show="!loading&&list.length==0" :image="`/img/order_no.png`" :image-size="228" description=""/> 56 <el-empty v-show="!loading&&list.length==0" :image="`/img/order_no.png`" :image-size="228" description=""/>
57 <div style="height: 50px"></div> 57 <div style="height: 50px"></div>
58 </div> 58 </div>
59 59 <el-dialog v-model="show">
60 <div>
61 <div class="or-html" v-if="content" v-html="content"/>
62 </div>
63 <template #footer>
64 <div class="dialog-footer text-center">
65 <el-button class="btn-lineG w200px" round type="primary" @click="ok">{{ language == 0 ? '确定' : 'Confirm' }}
66 </el-button>
67 </div>
68 </template>
69 </el-dialog>
60 </div> 70 </div>
61 </template> 71 </template>
62 72
...@@ -65,6 +75,7 @@ import * as booking from "@/apiPc/booking" ...@@ -65,6 +75,7 @@ import * as booking from "@/apiPc/booking"
65 import {useRouter, useRoute} from "vue-router"; 75 import {useRouter, useRoute} from "vue-router";
66 import {useStorage} from "@vueuse/core"; 76 import {useStorage} from "@vueuse/core";
67 import useUserStore from "@/store/modules/user"; 77 import useUserStore from "@/store/modules/user";
78 import {getHotelById, getHotelEnById} from "@/apiPc/booking"
68 // import {ElMessageBox} from "element-plus"; 79 // import {ElMessageBox} from "element-plus";
69 // import {useRouteQuery} from '@vueuse/router' 80 // import {useRouteQuery} from '@vueuse/router'
70 import {onMounted} from "vue"; 81 import {onMounted} from "vue";
...@@ -102,52 +113,78 @@ function getList() { ...@@ -102,52 +113,78 @@ function getList() {
102 }) 113 })
103 } 114 }
104 115
116 const selectItem = ref()
117 const show = ref(false)
118 const content = ref('')
105 function goDetail(item) { 119 function goDetail(item) {
106 if (!user) { 120 if (!user) {
107 useStore.setVisitor() 121 useStore.setVisitor()
108 return 122 return
109 } 123 }
110 124
125 selectItem.value = item
126 if (language.value == '0') {
127 getHotelById(item.hotelId).then(res => {
128 content.value = res.data.meetText
129 show.value = true
130 }).catch(err => {
131 console.log(err)
132 })
133 } else {
134 getHotelEnById(item.hotelId).then(res => {
135 content.value = res.data.meetText
136 show.value = true
137 }).catch(err => {
138 console.log(err)
139 })
140 }
141
142
143 }
144
145 function ok(){
111 router.push({ 146 router.push({
112 name: 'hotelDetail', 147 name: 'hotelDetail',
113 params: { 148 params: {
114 hotelId: item.hotelId, 149 hotelId: selectItem.value.hotelId,
115 }, 150 },
116 query: { 151 query: {
117 id: item.id, 152 id: selectItem.value.id,
118 meeting: query.value.meeting, 153 meeting: query.value.meeting,
119 } 154 }
120 }) 155 })
121 156
122 // if (item.meeting == '1') { 157 if (selectItem.value.meeting == '1') {
123 // ElMessageBox.confirm(item.meetText, '', { 158 ElMessageBox.confirm(selectItem.value.meetText, '', {
124 // cancelButtonText: language.value == 1 ? 'Close ' : '关闭', 159 cancelButtonText: language.value == 1 ? 'Close ' : '关闭',
125 // confirmButtonText: language.value == 1 ? 'Continue to book' : '继续预订', 160 confirmButtonText: language.value == 1 ? 'Continue to book' : '继续预订',
126 // dangerouslyUseHTMLString: true, 161 dangerouslyUseHTMLString: true,
127 // type: 'warning', 162 type: 'warning',
128 // }).then((res) => { 163 }).then((res) => {
129 // router.push({ 164 router.push({
130 // name: 'hotelDetail', 165 name: 'hotelDetail',
131 // params: { 166 params: {
132 // hotelId: item.hotelId, 167 hotelId: selectItem.value.hotelId,
133 // }, 168 },
134 // query: { 169 query: {
135 // id: item.id 170 id: selectItem.value.id
136 // } 171 }
137 // }) 172 })
138 // }) 173 })
139 // } else { 174 } else {
140 // router.push({ 175 router.push({
141 // name: 'hotelDetail', 176 name: 'hotelDetail',
142 // params: { 177 params: {
143 // hotelId: item.hotelId, 178 hotelId: selectItem.value.hotelId,
144 // }, 179 },
145 // query: { 180 query: {
146 // id: item.id 181 id: selectItem.value.id
147 // } 182 }
148 // }) 183 })
149 // } 184 }
150 } 185 }
186
187
151 </script> 188 </script>
152 189
153 <style lang="scss" scoped> 190 <style lang="scss" scoped>
......
...@@ -84,8 +84,8 @@ export default defineConfig(({mode, command}) => { ...@@ -84,8 +84,8 @@ export default defineConfig(({mode, command}) => {
84 }, 84 },
85 '/dev-api': { 85 '/dev-api': {
86 // target: 'http://192.168.1.118:8082/', 86 // target: 'http://192.168.1.118:8082/',
87 // target: 'http://192.168.1.22:8082', 87 target: 'http://192.168.1.22:8082',
88 target: 'https://tk005.wxjylt.com/stage-api', 88 // target: 'https://tk005.wxjylt.com/stage-api',
89 // target: 'http://124.70.181.90:1880/stage-api', 89 // target: 'http://124.70.181.90:1880/stage-api',
90 // target: 'https://sys.2025wtcwuxi.com/stage-api/', 90 // target: 'https://sys.2025wtcwuxi.com/stage-api/',
91 changeOrigin: true, 91 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!