酒店
Showing
3 changed files
with
56 additions
and
42 deletions
| ... | @@ -6,23 +6,23 @@ | ... | @@ -6,23 +6,23 @@ |
| 6 | </div> | 6 | </div> |
| 7 | <div class="box"> | 7 | <div class="box"> |
| 8 | <div class="searchBar"> | 8 | <div class="searchBar"> |
| 9 | <el-input :placeholder="language==0?'请输入关键字搜索':'Search'" v-model="query.name" class="no-border"> | 9 | <el-input v-model="query.name" :placeholder="language==0?'请输入关键字搜索':'Search'" class="no-border"> |
| 10 | </el-input> | 10 | </el-input> |
| 11 | <el-button size="large" type="primary" class="btn-lineG" icon="search" @click="getList"> | 11 | <el-button class="btn-lineG" icon="search" size="large" type="primary" @click="getList"> |
| 12 | {{ language == 0 ? '搜索' : 'Search' }} | 12 | {{ language == 0 ? '搜索' : 'Search' }} |
| 13 | </el-button> | 13 | </el-button> |
| 14 | </div> | 14 | </div> |
| 15 | </div> | 15 | </div> |
| 16 | 16 | ||
| 17 | <div class="box" v-loading="loading"> | 17 | <div v-loading="loading" class="box"> |
| 18 | <el-row :gutter="20"> | 18 | <el-row :gutter="20"> |
| 19 | <el-col :lg="24" :md="24" :sm="24" :xs="24" :xl="24" v-for="(h,index) in list" class="mb20"> | 19 | <el-col v-for="(h,index) in list" :lg="24" :md="24" :sm="24" :xl="24" :xs="24" class="mb20"> |
| 20 | <el-card @click="goDetail(h)"> | 20 | <el-card @click="goDetail(h)"> |
| 21 | <!-- 酒店列表--> | 21 | <!-- 酒店列表--> |
| 22 | <el-row class="hotel" align="middle" :gutter="20"> | 22 | <el-row :gutter="20" align="middle" class="hotel"> |
| 23 | <el-col :lg="6" :md="6"> | 23 | <el-col :lg="6" :md="6"> |
| 24 | <div class="imgbox"> | 24 | <div class="imgbox"> |
| 25 | <img class="w100" :src="fillImgUrl(h.photos?.split(',')[0])"/> | 25 | <img :src="fillImgUrl(h.photos?.split(',')[0])" class="w100"/> |
| 26 | </div> | 26 | </div> |
| 27 | </el-col> | 27 | </el-col> |
| 28 | <el-col :lg="12" :md="12"> | 28 | <el-col :lg="12" :md="12"> |
| ... | @@ -35,7 +35,7 @@ | ... | @@ -35,7 +35,7 @@ |
| 35 | <a v-show="h.label?.split(',').length>4">{{ language == 0 ? '更多' : 'MORE' }} ></a> | 35 | <a v-show="h.label?.split(',').length>4">{{ language == 0 ? '更多' : 'MORE' }} ></a> |
| 36 | </div> | 36 | </div> |
| 37 | <p class="esp addr mt20"> | 37 | <p class="esp addr mt20"> |
| 38 | <el-icon size="16" style="position: relative;top: 2px" color="#929AA0"> | 38 | <el-icon color="#929AA0" size="16" style="position: relative;top: 2px"> |
| 39 | <LocationFilled/> | 39 | <LocationFilled/> |
| 40 | </el-icon> | 40 | </el-icon> |
| 41 | {{ h.address }} | 41 | {{ h.address }} |
| ... | @@ -74,7 +74,7 @@ const route = useRoute() | ... | @@ -74,7 +74,7 @@ const route = useRoute() |
| 74 | const useStore = useUserStore() | 74 | const useStore = useUserStore() |
| 75 | const user = useStore.user | 75 | const user = useStore.user |
| 76 | 76 | ||
| 77 | const flag = useRouteQuery('flag') | 77 | // const flag = useRouteQuery('flag') |
| 78 | 78 | ||
| 79 | const language = useStorage('language', 0) | 79 | const language = useStorage('language', 0) |
| 80 | const query = ref({ | 80 | const query = ref({ |
| ... | @@ -90,9 +90,7 @@ onMounted(() => { | ... | @@ -90,9 +90,7 @@ onMounted(() => { |
| 90 | 90 | ||
| 91 | function getList() { | 91 | function getList() { |
| 92 | loading.value = true | 92 | loading.value = true |
| 93 | booking.getHotelList(Object.assign({ | 93 | booking.getHotelList(Object.assign({}, query.value)).then(res => { |
| 94 | meeting: flag.value, | ||
| 95 | },query.value)).then(res => { | ||
| 96 | list.value = res.rows | 94 | list.value = res.rows |
| 97 | loading.value = false | 95 | loading.value = false |
| 98 | console.log(list.value) | 96 | console.log(list.value) |
| ... | @@ -107,24 +105,7 @@ function goDetail(item) { | ... | @@ -107,24 +105,7 @@ function goDetail(item) { |
| 107 | useStore.setVisitor() | 105 | useStore.setVisitor() |
| 108 | return | 106 | return |
| 109 | } | 107 | } |
| 110 | if (item.meeting == '1') { | 108 | |
| 111 | ElMessageBox.confirm(item.meetText, '', { | ||
| 112 | cancelButtonText: language.value == 1 ? 'Close ' : '关闭', | ||
| 113 | confirmButtonText: language.value == 1 ? 'Continue to book' : '继续预订', | ||
| 114 | dangerouslyUseHTMLString: true, | ||
| 115 | type: 'warning', | ||
| 116 | }).then((res) => { | ||
| 117 | router.push({ | ||
| 118 | name: 'hotelDetail', | ||
| 119 | params: { | ||
| 120 | hotelId: item.hotelId, | ||
| 121 | }, | ||
| 122 | query: { | ||
| 123 | id: item.id | ||
| 124 | } | ||
| 125 | }) | ||
| 126 | }) | ||
| 127 | } else { | ||
| 128 | router.push({ | 109 | router.push({ |
| 129 | name: 'hotelDetail', | 110 | name: 'hotelDetail', |
| 130 | params: { | 111 | params: { |
| ... | @@ -134,11 +115,39 @@ function goDetail(item) { | ... | @@ -134,11 +115,39 @@ function goDetail(item) { |
| 134 | id: item.id | 115 | id: item.id |
| 135 | } | 116 | } |
| 136 | }) | 117 | }) |
| 137 | } | 118 | |
| 119 | // if (item.meeting == '1') { | ||
| 120 | // ElMessageBox.confirm(item.meetText, '', { | ||
| 121 | // cancelButtonText: language.value == 1 ? 'Close ' : '关闭', | ||
| 122 | // confirmButtonText: language.value == 1 ? 'Continue to book' : '继续预订', | ||
| 123 | // dangerouslyUseHTMLString: true, | ||
| 124 | // type: 'warning', | ||
| 125 | // }).then((res) => { | ||
| 126 | // router.push({ | ||
| 127 | // name: 'hotelDetail', | ||
| 128 | // params: { | ||
| 129 | // hotelId: item.hotelId, | ||
| 130 | // }, | ||
| 131 | // query: { | ||
| 132 | // id: item.id | ||
| 133 | // } | ||
| 134 | // }) | ||
| 135 | // }) | ||
| 136 | // } else { | ||
| 137 | // router.push({ | ||
| 138 | // name: 'hotelDetail', | ||
| 139 | // params: { | ||
| 140 | // hotelId: item.hotelId, | ||
| 141 | // }, | ||
| 142 | // query: { | ||
| 143 | // id: item.id | ||
| 144 | // } | ||
| 145 | // }) | ||
| 146 | // } | ||
| 138 | } | 147 | } |
| 139 | </script> | 148 | </script> |
| 140 | 149 | ||
| 141 | <style scoped lang="scss"> | 150 | <style lang="scss" scoped> |
| 142 | .hotel { | 151 | .hotel { |
| 143 | h3 { | 152 | h3 { |
| 144 | margin: 0 0 10px; | 153 | margin: 0 0 10px; | ... | ... |
| ... | @@ -216,13 +216,15 @@ function popRemark(type) { | ... | @@ -216,13 +216,15 @@ function popRemark(type) { |
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | 218 | ||
| 219 | const params = { | 219 | // const params = { |
| 220 | matchId: props.matchId, | 220 | // matchId: props.matchId, |
| 221 | title: language.value == 0 ? '预订说明' : 'Booking Instructions', | 221 | // title: language.value == 0 ? '预订说明' : 'Booking Instructions', |
| 222 | type: type, | 222 | // type: type, |
| 223 | cptName: props.cptName | 223 | // cptName: props.cptName |
| 224 | } | 224 | // } |
| 225 | proxy.$refs['orderRemarkRef'].open(params) | 225 | // proxy.$refs['orderRemarkRef'].open(params) |
| 226 | |||
| 227 | goBooking(type) | ||
| 226 | } | 228 | } |
| 227 | 229 | ||
| 228 | function goBooking(n, f) { | 230 | function goBooking(n, f) { |
| ... | @@ -238,7 +240,10 @@ function goBooking(n, f) { | ... | @@ -238,7 +240,10 @@ function goBooking(n, f) { |
| 238 | break; | 240 | break; |
| 239 | case 1: | 241 | case 1: |
| 240 | //酒店 | 242 | //酒店 |
| 241 | router.push({path: `/booking/hotel/${props.matchId}`, query: {flag: f}}) | 243 | router.push({ |
| 244 | path: `/booking/hotel/${props.matchId}` | ||
| 245 | // , query: {flag: f} | ||
| 246 | }) | ||
| 242 | break; | 247 | break; |
| 243 | case 2: | 248 | case 2: |
| 244 | //车辆 | 249 | //车辆 | ... | ... |
| ... | @@ -76,8 +76,8 @@ export default defineConfig(({mode, command}) => { | ... | @@ -76,8 +76,8 @@ export default defineConfig(({mode, command}) => { |
| 76 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-match/, '') | 76 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-match/, '') |
| 77 | }, | 77 | }, |
| 78 | '/dev-api/ztx-webSite': { | 78 | '/dev-api/ztx-webSite': { |
| 79 | target: 'http://192.168.1.118:8082/', | 79 | // target: 'http://192.168.1.118:8082/', |
| 80 | // target: 'https://ces.2025wtcwuxi.com/stage-api/', | 80 | target: 'https://ces.2025wtcwuxi.com/stage-api/', |
| 81 | changeOrigin: true, | 81 | changeOrigin: true, |
| 82 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') | 82 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') |
| 83 | }, | 83 | }, |
| ... | @@ -86,7 +86,7 @@ export default defineConfig(({mode, command}) => { | ... | @@ -86,7 +86,7 @@ export default defineConfig(({mode, command}) => { |
| 86 | // target: 'http://192.168.1.131:8081/', | 86 | // target: 'http://192.168.1.131:8081/', |
| 87 | // target: 'https://ces.2025wtcwuxi.com/stage-api/', | 87 | // target: 'https://ces.2025wtcwuxi.com/stage-api/', |
| 88 | // target: 'http://124.70.181.90:1880/stage-api', | 88 | // target: 'http://124.70.181.90:1880/stage-api', |
| 89 | // target: 'https://wdsfwuxicenter.com/stage-api/', | 89 | target: 'https://sys.2025wtcwuxi.com/stage-api/', |
| 90 | changeOrigin: true, | 90 | changeOrigin: true, |
| 91 | rewrite: (p) => p.replace(/^\/dev-api/, '') | 91 | rewrite: (p) => p.replace(/^\/dev-api/, '') |
| 92 | }, | 92 | }, | ... | ... |
-
Please register or sign in to post a comment