Merge commit '566e93c5' into dev
Showing
8 changed files
with
428 additions
and
97 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}`, |
| ... | @@ -54,6 +72,14 @@ export function newsSubmitOrderHotel(data) { | ... | @@ -54,6 +72,14 @@ export function newsSubmitOrderHotel(data) { |
| 54 | }) | 72 | }) |
| 55 | } | 73 | } |
| 56 | 74 | ||
| 75 | export function submitOrderScenic(data) { | ||
| 76 | return request({ | ||
| 77 | url: `/ota/norder/submitOrderScenic`, | ||
| 78 | method: 'post', | ||
| 79 | data: data | ||
| 80 | }) | ||
| 81 | } | ||
| 82 | |||
| 57 | export function getRoomBilldetailbyId(params) { | 83 | export function getRoomBilldetailbyId(params) { |
| 58 | return request({ | 84 | return request({ |
| 59 | url: `/ota/orderRoom/getRoomOrderInfoByOrderId`, | 85 | url: `/ota/orderRoom/getRoomOrderInfoByOrderId`, |
| ... | @@ -221,6 +247,18 @@ export function checkRoomPayByUserId(id) { | ... | @@ -221,6 +247,18 @@ export function checkRoomPayByUserId(id) { |
| 221 | }) | 247 | }) |
| 222 | } | 248 | } |
| 223 | 249 | ||
| 250 | |||
| 251 | export function checkOrderPay(orderType) { | ||
| 252 | return request({ | ||
| 253 | url: `/ota/norder/checkNonPayment`, | ||
| 254 | method: 'get', | ||
| 255 | params: { | ||
| 256 | orderType | ||
| 257 | } | ||
| 258 | }) | ||
| 259 | } | ||
| 260 | |||
| 261 | |||
| 224 | export function submitInvoice(form) { | 262 | export function submitInvoice(form) { |
| 225 | return request({ | 263 | return request({ |
| 226 | url: `/ota/invoice`, | 264 | url: `/ota/invoice`, |
| ... | @@ -471,7 +509,7 @@ export function checkNonPayment() { | ... | @@ -471,7 +509,7 @@ export function checkNonPayment() { |
| 471 | return request({ | 509 | return request({ |
| 472 | url: `/ota/norder/checkNonPayment`, | 510 | url: `/ota/norder/checkNonPayment`, |
| 473 | method: 'get', | 511 | method: 'get', |
| 474 | params: {orderType: 5} | 512 | params: { orderType: 5 } |
| 475 | }) | 513 | }) |
| 476 | } | 514 | } |
| 477 | 515 | ||
| ... | @@ -503,11 +541,27 @@ export function aadCustomer(data) { | ... | @@ -503,11 +541,27 @@ export function aadCustomer(data) { |
| 503 | }) | 541 | }) |
| 504 | } | 542 | } |
| 505 | 543 | ||
| 544 | export function aadSceneCustomer(data) { | ||
| 545 | return request({ | ||
| 546 | url: `/ota/customer/insertSceneCustomer`, | ||
| 547 | method: 'post', | ||
| 548 | data | ||
| 549 | }) | ||
| 550 | } | ||
| 551 | |||
| 552 | export function checkSceneCustomer(data) { | ||
| 553 | return request({ | ||
| 554 | url: `/ota/orderTourist/checkDiscounts`, | ||
| 555 | method: 'post', | ||
| 556 | data | ||
| 557 | }) | ||
| 558 | } | ||
| 559 | |||
| 506 | // 删除观影人 | 560 | // 删除观影人 |
| 507 | export function delCustomer(id) { | 561 | export function delCustomer(id) { |
| 508 | return request({ | 562 | return request({ |
| 509 | url: `/ota/customer/${id}`, | 563 | url: `/ota/customer/${id}`, |
| 510 | method: 'delete', | 564 | method: 'delete' |
| 511 | }) | 565 | }) |
| 512 | } | 566 | } |
| 513 | 567 | ||
| ... | @@ -537,3 +591,20 @@ export function getTicketOrderInfo(params) { | ... | @@ -537,3 +591,20 @@ export function getTicketOrderInfo(params) { |
| 537 | params | 591 | params |
| 538 | }) | 592 | }) |
| 539 | } | 593 | } |
| 594 | |||
| 595 | export function getGateListByLasId(params) { | ||
| 596 | return request({ | ||
| 597 | url: `/ota/scenicConfig/getGateListByLasId`, | ||
| 598 | method: 'get', | ||
| 599 | params | ||
| 600 | }) | ||
| 601 | } | ||
| 602 | |||
| 603 | export function getMyFriends() { | ||
| 604 | return request({ | ||
| 605 | url: `/ota/orderTourist/getMyFriends`, | ||
| 606 | method: 'get' | ||
| 607 | }) | ||
| 608 | } | ||
| 609 | |||
| 610 | ... | ... |
This diff is collapsed.
Click to expand it.
| 1 | <template> | ||
| 2 | <el-dialog v-model="show" title="出行人信息" center append-to-body> | ||
| 3 | <el-form> | ||
| 4 | <el-form-item prop="message"> | ||
| 5 | <div class="p_box"> | ||
| 6 | <div class="people"> | ||
| 7 | <el-radio-group v-model="personId"> | ||
| 8 | <div | ||
| 9 | v-for="(it, index) in personList" :key="index" class="prople_item" | ||
| 10 | > | ||
| 11 | <el-radio :value="it.id" :disabled="hasPersonIds?.indexOf(it.id)!=-1"> | ||
| 12 | <div> | ||
| 13 | {{ it.name }} {{ it.idCard }} | ||
| 14 | </div> | ||
| 15 | </el-radio> | ||
| 16 | </div> | ||
| 17 | </el-radio-group> | ||
| 18 | </div> | ||
| 19 | <el-button @click="addPeopl">{{ languageFormat(language, "新增", "Add") }}</el-button> | ||
| 20 | </div> | ||
| 21 | </el-form-item> | ||
| 22 | </el-form> | ||
| 23 | <template #footer> | ||
| 24 | <div class="dialog-footer"> | ||
| 25 | <el-button @click="show = false">取 消</el-button> | ||
| 26 | <el-button type="primary" @click="addPerson">完成</el-button> | ||
| 27 | </div> | ||
| 28 | </template> | ||
| 29 | </el-dialog> | ||
| 30 | |||
| 31 | |||
| 32 | <el-dialog v-model="showAdd" title="新增出现人" center append-to-body> | ||
| 33 | <el-form | ||
| 34 | ref="formRef" :model="form" label-width="100px" size="large" | ||
| 35 | style="margin: 80px" | ||
| 36 | > | ||
| 37 | <el-form-item :label="language==0?'姓名':'name'" prop="name" required :show-message="false"> | ||
| 38 | <el-input v-model="form.name" :placeholder="language==0?'请输入':'Please input'" /> | ||
| 39 | </el-form-item> | ||
| 40 | <el-form-item :label="language==0?'证件类型':'ID Type'" prop="idcType" required :show-message="false"> | ||
| 41 | <el-select v-model="form.idcType" :placeholder="language==0?'请选择':'Please choose'"> | ||
| 42 | <el-option :label="language==0?'身份证':'Identity card'" value="0" /> | ||
| 43 | <el-option :label="language==0?'护照':'Passport'" value="1" /> | ||
| 44 | <el-option :label="language==0?'其他':'Other'" value="2" /> | ||
| 45 | </el-select> | ||
| 46 | </el-form-item> | ||
| 47 | <el-form-item :label="language==0?'证件号':'ID number'" prop="idCard" required :show-message="false"> | ||
| 48 | <el-input v-model="form.idCard" :placeholder="language==0?'请输入证件号':'Please enter the ID after ah'" /> | ||
| 49 | </el-form-item> | ||
| 50 | </el-form> | ||
| 51 | |||
| 52 | <template #footer> | ||
| 53 | <div class="dialog-footer"> | ||
| 54 | <el-button class="can_pay" @click="showAdd = false">{{ language == 0 ? '取 消' : 'cancel' }}</el-button> | ||
| 55 | <el-button class="pay" type="primary" @click="submit">{{ language == 0 ? '确 定' : 'confirm' }}</el-button> | ||
| 56 | </div> | ||
| 57 | </template> | ||
| 58 | </el-dialog> | ||
| 59 | |||
| 60 | </template> | ||
| 61 | |||
| 62 | <script setup> | ||
| 63 | import { aadSceneCustomer, checkSceneCustomer, getMyFriends } from '/@/apiPc/booking' | ||
| 64 | import { languageFormat } from '/@/viewsPc/seat/utils/language' | ||
| 65 | import { onMounted, ref } from 'vue' | ||
| 66 | import { useStorage } from '@vueuse/core/index' | ||
| 67 | import _ from 'lodash' | ||
| 68 | import { getCurrentInstance } from '@vue/runtime-core' | ||
| 69 | |||
| 70 | const emit = defineEmits(['addPerson']) | ||
| 71 | const { proxy } = getCurrentInstance() | ||
| 72 | |||
| 73 | const show = ref(false) | ||
| 74 | const showAdd = ref(false) | ||
| 75 | const personList = ref([]) | ||
| 76 | const personId = ref(null) | ||
| 77 | const hasPersonIds = ref(null) | ||
| 78 | const language = useStorage('language', 0) | ||
| 79 | const form = ref({}) | ||
| 80 | const formRef = ref(null) | ||
| 81 | |||
| 82 | |||
| 83 | onMounted(() => { | ||
| 84 | getData() | ||
| 85 | }) | ||
| 86 | |||
| 87 | const getData = () => { | ||
| 88 | getMyFriends().then((res) => { | ||
| 89 | personList.value = res.data | ||
| 90 | }) | ||
| 91 | } | ||
| 92 | |||
| 93 | const addPeopl = () => { | ||
| 94 | formRef.value?.resetFields() | ||
| 95 | showAdd.value = true | ||
| 96 | } | ||
| 97 | |||
| 98 | const addPerson = () => { | ||
| 99 | const person = _.find(personList.value, (it) => it.id == personId.value) | ||
| 100 | |||
| 101 | checkSceneCustomer({ | ||
| 102 | customerId: person.id, | ||
| 103 | gateType: currParams.gateType | ||
| 104 | }).then((res) => { | ||
| 105 | if (res.data == 201) { | ||
| 106 | proxy.$modal.msgError('护照只能购买成人票') | ||
| 107 | } else if (res.data == 202) { | ||
| 108 | proxy.$modal.msgError('此身份证不能购买老人票') | ||
| 109 | } else if (res.data == 203) { | ||
| 110 | proxy.$modal.msgError('此身份证不能购买儿童票') | ||
| 111 | } else { | ||
| 112 | show.value = false | ||
| 113 | emit('addPerson', Object.assign(currParams, { | ||
| 114 | customerId: person.id, | ||
| 115 | name: person.name, | ||
| 116 | idcType: person.idcType, | ||
| 117 | idCard: person.idCard | ||
| 118 | })) | ||
| 119 | } | ||
| 120 | }) | ||
| 121 | } | ||
| 122 | |||
| 123 | const submit = () => { | ||
| 124 | formRef.value.validate((valid) => { | ||
| 125 | if (valid) { | ||
| 126 | aadSceneCustomer(form.value).then(res => { | ||
| 127 | if (res.data == -100) { | ||
| 128 | proxy.$modal.msgError('人员信息已存在') | ||
| 129 | } else if (res.data == -101) { | ||
| 130 | proxy.$modal.msgError('实名认证未通过') | ||
| 131 | } else { | ||
| 132 | proxy.$modal.msgSuccess(language.value == 0 ? '添加成功' : 'successfully added') | ||
| 133 | showAdd.value = false | ||
| 134 | getData() | ||
| 135 | } | ||
| 136 | }) | ||
| 137 | } else { | ||
| 138 | proxy.$modal.msgWarning(language.value == 0 ? '请完善信息' : 'Please complete the information') | ||
| 139 | } | ||
| 140 | }) | ||
| 141 | } | ||
| 142 | |||
| 143 | let currParams | ||
| 144 | defineExpose({ | ||
| 145 | open: (params) => { | ||
| 146 | currParams = params | ||
| 147 | personId.value = params.customerId | ||
| 148 | hasPersonIds.value = params.hasCustomerIds | ||
| 149 | |||
| 150 | show.value = true | ||
| 151 | } | ||
| 152 | }) | ||
| 153 | |||
| 154 | </script> | ||
| 155 | |||
| 156 | <style scoped lang="scss"> | ||
| 157 | |||
| 158 | </style> |
| ... | @@ -163,6 +163,55 @@ | ... | @@ -163,6 +163,55 @@ |
| 163 | </el-row> | 163 | </el-row> |
| 164 | </div> | 164 | </div> |
| 165 | </div> | 165 | </div> |
| 166 | <div v-if="type == 'travel'"> | ||
| 167 | <div class="leftboderTT">{{ language == 0 ? '购票信息' : 'Ticket Information' }}</div> | ||
| 168 | <div class="border-info mt20"> | ||
| 169 | <h3>{{ matchForm.name }}</h3> | ||
| 170 | <el-row> | ||
| 171 | <el-col> | ||
| 172 | {{ language == 0 ? '地址' : 'Address' }}: | ||
| 173 | {{ matchForm.address }} | ||
| 174 | </el-col> | ||
| 175 | <el-col> | ||
| 176 | {{ | ||
| 177 | form?.extJson?.ticketType?.name | ||
| 178 | }}:{{ form?.extJson?.num }}{{ language == 0 ? '张' : 'Tickets' }} | ||
| 179 | </el-col> | ||
| 180 | <el-col> | ||
| 181 | {{ | ||
| 182 | language == 0 ? '时间' : 'Time' | ||
| 183 | }}:{{ | ||
| 184 | dayjs(form?.extJson?.ticketDate?.ticketStart).format('YYYY-MM-DD') | ||
| 185 | }}{{ | ||
| 186 | form.extJson?.ticketDate?.ticketType == 1 ? '~' + dayjs(form?.extJson?.ticketDate?.ticketEnd).format('YYYY-MM-DD') : '' | ||
| 187 | }} | ||
| 188 | </el-col> | ||
| 189 | <el-col v-if="form?.extJson?.ticketDate?.isCountSale==1"> | ||
| 190 | {{ | ||
| 191 | language == 0 ? `满${form?.extJson?.ticketDate.counts}人优惠` : `Discount for up to ${form?.extJson?.ticketDate.counts} people` | ||
| 192 | }}<span v-if="language == 0">{{ form?.extJson?.ticketDate.discount }}折</span> | ||
| 193 | <span v-else>{{ (10 - form?.extJson?.ticketDate.discount) * 10 + '%' }}off</span> | ||
| 194 | </el-col> | ||
| 195 | <!-- <el-col>--> | ||
| 196 | <!-- {{--> | ||
| 197 | <!-- language == 0 ? '原价票' : 'Cost Ticket'--> | ||
| 198 | <!-- }}:{{--> | ||
| 199 | <!-- language == 0 ? form?.extJson?.ticketDate?.price : form?.extJson?.ticketDate?.priceEn--> | ||
| 200 | <!-- }}{{ language == 0 ? '元' : 'Euro' }} x 1--> | ||
| 201 | <!-- {{ language == 0 ? '张' : 'Tickets' }}--> | ||
| 202 | <!-- </el-col>--> | ||
| 203 | <!-- <el-col>--> | ||
| 204 | <!-- {{--> | ||
| 205 | <!-- language == 0 ? '优惠票' : 'Concession Ticket'--> | ||
| 206 | <!-- }}:{{--> | ||
| 207 | <!-- language == 0 ? form?.extJson?.ticketDate?.rebatePrice : form?.extJson?.ticketDate?.rebatePriceEn--> | ||
| 208 | <!-- }}{{ language == 0 ? '元' : 'Euro' }} x 1--> | ||
| 209 | <!-- {{ language == 0 ? '张' : 'Tickets' }}--> | ||
| 210 | <!-- </el-col>--> | ||
| 211 | |||
| 212 | </el-row> | ||
| 213 | </div> | ||
| 214 | </div> | ||
| 166 | 215 | ||
| 167 | <div class="leftboderTT">{{ language == 0 ? '预订信息' : 'Booking information' }}</div> | 216 | <div class="leftboderTT">{{ language == 0 ? '预订信息' : 'Booking information' }}</div> |
| 168 | 217 | ||
| ... | @@ -328,7 +377,56 @@ | ... | @@ -328,7 +377,56 @@ |
| 328 | </el-row> | 377 | </el-row> |
| 329 | 378 | ||
| 330 | </el-row> | 379 | </el-row> |
| 380 | <el-row v-if="type == 'travel'" style="width: 100%"> | ||
| 381 | <el-row v-for="v in form.extJson?.message" style="width: 100%"> | ||
| 382 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | ||
| 383 | <div>{{ v.name }} | ||
| 384 | </div> | ||
| 385 | </el-col> | ||
| 386 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | ||
| 387 | <!-- <div>{{--> | ||
| 388 | <!-- !v.discount ? language == 0 ? '原价票' : 'Cost Ticket' : language == 0 ? '优惠票' : 'Concession Ticket'--> | ||
| 389 | <!-- }}--> | ||
| 390 | <!-- </div>--> | ||
| 391 | <div>{{ v.idCard }} | ||
| 392 | </div> | ||
| 393 | </el-col> | ||
| 394 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | ||
| 395 | <div v-if="language == 0 "> | ||
| 396 | {{ language == 0 ? '¥' : '€' }} | ||
| 397 | {{ | ||
| 398 | !v.discount ? form.extJson?.ticketDate?.price : form.extJson?.ticketDate?.rebatePrice | ||
| 399 | }} | ||
| 400 | /{{ language == 0 ? '张' : 'Tickets' }} | ||
| 401 | </div> | ||
| 402 | <div v-else> | ||
| 403 | {{ language == 0 ? '¥' : '€' }} | ||
| 404 | {{ | ||
| 405 | !v.discount ? form.extJson?.ticketDate?.priceEn : form.extJson?.ticketDate?.rebatePriceEn | ||
| 406 | }} | ||
| 407 | /{{ language == 0 ? '张' : 'Tickets' }} | ||
| 408 | </div> | ||
| 409 | </el-col> | ||
| 410 | </el-row> | ||
| 411 | <el-row style="width: 100%"> | ||
| 412 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | ||
| 413 | <div>{{ | ||
| 414 | language == 0 ? '购票数量' : 'Number of tickets purchased' | ||
| 415 | }}:{{ form.num }}{{ language == 0 ? '张' : 'Tickets' }} | ||
| 416 | </div> | ||
| 417 | </el-col> | ||
| 418 | <el-col :lg="8" :md="12" :sm="12" :xs="24">{{ | ||
| 419 | language == 0 ? '联系方式' : 'Contact Information' | ||
| 420 | }}:{{ form.phone }} | ||
| 421 | </el-col> | ||
| 422 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | ||
| 423 | {{ language == 0 ? '共计' : 'total' }}:{{ | ||
| 424 | language == 0 ? '¥' : '€' | ||
| 425 | }}{{ Number(totalFee).toFixed(2) }} | ||
| 426 | </el-col> | ||
| 427 | </el-row> | ||
| 331 | 428 | ||
| 429 | </el-row> | ||
| 332 | </div> | 430 | </div> |
| 333 | 431 | ||
| 334 | <el-row align="middle" justify="space-between"> | 432 | <el-row align="middle" justify="space-between"> | ... | ... |
| 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.
| ... | @@ -81,8 +81,8 @@ export default defineConfig(({ mode, command }) => { | ... | @@ -81,8 +81,8 @@ export default defineConfig(({ mode, command }) => { |
| 81 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') | 81 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') |
| 82 | }, | 82 | }, |
| 83 | '/dev-api': { | 83 | '/dev-api': { |
| 84 | // target: 'http://192.168.1.118:8081/', | 84 | target: 'http://192.168.1.118:8081/', |
| 85 | target: 'http://192.168.1.253:8081', | 85 | // target: 'http://192.168.1.253:8081', |
| 86 | // target: 'https://jijin.wtwuxicenter.com/stage-api', | 86 | // target: 'https://jijin.wtwuxicenter.com/stage-api', |
| 87 | // target: 'https://wdsfwuxicenter.com/stage-api/', | 87 | // target: 'https://wdsfwuxicenter.com/stage-api/', |
| 88 | changeOrigin: true, | 88 | changeOrigin: true, | ... | ... |
-
Please register or sign in to post a comment