no message
Showing
5 changed files
with
137 additions
and
95 deletions
| ... | @@ -8,6 +8,14 @@ export function getHotelList(params) { | ... | @@ -8,6 +8,14 @@ export function getHotelList(params) { |
| 8 | }) | 8 | }) |
| 9 | } | 9 | } |
| 10 | 10 | ||
| 11 | export function getScenicList(params) { | ||
| 12 | return request({ | ||
| 13 | url: `/ota/activityScenic/getScenicList`, | ||
| 14 | method: 'get', | ||
| 15 | params: params | ||
| 16 | }) | ||
| 17 | } | ||
| 18 | |||
| 11 | export function getStudioList(params) { | 19 | export function getStudioList(params) { |
| 12 | return request({ | 20 | return request({ |
| 13 | url: `/ota/studio/list`, | 21 | url: `/ota/studio/list`, |
| ... | @@ -23,6 +31,16 @@ export function getHotelById(id) { | ... | @@ -23,6 +31,16 @@ export function getHotelById(id) { |
| 23 | }) | 31 | }) |
| 24 | } | 32 | } |
| 25 | 33 | ||
| 34 | export function getScenicById(id) { | ||
| 35 | return request({ | ||
| 36 | url: `/ota/scenic/getScenicInfo`, | ||
| 37 | method: 'get', | ||
| 38 | params: { | ||
| 39 | id | ||
| 40 | } | ||
| 41 | }) | ||
| 42 | } | ||
| 43 | |||
| 26 | export function getStudioById(id) { | 44 | export function getStudioById(id) { |
| 27 | return request({ | 45 | return request({ |
| 28 | url: `/ota/studio/${id}`, | 46 | url: `/ota/studio/${id}`, |
| ... | @@ -221,6 +239,18 @@ export function checkRoomPayByUserId(id) { | ... | @@ -221,6 +239,18 @@ export function checkRoomPayByUserId(id) { |
| 221 | }) | 239 | }) |
| 222 | } | 240 | } |
| 223 | 241 | ||
| 242 | |||
| 243 | export function checkOrderPay(orderType) { | ||
| 244 | return request({ | ||
| 245 | url: `/ota/norder/checkNonPayment`, | ||
| 246 | method: 'get', | ||
| 247 | params: { | ||
| 248 | orderType | ||
| 249 | } | ||
| 250 | }) | ||
| 251 | } | ||
| 252 | |||
| 253 | |||
| 224 | export function submitInvoice(form) { | 254 | export function submitInvoice(form) { |
| 225 | return request({ | 255 | return request({ |
| 226 | url: `/ota/invoice`, | 256 | url: `/ota/invoice`, |
| ... | @@ -471,7 +501,7 @@ export function checkNonPayment() { | ... | @@ -471,7 +501,7 @@ export function checkNonPayment() { |
| 471 | return request({ | 501 | return request({ |
| 472 | url: `/ota/norder/checkNonPayment`, | 502 | url: `/ota/norder/checkNonPayment`, |
| 473 | method: 'get', | 503 | method: 'get', |
| 474 | params: {orderType: 5} | 504 | params: { orderType: 5 } |
| 475 | }) | 505 | }) |
| 476 | } | 506 | } |
| 477 | 507 | ||
| ... | @@ -507,7 +537,7 @@ export function aadCustomer(data) { | ... | @@ -507,7 +537,7 @@ export function aadCustomer(data) { |
| 507 | export function delCustomer(id) { | 537 | export function delCustomer(id) { |
| 508 | return request({ | 538 | return request({ |
| 509 | url: `/ota/customer/${id}`, | 539 | url: `/ota/customer/${id}`, |
| 510 | method: 'delete', | 540 | method: 'delete' |
| 511 | }) | 541 | }) |
| 512 | } | 542 | } |
| 513 | 543 | ||
| ... | @@ -537,3 +567,11 @@ export function getTicketOrderInfo(params) { | ... | @@ -537,3 +567,11 @@ export function getTicketOrderInfo(params) { |
| 537 | params | 567 | params |
| 538 | }) | 568 | }) |
| 539 | } | 569 | } |
| 570 | |||
| 571 | export function getGateListByLasId(params) { | ||
| 572 | return request({ | ||
| 573 | url: `/ota/scenicConfig/getGateListByLasId`, | ||
| 574 | method: 'get', | ||
| 575 | params | ||
| 576 | }) | ||
| 577 | } | ... | ... |
This diff is collapsed.
Click to expand it.
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <div class="banner"> | 3 | <div class="banner"> |
| 4 | <h2>{{ language==0?'旅游服务':'Travel Service' }}</h2> | 4 | <h2>{{ language==0?'旅游服务':'Travel Service' }}</h2> |
| 5 | </div> | 5 | </div> |
| 6 | <div class="box"> | 6 | <div class="box"> |
| 7 | <div class="searchBar"> | 7 | <div class="searchBar"> |
| 8 | <el-input :placeholder="language==0?'请输入关键字搜索':'Search'" v-model="query.name" class="no-border"> | 8 | <el-input v-model="query.name" :placeholder="language==0?'请输入关键字搜索':'Search'" class="no-border" /> |
| 9 | </el-input> | 9 | <el-button size="large" type="primary" class="btn-lineG" icon="search" @click="getList"> |
| 10 | <el-button size="large" type="primary" class="btn-lineG" icon="search" @click="getList"> | 10 | {{ language==0?'搜索':'Search' }}</el-button> |
| 11 | {{ language==0?'搜索':'Search' }}</el-button> | 11 | </div> |
| 12 | </div> | 12 | </div> |
| 13 | </div> | ||
| 14 | 13 | ||
| 15 | <div class="box" v-loading="loading"> | 14 | <div v-loading="loading" class="box"> |
| 16 | <el-row :gutter="20"> | 15 | <el-row :gutter="20"> |
| 17 | <el-col :lg="24" :md="24" :sm="24" :xs="24" :xl="24" v-for="(h,index) in list" class="mb20"> | 16 | <el-col |
| 18 | <el-card @click="goDetail(h)"> | 17 | v-for="(h,index) in list" :lg="24" :md="24" :sm="24" :xs="24" |
| 19 | <!-- 酒店列表--> | 18 | :xl="24" class="mb20" |
| 20 | <el-row class="hotel" align="middle" :gutter="20"> | 19 | > |
| 21 | <el-col :span="6"> | 20 | <el-card> |
| 22 | <div class="imgbox"> | 21 | <!-- 酒店列表--> |
| 23 | <img class="w100" :src="fillImgUrl(h.photos?.split(',')[0])"/> | 22 | <el-row class="hotel" align="middle" :gutter="20"> |
| 24 | </div> | 23 | <el-col :span="6"> |
| 25 | </el-col> | 24 | <div class="imgbox"> |
| 26 | <el-col :span="12"> | 25 | <img class="w100" :src="fillImgUrl(h.photos?.split(',')[0])"> |
| 27 | <h3 class="esp">{{h.name}}</h3> | 26 | </div> |
| 28 | <div class="starBox"> | 27 | </el-col> |
| 29 | <img v-for="i in Number(h.starLevel||0)" src="@/assets/booking/star.png"> | 28 | <el-col :span="12"> |
| 30 | </div> | 29 | <h3 class="esp">{{ h.name }}</h3> |
| 31 | <div class="tagbox esp"> | 30 | <div class="starBox"> |
| 32 | <span v-for="(t,index) in h.label?.split(',')" v-show="index<4">{{t}}</span> | 31 | <img v-for="i in Number(h.rank||0)" src="@/assets/booking/star.png"> |
| 33 | <a v-show="h.label?.split(',').length>4">{{ language==0?'更多':'MORE' }} ></a> | 32 | </div> |
| 34 | </div> | 33 | |
| 35 | <p class="esp addr mt20"> | 34 | <p class="esp addr mt20"> |
| 36 | <el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><LocationFilled /></el-icon> | 35 | <el-icon size="16" style="position: relative;top: 2px" color="#929AA0"> |
| 37 | {{h.address}} | 36 | <Clock /> |
| 38 | </p> | 37 | </el-icon> |
| 39 | </el-col> | 38 | <span class="ml5">{{ language == 0 ? '开园时间' : 'Opening Time' }}:{{ h.startTime }} ~ {{ h.workTime }}</span> |
| 40 | <el-col :span="4" class="text-right"> | 39 | </p> |
| 41 | <div class="price">{{ language==0?'¥':'€' }}<span>{{ h.price }}</span> | 40 | <p class="esp addr mt20"> |
| 42 | <i v-if="language==0">起</i> | 41 | <el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><LocationFilled /></el-icon> |
| 43 | </div> | 42 | {{ h.address }} |
| 44 | <el-button class="btn-lineG w200px" round type="primary" >{{ language==0?'立即预订':'Select' }} ⇀</el-button> | 43 | </p> |
| 45 | </el-col> | 44 | </el-col> |
| 46 | </el-row> | 45 | <el-col :span="4" class="text-right"> |
| 47 | </el-card> | 46 | <div class="price">{{ language==0?'¥':'€' }}<span>{{ h.price }}</span> |
| 48 | </el-col> | 47 | <i v-if="language==0">起</i> |
| 49 | </el-row> | 48 | </div> |
| 50 | <el-empty v-show="!loading&&list.length==0" :image="`/img/order_no.png`" :image-size="228" description="" /> | 49 | <el-button class="btn-lineG w200px" round type="primary" @click="goDetail(h)">{{ language==0?'立即预订':'Select' }} ⇀</el-button> |
| 51 | <div style="height: 50px"></div> | 50 | </el-col> |
| 51 | </el-row> | ||
| 52 | </el-card> | ||
| 53 | </el-col> | ||
| 54 | </el-row> | ||
| 55 | <el-empty v-show="!loading&&list.length==0" :image="`/img/order_no.png`" :image-size="228" description="" /> | ||
| 56 | <div style="height: 50px" /> | ||
| 57 | </div> | ||
| 52 | </div> | 58 | </div> |
| 53 | </div> | ||
| 54 | </template> | 59 | </template> |
| 55 | 60 | ||
| 56 | <script setup> | 61 | <script setup> |
| 57 | import {onMounted} from "@vue/runtime-core" | 62 | import { onMounted } from '@vue/runtime-core' |
| 58 | import * as booking from "@/apiPc/booking" | 63 | import * as booking from '@/apiPc/booking' |
| 59 | import {useRouter,useRoute} from "vue-router"; | 64 | import { useRouter, useRoute } from 'vue-router' |
| 60 | import {useStorage} from "@vueuse/core/index"; | 65 | import { useStorage } from '@vueuse/core/index' |
| 61 | import useUserStore from "@/store/modules/user"; | 66 | import useUserStore from '@/store/modules/user' |
| 62 | const router = useRouter() | ||
| 63 | const route = useRoute() | ||
| 64 | const user = useUserStore().user | ||
| 65 | const useStore = useUserStore | ||
| 66 | const language= useStorage('language',0) | ||
| 67 | const query = ref({ | ||
| 68 | name:'' | ||
| 69 | }) | ||
| 70 | const cptId = ref('') | ||
| 71 | const list = ref([]) | ||
| 72 | const loading = ref(false) | ||
| 73 | onMounted(()=>{ | ||
| 74 | query.value.activityId = route.params.cptId | ||
| 75 | getList() | ||
| 76 | }) | ||
| 77 | 67 | ||
| 78 | function getList() { | 68 | const router = useRouter() |
| 79 | loading.value = true | 69 | const route = useRoute() |
| 80 | booking.getHotelList(query.value).then(res=>{ | 70 | const user = useUserStore().user |
| 81 | list.value = res.rows | 71 | const useStore = useUserStore |
| 82 | loading.value = false | 72 | const language = useStorage('language', 0) |
| 83 | console.log(list.value) | 73 | const query = ref({ |
| 74 | name: '' | ||
| 75 | }) | ||
| 76 | const cptId = ref('') | ||
| 77 | const list = ref([]) | ||
| 78 | const loading = ref(false) | ||
| 79 | onMounted(() => { | ||
| 80 | query.value.activityId = route.params.cptId | ||
| 81 | getList() | ||
| 82 | }) | ||
| 84 | 83 | ||
| 85 | }).catch(e=>{ | 84 | function getList() { |
| 86 | loading.value = false | 85 | loading.value = true |
| 87 | }) | 86 | booking.getScenicList(query.value).then(res => { |
| 87 | list.value = res.rows | ||
| 88 | loading.value = false | ||
| 89 | console.log(list.value) | ||
| 90 | }).catch(e => { | ||
| 91 | loading.value = false | ||
| 92 | }) | ||
| 93 | } | ||
| 94 | function goDetail(item) { | ||
| 95 | if (!user) { | ||
| 96 | useStore().setVisitor() | ||
| 97 | return | ||
| 88 | } | 98 | } |
| 89 | function goDetail(item) { | 99 | router.push({ |
| 90 | if(!user){ | 100 | name: 'travelDetail', |
| 91 | useStore().setVisitor() | 101 | params: { |
| 92 | return | 102 | scenicId: item.scenicId |
| 103 | }, | ||
| 104 | query: { | ||
| 105 | lasId: item.id | ||
| 93 | } | 106 | } |
| 94 | router.push({ | 107 | }) |
| 95 | name:'travelDetail', | 108 | } |
| 96 | params:{ | ||
| 97 | hotelId:item.hotelId, | ||
| 98 | }, | ||
| 99 | query:{ | ||
| 100 | id:item.id | ||
| 101 | } | ||
| 102 | |||
| 103 | }) | ||
| 104 | } | ||
| 105 | </script> | 109 | </script> |
| 106 | 110 | ||
| 107 | <style scoped lang="scss"> | 111 | <style scoped lang="scss"> | ... | ... |
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment