Merge commit 'e7e88867' into dev
Showing
17 changed files
with
396 additions
and
186 deletions
| ... | @@ -105,5 +105,14 @@ export function delByCard(card) { | ... | @@ -105,5 +105,14 @@ export function delByCard(card) { |
| 105 | method: 'delete' | 105 | method: 'delete' |
| 106 | }) | 106 | }) |
| 107 | } | 107 | } |
| 108 | export function addPickup(data) { | ||
| 109 | return request({ | ||
| 110 | url: `/league/pickup`, | ||
| 111 | method: 'post', | ||
| 112 | data | ||
| 113 | }) | ||
| 114 | } | ||
| 115 | |||
| 116 | |||
| 108 | 117 | ||
| 109 | 118 | ... | ... |
| ... | @@ -576,6 +576,18 @@ export const constantRoutes = [ | ... | @@ -576,6 +576,18 @@ export const constantRoutes = [ |
| 576 | component: () => import('@/viewsPc/seat/people-manage'), | 576 | component: () => import('@/viewsPc/seat/people-manage'), |
| 577 | meta: { title: '观影人管理' } | 577 | meta: { title: '观影人管理' } |
| 578 | }, | 578 | }, |
| 579 | { | ||
| 580 | path: 'payTicketOk', | ||
| 581 | component: () => import('@/viewsPc/seat/payticketOk.vue'), | ||
| 582 | name: 'payTicketOk', | ||
| 583 | meta: { title: '支付成功'} | ||
| 584 | }, | ||
| 585 | { | ||
| 586 | path: 'payTicketLoser', | ||
| 587 | component: () => import('@/viewsPc/seat/payticketLoser.vue'), | ||
| 588 | name: 'payTicketLoser', | ||
| 589 | meta: { title: '支付失败'} | ||
| 590 | }, | ||
| 579 | ] | 591 | ] |
| 580 | } | 592 | } |
| 581 | ] | 593 | ] |
| ... | @@ -595,6 +607,7 @@ export const constantRoutes = [ | ... | @@ -595,6 +607,7 @@ export const constantRoutes = [ |
| 595 | name: 'payOk', | 607 | name: 'payOk', |
| 596 | meta: { title: '支付成功'} | 608 | meta: { title: '支付成功'} |
| 597 | }, | 609 | }, |
| 610 | |||
| 598 | { | 611 | { |
| 599 | path: 'commitDone/:orderId', | 612 | path: 'commitDone/:orderId', |
| 600 | component: () => import('@/viewsPc/match/commitDone'), | 613 | component: () => import('@/viewsPc/match/commitDone'), | ... | ... |
| ... | @@ -114,7 +114,7 @@ function popRemark(type) { | ... | @@ -114,7 +114,7 @@ function popRemark(type) { |
| 114 | || (form.value.isFoodView == 0 && type == '3') | 114 | || (form.value.isFoodView == 0 && type == '3') |
| 115 | || (form.value.isMealView == 0 && type == '4') | 115 | || (form.value.isMealView == 0 && type == '4') |
| 116 | || (form.value.isPhotoView == 0 && type == '5') | 116 | || (form.value.isPhotoView == 0 && type == '5') |
| 117 | || (type == '0') | 117 | // || (type == '0') |
| 118 | ) { | 118 | ) { |
| 119 | building() | 119 | building() |
| 120 | return | 120 | return | ... | ... |
src/viewsPc/components/pickup.vue
0 → 100644
This diff is collapsed.
Click to expand it.
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <index-Ch v-if="language ==0" @pop="openMaster"/> | 3 | <index-Ch v-if="language ==0" @pop="openMaster" @pickup="openPickup"/> |
| 4 | <index-En v-else @pop="openMaster"/> | 4 | <index-En v-else @pop="openMaster" @pickup="openPickup"/> |
| 5 | <div v-if="showgg" class="fixed_gg"> | 5 | <div v-if="showgg" class="fixed_gg"> |
| 6 | <!--天气--> | 6 | <!--天气--> |
| 7 | <el-icon class="cclose" @click.stop="showgg=false"><circle-close /></el-icon> | 7 | <el-icon class="cclose" @click.stop="showgg=false"><circle-close /></el-icon> |
| ... | @@ -61,6 +61,7 @@ | ... | @@ -61,6 +61,7 @@ |
| 61 | </div> | 61 | </div> |
| 62 | 62 | ||
| 63 | <dialog-master-class ref="masterClassRef"/> | 63 | <dialog-master-class ref="masterClassRef"/> |
| 64 | <pickup ref="pickupRef"></pickup> | ||
| 64 | </div> | 65 | </div> |
| 65 | 66 | ||
| 66 | </template> | 67 | </template> |
| ... | @@ -70,6 +71,7 @@ import IndexCh from '/src/viewsPc/index' | ... | @@ -70,6 +71,7 @@ import IndexCh from '/src/viewsPc/index' |
| 70 | import IndexEn from '/src/viewsPc/index_en' | 71 | import IndexEn from '/src/viewsPc/index_en' |
| 71 | import WeatherIcon from '@/viewsPc/components/weatherIcon' | 72 | import WeatherIcon from '@/viewsPc/components/weatherIcon' |
| 72 | import DialogMasterClass from '@/viewsPc/components/masterClass' | 73 | import DialogMasterClass from '@/viewsPc/components/masterClass' |
| 74 | import pickup from '@/viewsPc/components/pickup' | ||
| 73 | import {useStorage} from "@vueuse/core/index"; | 75 | import {useStorage} from "@vueuse/core/index"; |
| 74 | import {ref} from "vue"; | 76 | import {ref} from "vue"; |
| 75 | import {getWeather} from "@/apiPc/webSite"; | 77 | import {getWeather} from "@/apiPc/webSite"; |
| ... | @@ -103,6 +105,15 @@ const openMaster = (params) => { | ... | @@ -103,6 +105,15 @@ const openMaster = (params) => { |
| 103 | } | 105 | } |
| 104 | proxy.$refs['masterClassRef'].open(obj) | 106 | proxy.$refs['masterClassRef'].open(obj) |
| 105 | } | 107 | } |
| 108 | |||
| 109 | const openPickup= (params) => { | ||
| 110 | console.log(params) | ||
| 111 | const obj = { | ||
| 112 | title:'接送机服务', | ||
| 113 | cptId:params.cptId | ||
| 114 | } | ||
| 115 | proxy.$refs['pickupRef'].open(obj) | ||
| 116 | } | ||
| 106 | </script> | 117 | </script> |
| 107 | 118 | ||
| 108 | <style scoped lang="scss"> | 119 | <style scoped lang="scss"> | ... | ... |
| ... | @@ -95,6 +95,11 @@ | ... | @@ -95,6 +95,11 @@ |
| 95 | </a> | 95 | </a> |
| 96 | <!-- <el-button type="primary" @click="popMaster">青少年公益课</el-button>--> | 96 | <!-- <el-button type="primary" @click="popMaster">青少年公益课</el-button>--> |
| 97 | <a class="zn-btn ml20 btn-q" @click="popMaster">青少年公益课报名</a> | 97 | <a class="zn-btn ml20 btn-q" @click="popMaster">青少年公益课报名</a> |
| 98 | |||
| 99 | <div> | ||
| 100 | <a class="ding" @click="handlePickup">接/送机服务</a> | ||
| 101 | </div> | ||
| 102 | |||
| 98 | </div> | 103 | </div> |
| 99 | </el-col> | 104 | </el-col> |
| 100 | <el-col :sm="24" :lg="14"> | 105 | <el-col :sm="24" :lg="14"> |
| ... | @@ -377,7 +382,7 @@ const navigationPic = ref({ | ... | @@ -377,7 +382,7 @@ const navigationPic = ref({ |
| 377 | }) | 382 | }) |
| 378 | const router = useRouter() | 383 | const router = useRouter() |
| 379 | const {proxy} = getCurrentInstance() | 384 | const {proxy} = getCurrentInstance() |
| 380 | const emit = defineEmits(['pop']) | 385 | const emit = defineEmits(['pop','pickup']) |
| 381 | const time = ref(0) | 386 | const time = ref(0) |
| 382 | const personList = ref([ | 387 | const personList = ref([ |
| 383 | { name: 'Wolfgang Eliasch', pp: '拉丁舞裁判长 奥地利', src: '/img/1.png' }, | 388 | { name: 'Wolfgang Eliasch', pp: '拉丁舞裁判长 奥地利', src: '/img/1.png' }, |
| ... | @@ -500,6 +505,13 @@ const popMaster = () => { | ... | @@ -500,6 +505,13 @@ const popMaster = () => { |
| 500 | emit('pop',params) | 505 | emit('pop',params) |
| 501 | } | 506 | } |
| 502 | 507 | ||
| 508 | const handlePickup=()=>{ | ||
| 509 | const params={ | ||
| 510 | cptId :matchData.value.id | ||
| 511 | } | ||
| 512 | emit('pickup',params) | ||
| 513 | } | ||
| 514 | |||
| 503 | </script> | 515 | </script> |
| 504 | 516 | ||
| 505 | <style scoped lang="scss"> | 517 | <style scoped lang="scss"> |
| ... | @@ -970,4 +982,17 @@ const popMaster = () => { | ... | @@ -970,4 +982,17 @@ const popMaster = () => { |
| 970 | background: linear-gradient(-90deg, #8623FC, #453DEA) !important; | 982 | background: linear-gradient(-90deg, #8623FC, #453DEA) !important; |
| 971 | } | 983 | } |
| 972 | 984 | ||
| 985 | .ding{ | ||
| 986 | position: fixed; | ||
| 987 | right: 0px; | ||
| 988 | z-index:99; | ||
| 989 | top: 40%; | ||
| 990 | background: linear-gradient(-90deg, #8623FC, #453DEA) !important; | ||
| 991 | box-shadow: none; | ||
| 992 | color: #fff; | ||
| 993 | border-radius: 10px; | ||
| 994 | padding: 20px; | ||
| 995 | width: 192px; | ||
| 996 | text-align: center; | ||
| 997 | } | ||
| 973 | </style> | 998 | </style> | ... | ... |
| ... | @@ -88,11 +88,17 @@ | ... | @@ -88,11 +88,17 @@ |
| 88 | <div style="margin-bottom: 30px"> | 88 | <div style="margin-bottom: 30px"> |
| 89 | <a class="zn-btn" style="font-size: 15px" @click="goGuide">GUIDELINE<el-icon><download /></el-icon> | 89 | <a class="zn-btn" style="font-size: 15px" @click="goGuide">GUIDELINE<el-icon><download /></el-icon> |
| 90 | </a> | 90 | </a> |
| 91 | <a class="zn-btn ml20 btn-q" style="font-size: 15px" @click="popMaster">Junior &Youth Camp REGISTER<el-icon><Edit /></el-icon> | 91 | <a class="zn-btn ml20 btn-q" style="font-size: 15px;margin-right: 20px" @click="popMaster">Junior &Youth Camp REGISTER<el-icon><Edit /></el-icon> |
| 92 | </a> | ||
| 93 | |||
| 94 | <div> | ||
| 95 | <a class=" ding" style="font-size: 15px;margin-top: 10px" @click="handlePickup">Pick-up/drop-off service | ||
| 92 | </a> | 96 | </a> |
| 93 | </div> | 97 | </div> |
| 94 | 98 | ||
| 95 | </div> | 99 | </div> |
| 100 | |||
| 101 | </div> | ||
| 96 | </el-col> | 102 | </el-col> |
| 97 | <el-col :sm="24" :lg="14"> | 103 | <el-col :sm="24" :lg="14"> |
| 98 | <HomeQuick :match-id="matchData?.id"/> | 104 | <HomeQuick :match-id="matchData?.id"/> |
| ... | @@ -508,6 +514,13 @@ const popMaster = () => { | ... | @@ -508,6 +514,13 @@ const popMaster = () => { |
| 508 | } | 514 | } |
| 509 | emit('pop',params) | 515 | emit('pop',params) |
| 510 | } | 516 | } |
| 517 | |||
| 518 | const handlePickup=()=>{ | ||
| 519 | const params={ | ||
| 520 | cptId :matchData.value.id | ||
| 521 | } | ||
| 522 | emit('pickup',params) | ||
| 523 | } | ||
| 511 | </script> | 524 | </script> |
| 512 | 525 | ||
| 513 | <style scoped lang="scss"> | 526 | <style scoped lang="scss"> |
| ... | @@ -834,4 +847,17 @@ const popMaster = () => { | ... | @@ -834,4 +847,17 @@ const popMaster = () => { |
| 834 | border-radius: 100px; | 847 | border-radius: 100px; |
| 835 | background: linear-gradient(-90deg, #8623FC, #453DEA) !important; | 848 | background: linear-gradient(-90deg, #8623FC, #453DEA) !important; |
| 836 | } | 849 | } |
| 850 | |||
| 851 | .ding{ | ||
| 852 | position: fixed; | ||
| 853 | right:0px; | ||
| 854 | z-index:99; | ||
| 855 | top: 40%; | ||
| 856 | background: linear-gradient(-90deg, #8623FC, #453DEA) !important; | ||
| 857 | box-shadow: none; | ||
| 858 | color: #fff; | ||
| 859 | border-radius: 10px; | ||
| 860 | //height: 100px; | ||
| 861 | padding: 20px; | ||
| 862 | } | ||
| 837 | </style> | 863 | </style> | ... | ... |
| ... | @@ -135,7 +135,7 @@ function popRemark(type) { | ... | @@ -135,7 +135,7 @@ function popRemark(type) { |
| 135 | || ( type == '3') | 135 | || ( type == '3') |
| 136 | || (form.value.isMealView == 0 && type == '4') | 136 | || (form.value.isMealView == 0 && type == '4') |
| 137 | || (type == '5') | 137 | || (type == '5') |
| 138 | || (type == '0') | 138 | // || (type == '0') |
| 139 | ) | 139 | ) |
| 140 | { | 140 | { |
| 141 | building() | 141 | building() | ... | ... |
| ... | @@ -49,3 +49,6 @@ export const getOrderDetail = (data) => | ... | @@ -49,3 +49,6 @@ export const getOrderDetail = (data) => |
| 49 | /** 检查是否支付成功 */ | 49 | /** 检查是否支付成功 */ |
| 50 | export const checkPaySuccess = (data) => | 50 | export const checkPaySuccess = (data) => |
| 51 | request("POST", `/api/order/checkOrderIsPay/${data.orderSn}`, data); | 51 | request("POST", `/api/order/checkOrderIsPay/${data.orderSn}`, data); |
| 52 | /** 检查是否支付成功 */ | ||
| 53 | export const payCallback = (data) => | ||
| 54 | request("POST", `/api/order/palPayTicket/callback/`, data); | ... | ... |
| 1 | <script setup> | ||
| 2 | import { confirmOrder } from "./api/index.js"; | ||
| 3 | import { ElMessage } from "element-plus"; | ||
| 4 | import { payOrder, viewPeopleList, checkPaySuccess } from "./api/index.js"; | ||
| 5 | import qrCodeDialog from "./components/qrCodeDialog.vue"; | ||
| 6 | import qrcode from "qrcode"; | ||
| 7 | import { languageFormat } from "./utils/language.js"; | ||
| 8 | import { useStorage } from "@vueuse/core/index"; | ||
| 9 | const language = useStorage("language", 0); | ||
| 10 | |||
| 11 | const route = useRoute(); | ||
| 12 | const router = useRouter(); | ||
| 13 | |||
| 14 | const props = defineProps({ | ||
| 15 | activityId: [String, Number], | ||
| 16 | }); | ||
| 17 | |||
| 18 | let timer = null; | ||
| 19 | const startCheckSuccessListener = (orderSn, actId) => { | ||
| 20 | timer = setInterval(() => { | ||
| 21 | checkPaySuccess({ orderSn }).then((res) => { | ||
| 22 | if (res.data) { | ||
| 23 | clearInterval(timer); | ||
| 24 | timer = null; | ||
| 25 | // 支付成功 | ||
| 26 | payment.showCodeDialog = false; | ||
| 27 | ElMessage({ | ||
| 28 | type: "success", | ||
| 29 | message: languageFormat( | ||
| 30 | language.value, | ||
| 31 | "支付成功", | ||
| 32 | "Payment succeeded" | ||
| 33 | ), | ||
| 34 | }); | ||
| 35 | router.replace({ | ||
| 36 | path: "/seat/order", | ||
| 37 | }); | ||
| 38 | } else { | ||
| 39 | return false; | ||
| 40 | } | ||
| 41 | }); | ||
| 42 | }, 3000); | ||
| 43 | }; | ||
| 44 | |||
| 45 | const payment = reactive({ | ||
| 46 | showCodeDialog: false, | ||
| 47 | btn_loading: false, | ||
| 48 | form: { | ||
| 49 | viewers: [], | ||
| 50 | phone: "", | ||
| 51 | }, | ||
| 52 | qrInfo: {}, | ||
| 53 | qrCodeData: "", | ||
| 54 | paymentHandle() { | ||
| 55 | if (payment.form.viewers.length != order.data?.seatInfo?.length) | ||
| 56 | return ElMessage({ | ||
| 57 | type: "warning", | ||
| 58 | message: languageFormat( | ||
| 59 | language.value, | ||
| 60 | "观看人与购买票数不符", | ||
| 61 | "The number of viewers does not match the number of tickets purchased." | ||
| 62 | ), | ||
| 63 | }); | ||
| 64 | if (!payment.form.phone) | ||
| 65 | return ElMessage({ | ||
| 66 | type: "warning", | ||
| 67 | message: languageFormat( | ||
| 68 | language.value, | ||
| 69 | "请输入联系电话", | ||
| 70 | "Please enter the contact phone number." | ||
| 71 | ), | ||
| 72 | }); | ||
| 73 | if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(payment.form.phone)) { | ||
| 74 | return ElMessage({ | ||
| 75 | type: "warning", | ||
| 76 | message: languageFormat( | ||
| 77 | language.value, | ||
| 78 | "联系电话格式不正确", | ||
| 79 | "The format of the contact phone is incorrect." | ||
| 80 | ), | ||
| 81 | }); | ||
| 82 | } | ||
| 83 | payOrder({ | ||
| 84 | contactPhone: payment.form.phone, | ||
| 85 | customerIds: payment.form.viewers, | ||
| 86 | orderToken: order.data?.orderToken, | ||
| 87 | payType: language.value == 0 ? 1 : 2, | ||
| 88 | paymentAmount: order.data?.paymentAmount, | ||
| 89 | }).then((res) => { | ||
| 90 | if (res.data.language == "zh-cn") { | ||
| 91 | payment.qrInfo = res.data; | ||
| 92 | qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => { | ||
| 93 | if (url) { | ||
| 94 | payment.qrCodeData = url; | ||
| 95 | } | ||
| 96 | }); | ||
| 97 | payment.showCodeDialog = true; | ||
| 98 | startCheckSuccessListener(res.data.orderSn, props.activityId); | ||
| 99 | } else { | ||
| 100 | // TODO:这里是英文环境支付 | ||
| 101 | } | ||
| 102 | }); | ||
| 103 | }, | ||
| 104 | handleCloce() { | ||
| 105 | payment.showCodeDialog = false; | ||
| 106 | payment.qrCodeData = ""; | ||
| 107 | clearInterval(timer); | ||
| 108 | timer = null; | ||
| 109 | router.replace({ | ||
| 110 | path: "/seat/order", | ||
| 111 | }); | ||
| 112 | }, | ||
| 113 | }); | ||
| 114 | |||
| 115 | const order = reactive({ | ||
| 116 | data: null, | ||
| 117 | fetchData() { | ||
| 118 | confirmOrder({ | ||
| 119 | actId: props.activityId, | ||
| 120 | openType: route.query.openType, | ||
| 121 | sessionId: route.query.sessionId, | ||
| 122 | sitePlace: route.query.sitePlace, | ||
| 123 | ticketType: route.query.ticketType, | ||
| 124 | seatIds: route.query.seatIds.split(","), | ||
| 125 | }).then((res) => { | ||
| 126 | this.data = res.data; | ||
| 127 | }); | ||
| 128 | }, | ||
| 129 | }); | ||
| 130 | |||
| 131 | const audience = reactive({ | ||
| 132 | data: [], | ||
| 133 | fetchData() { | ||
| 134 | viewPeopleList().then((res) => { | ||
| 135 | audience.data = res.data; | ||
| 136 | }); | ||
| 137 | }, | ||
| 138 | }); | ||
| 139 | |||
| 140 | onUnmounted(() => { | ||
| 141 | clearInterval(timer); | ||
| 142 | }); | ||
| 143 | |||
| 144 | audience.fetchData(); | ||
| 145 | order.fetchData(); | ||
| 146 | </script> | ||
| 147 | |||
| 148 | <template> | 1 | <template> |
| 149 | <div class="container"> | 2 | <div class="container" v-loading="loading"> |
| 150 | <div class="title"> | 3 | <div class="title"> |
| 151 | {{ languageFormat(language, "订单确认", "Order confirmation") }} | 4 | {{ languageFormat(language, "订单确认", "Order confirmation") }} |
| 152 | </div> | 5 | </div> |
| ... | @@ -292,6 +145,160 @@ order.fetchData(); | ... | @@ -292,6 +145,160 @@ order.fetchData(); |
| 292 | </div> | 145 | </div> |
| 293 | </template> | 146 | </template> |
| 294 | 147 | ||
| 148 | <script setup> | ||
| 149 | import {ref} from 'vue' | ||
| 150 | import { confirmOrder } from "./api/index.js"; | ||
| 151 | import { ElMessage } from "element-plus"; | ||
| 152 | import { payOrder, viewPeopleList, checkPaySuccess } from "./api/index.js"; | ||
| 153 | import qrCodeDialog from "./components/qrCodeDialog.vue"; | ||
| 154 | import qrcode from "qrcode"; | ||
| 155 | import { languageFormat } from "./utils/language.js"; | ||
| 156 | import { useStorage } from "@vueuse/core/index"; | ||
| 157 | const language = useStorage("language", 0); | ||
| 158 | const loading = ref(false); | ||
| 159 | const route = useRoute(); | ||
| 160 | const router = useRouter(); | ||
| 161 | |||
| 162 | const props = defineProps({ | ||
| 163 | activityId: [String, Number], | ||
| 164 | }); | ||
| 165 | |||
| 166 | let timer = null; | ||
| 167 | const startCheckSuccessListener = (orderSn, actId) => { | ||
| 168 | timer = setInterval(() => { | ||
| 169 | checkPaySuccess({ orderSn }).then((res) => { | ||
| 170 | if (res.data) { | ||
| 171 | clearInterval(timer); | ||
| 172 | timer = null; | ||
| 173 | // 支付成功 | ||
| 174 | payment.showCodeDialog = false; | ||
| 175 | ElMessage({ | ||
| 176 | type: "success", | ||
| 177 | message: languageFormat( | ||
| 178 | language.value, | ||
| 179 | "支付成功", | ||
| 180 | "Payment succeeded" | ||
| 181 | ), | ||
| 182 | }); | ||
| 183 | router.replace({ | ||
| 184 | path: "/seat/order", | ||
| 185 | }); | ||
| 186 | } else { | ||
| 187 | return false; | ||
| 188 | } | ||
| 189 | }); | ||
| 190 | }, 3000); | ||
| 191 | }; | ||
| 192 | |||
| 193 | const payment = reactive({ | ||
| 194 | showCodeDialog: false, | ||
| 195 | btn_loading: false, | ||
| 196 | form: { | ||
| 197 | viewers: [], | ||
| 198 | phone: "", | ||
| 199 | }, | ||
| 200 | qrInfo: {}, | ||
| 201 | qrCodeData: "", | ||
| 202 | paymentHandle() { | ||
| 203 | if (payment.form.viewers.length != order.data?.seatInfo?.length) | ||
| 204 | return ElMessage({ | ||
| 205 | type: "warning", | ||
| 206 | message: languageFormat( | ||
| 207 | language.value, | ||
| 208 | "观看人与购买票数不符", | ||
| 209 | "The number of viewers does not match the number of tickets purchased." | ||
| 210 | ), | ||
| 211 | }); | ||
| 212 | if (!payment.form.phone) | ||
| 213 | return ElMessage({ | ||
| 214 | type: "warning", | ||
| 215 | message: languageFormat( | ||
| 216 | language.value, | ||
| 217 | "请输入联系电话", | ||
| 218 | "Please enter the contact phone number." | ||
| 219 | ), | ||
| 220 | }); | ||
| 221 | // if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(payment.form.phone)) { | ||
| 222 | // return ElMessage({ | ||
| 223 | // type: "warning", | ||
| 224 | // message: languageFormat( | ||
| 225 | // language.value, | ||
| 226 | // "联系电话格式不正确", | ||
| 227 | // "The format of the contact phone is incorrect." | ||
| 228 | // ), | ||
| 229 | // }); | ||
| 230 | // } | ||
| 231 | loading.value=true | ||
| 232 | payOrder({ | ||
| 233 | contactPhone: payment.form.phone, | ||
| 234 | customerIds: payment.form.viewers, | ||
| 235 | orderToken: order.data?.orderToken, | ||
| 236 | payType: language.value == 0 ? 1 : 2, | ||
| 237 | paymentAmount: order.data?.paymentAmount, | ||
| 238 | }).then((res) => { | ||
| 239 | if (res.data.language == "zh-cn") { | ||
| 240 | payment.qrInfo = res.data; | ||
| 241 | qrcode.toDataURL(res.data.scanCodeUrl, (err, url) => { | ||
| 242 | if (url) { | ||
| 243 | payment.qrCodeData = url; | ||
| 244 | } | ||
| 245 | }); | ||
| 246 | payment.showCodeDialog = true; | ||
| 247 | startCheckSuccessListener(res.data.orderSn, props.activityId); | ||
| 248 | } else { | ||
| 249 | // TODO:这里是英文环境支付 | ||
| 250 | location.href = res.data.scanCodeUrl | ||
| 251 | } | ||
| 252 | }).finally(()=>{ | ||
| 253 | loading.value=false | ||
| 254 | }); | ||
| 255 | }, | ||
| 256 | handleCloce() { | ||
| 257 | payment.showCodeDialog = false; | ||
| 258 | payment.qrCodeData = ""; | ||
| 259 | clearInterval(timer); | ||
| 260 | timer = null; | ||
| 261 | router.replace({ | ||
| 262 | path: "/seat/order", | ||
| 263 | }); | ||
| 264 | }, | ||
| 265 | }); | ||
| 266 | |||
| 267 | const order = reactive({ | ||
| 268 | data: null, | ||
| 269 | fetchData() { | ||
| 270 | confirmOrder({ | ||
| 271 | actId: props.activityId, | ||
| 272 | openType: route.query.openType, | ||
| 273 | sessionId: route.query.sessionId, | ||
| 274 | sitePlace: route.query.sitePlace, | ||
| 275 | ticketType: route.query.ticketType, | ||
| 276 | seatIds: route.query.seatIds.split(","), | ||
| 277 | }).then((res) => { | ||
| 278 | this.data = res.data; | ||
| 279 | }); | ||
| 280 | }, | ||
| 281 | }); | ||
| 282 | |||
| 283 | const audience = reactive({ | ||
| 284 | data: [], | ||
| 285 | fetchData() { | ||
| 286 | viewPeopleList().then((res) => { | ||
| 287 | audience.data = res.data; | ||
| 288 | }); | ||
| 289 | }, | ||
| 290 | }); | ||
| 291 | |||
| 292 | onUnmounted(() => { | ||
| 293 | clearInterval(timer); | ||
| 294 | }); | ||
| 295 | |||
| 296 | audience.fetchData(); | ||
| 297 | order.fetchData(); | ||
| 298 | </script> | ||
| 299 | |||
| 300 | |||
| 301 | |||
| 295 | <style scoped lang="scss"> | 302 | <style scoped lang="scss"> |
| 296 | div { | 303 | div { |
| 297 | box-sizing: border-box; | 304 | box-sizing: border-box; | ... | ... |
| ... | @@ -138,7 +138,7 @@ const detail = reactive({ | ... | @@ -138,7 +138,7 @@ const detail = reactive({ |
| 138 | if (detail.pay_loading) return; | 138 | if (detail.pay_loading) return; |
| 139 | detail.pay_loading = true; | 139 | detail.pay_loading = true; |
| 140 | // 中文支付 | 140 | // 中文支付 |
| 141 | immediatePay({ orderSn: detail.data.orderSn, payType: 1 }) | 141 | immediatePay({ orderSn: detail.data.orderSn, payType:detail.data?.language=='zh-cn'? 1:2 }) |
| 142 | .then((res) => { | 142 | .then((res) => { |
| 143 | if (res.data.language == "zh-cn") { | 143 | if (res.data.language == "zh-cn") { |
| 144 | detail.qrInfo = res.data; | 144 | detail.qrInfo = res.data; |
| ... | @@ -151,6 +151,7 @@ const detail = reactive({ | ... | @@ -151,6 +151,7 @@ const detail = reactive({ |
| 151 | startCheckSuccessListener(detail.data.orderSn); | 151 | startCheckSuccessListener(detail.data.orderSn); |
| 152 | } else { | 152 | } else { |
| 153 | // TODO:这里是英文环境支付 | 153 | // TODO:这里是英文环境支付 |
| 154 | location.href = res.data.scanCodeUrl | ||
| 154 | } | 155 | } |
| 155 | }) | 156 | }) |
| 156 | .finally(() => (detail.pay_loading = false)); | 157 | .finally(() => (detail.pay_loading = false)); |
| ... | @@ -242,7 +243,7 @@ detail.fetchData(); | ... | @@ -242,7 +243,7 @@ detail.fetchData(); |
| 242 | </script> | 243 | </script> |
| 243 | 244 | ||
| 244 | <template> | 245 | <template> |
| 245 | <div class="container"> | 246 | <div class="container" v-loading="detail.pay_loading"> |
| 246 | <div class="left"> | 247 | <div class="left"> |
| 247 | <!-- 票务信息 --> | 248 | <!-- 票务信息 --> |
| 248 | <div class="ticket"> | 249 | <div class="ticket"> |
| ... | @@ -257,7 +258,7 @@ detail.fetchData(); | ... | @@ -257,7 +258,7 @@ detail.fetchData(); |
| 257 | {{ languageFormat(language, "单价", "Price") }} | 258 | {{ languageFormat(language, "单价", "Price") }} |
| 258 | </div> | 259 | </div> |
| 259 | <div style="width: 10%" class="td"> | 260 | <div style="width: 10%" class="td"> |
| 260 | {{ languageFormat(language, "数量", "Ticket Qty.") }} | 261 | {{ languageFormat(language, "数量", "Quantity") }} |
| 261 | </div> | 262 | </div> |
| 262 | <div style="width: 12%; text-align: right" class="td"> | 263 | <div style="width: 12%; text-align: right" class="td"> |
| 263 | {{ languageFormat(language, "小计", "Subtotal") }} | 264 | {{ languageFormat(language, "小计", "Subtotal") }} |
| ... | @@ -268,14 +269,14 @@ detail.fetchData(); | ... | @@ -268,14 +269,14 @@ detail.fetchData(); |
| 268 | <div style="width: 33%" class="td">{{ detail.data?.name }}</div> | 269 | <div style="width: 33%" class="td">{{ detail.data?.name }}</div> |
| 269 | <div style="width: 25%" class="td">{{ detail.data?.placeName }}</div> | 270 | <div style="width: 25%" class="td">{{ detail.data?.placeName }}</div> |
| 270 | <div style="width: 20%" class="td"> | 271 | <div style="width: 20%" class="td"> |
| 271 | <span>{{ language == 0 ? "¥" : "€" }}</span> | 272 | <span>{{ detail.data?.language=='zh-cn'? "¥" : "€" }}</span> |
| 272 | {{ detail.data?.singlePrice }} | 273 | {{ detail.data?.singlePrice }} |
| 273 | </div> | 274 | </div> |
| 274 | <div style="width: 10%" class="td"> | 275 | <div style="width: 10%" class="td"> |
| 275 | x{{ detail.data?.seatList?.length }} | 276 | x{{ detail.data?.seatList?.length }} |
| 276 | </div> | 277 | </div> |
| 277 | <div style="width: 12%; text-align: right" class="td"> | 278 | <div style="width: 12%; text-align: right" class="td"> |
| 278 | <span>{{ language == 0 ? "¥" : "€" }}</span> | 279 | <span>{{ detail.data?.language=='zh-cn'? "¥" : "€" }}</span> |
| 279 | {{ detail.data?.payAmount }} | 280 | {{ detail.data?.payAmount }} |
| 280 | </div> | 281 | </div> |
| 281 | </div> | 282 | </div> |
| ... | @@ -283,18 +284,18 @@ detail.fetchData(); | ... | @@ -283,18 +284,18 @@ detail.fetchData(); |
| 283 | <!-- 座位 --> | 284 | <!-- 座位 --> |
| 284 | <div class="seat_box"> | 285 | <div class="seat_box"> |
| 285 | <div class="th"> | 286 | <div class="th"> |
| 286 | <div style="width: 30.33%" class="td"> | 287 | <div style="width: 33%" class="td"> |
| 287 | {{ languageFormat(language, "时间座位", "Seat Info") }} | 288 | {{ languageFormat(language, "时间座位", "Seat Info") }} |
| 288 | </div> | 289 | </div> |
| 289 | <div style="width: 30.33%" class="td"> | 290 | <div style="width: 33%" class="td"> |
| 290 | {{ languageFormat(language, "订单信息", "Summary") }} | 291 | {{ languageFormat(language, "订单信息", "Summary") }} |
| 291 | </div> | 292 | </div> |
| 292 | <div style="width: 30.33%" class="td"> | 293 | <div style="width: 33%" class="td"> |
| 293 | {{ languageFormat(language, "联系方式", "Contact details") }} | 294 | {{ languageFormat(language, "联系方式", "Contact details") }} |
| 294 | </div> | 295 | </div> |
| 295 | </div> | 296 | </div> |
| 296 | <div class="tr"> | 297 | <div class="tr"> |
| 297 | <div style="width: 30.33%" class="td flex-col"> | 298 | <div style="width: 33%" class="td flex-col"> |
| 298 | <div> | 299 | <div> |
| 299 | {{ detail.data?.dateStr }} | 300 | {{ detail.data?.dateStr }} |
| 300 | <span v-if="detail.data?.ticketType == 1" class="tag_t"> | 301 | <span v-if="detail.data?.ticketType == 1" class="tag_t"> |
| ... | @@ -318,25 +319,32 @@ detail.fetchData(); | ... | @@ -318,25 +319,32 @@ detail.fetchData(); |
| 318 | }}{{ languageFormat(language, "馆", "Venue") }}) | 319 | }}{{ languageFormat(language, "馆", "Venue") }}) |
| 319 | </div> | 320 | </div> |
| 320 | </div> | 321 | </div> |
| 321 | <div style="width: 30.33%" class="td flex-col"> | 322 | <div style="width: 33%" class="td flex-col"> |
| 322 | <div> | 323 | <div> |
| 323 | {{ languageFormat(language, "订单编号", "Order No.") }}:{{ | 324 | {{ languageFormat(language, "订单编号", "Order No") }}:{{ detail.data?.orderSn }} |
| 324 | detail.data?.orderSn | ||
| 325 | }} | ||
| 326 | </div> | 325 | </div> |
| 327 | <div> | 326 | <div> |
| 328 | {{ languageFormat(language, "创建时间", "Order Time") }}:{{ | 327 | {{ languageFormat(language, "创建时间", "Order Time") }}:{{detail.data?.orderTime }} |
| 329 | detail.data?.orderTime | ||
| 330 | }} | ||
| 331 | </div> | 328 | </div> |
| 332 | </div> | 329 | </div> |
| 333 | <div style="width: 30.33%" class="td"> | 330 | <div style="width: 33%" class="td flex-col"> |
| 334 | <div> | 331 | <div> |
| 335 | {{ languageFormat(language, "联系电话", "Telephone") }}:{{ | 332 | {{ languageFormat(language, "联系电话", "Telephone") }}:{{ detail.data?.contactPhone }} |
| 336 | detail.data?.contactPhone | 333 | <div> </div> |
| 337 | }} | 334 | <!-- <br>--> |
| 338 | </div> | 335 | </div> |
| 336 | <div> | ||
| 337 | {{languageFormat(language,'支付方式','Form of payments')}}:{{detail.data?.language=='en-us'?'PayPal':'微信'}} | ||
| 339 | </div> | 338 | </div> |
| 339 | |||
| 340 | </div> | ||
| 341 | <!-- <div style="width: 20%" class="td ">--> | ||
| 342 | <!-- <div>--> | ||
| 343 | <!--<!– {{ languageFormat(language, "联系电话", "Telephone") }}:{{ detail.data?.contactPhone }}–>--> | ||
| 344 | <!-- 微信--> | ||
| 345 | <!-- </div>--> | ||
| 346 | |||
| 347 | <!-- </div>--> | ||
| 340 | </div> | 348 | </div> |
| 341 | </div> | 349 | </div> |
| 342 | <!-- 购票人 --> | 350 | <!-- 购票人 --> |
| ... | @@ -352,9 +360,7 @@ detail.fetchData(); | ... | @@ -352,9 +360,7 @@ detail.fetchData(); |
| 352 | > | 360 | > |
| 353 | <div>{{ it.name }}</div> | 361 | <div>{{ it.name }}</div> |
| 354 | <div class="idcard"> | 362 | <div class="idcard"> |
| 355 | {{ languageFormat(language, "证件号", "ID number") }}:{{ | 363 | {{ languageFormat(language, "证件号", "ID number") }}:{{ it.idCard }} |
| 356 | it.idCard | ||
| 357 | }} | ||
| 358 | </div> | 364 | </div> |
| 359 | </div> | 365 | </div> |
| 360 | </div> | 366 | </div> |
| ... | @@ -389,7 +395,7 @@ detail.fetchData(); | ... | @@ -389,7 +395,7 @@ detail.fetchData(); |
| 389 | class="value" | 395 | class="value" |
| 390 | :style="{ color: status[detail.data?.state]?.color }" | 396 | :style="{ color: status[detail.data?.state]?.color }" |
| 391 | > | 397 | > |
| 392 | <span>{{ language == 0 ? "¥" : "€" }}</span> | 398 | <span>{{ detail.data?.language=='zh-cn'? "¥" : "€" }}</span> |
| 393 | {{ detail.data?.payAmount }} | 399 | {{ detail.data?.payAmount }} |
| 394 | </div> | 400 | </div> |
| 395 | </div> | 401 | </div> | ... | ... |
| ... | @@ -226,7 +226,7 @@ onMounted(() => { | ... | @@ -226,7 +226,7 @@ onMounted(() => { |
| 226 | }} | 226 | }} |
| 227 | </div> | 227 | </div> |
| 228 | <div class="common"> | 228 | <div class="common"> |
| 229 | {{ languageFormat(language, "订单编号", "Order No.") }}:{{ | 229 | {{ languageFormat(language, "订单编号", "Order No") }}:{{ |
| 230 | it.orderSn | 230 | it.orderSn |
| 231 | }} | 231 | }} |
| 232 | </div> | 232 | </div> |
| ... | @@ -235,10 +235,7 @@ onMounted(() => { | ... | @@ -235,10 +235,7 @@ onMounted(() => { |
| 235 | }}{{ languageFormat(language, "张", "tickets") }} | 235 | }}{{ languageFormat(language, "张", "tickets") }} |
| 236 | </div> | 236 | </div> |
| 237 | <div class="common"> | 237 | <div class="common"> |
| 238 | {{ languageFormat(language, "金额", "Ticket Price") }}:<span | 238 | {{ languageFormat(language, "金额", "Ticket Price") }}:{{it.payType=='2'?'€':'¥'}}{{ it.payAmount }} |
| 239 | v-if="language == 0" | ||
| 240 | >¥</span | ||
| 241 | >{{ it.payAmount }} | ||
| 242 | </div> | 239 | </div> |
| 243 | <div class="status"> | 240 | <div class="status"> |
| 244 | <div class="label"> | 241 | <div class="label"> | ... | ... |
src/viewsPc/seat/payticketLoser.vue
0 → 100644
| 1 | <template> | ||
| 2 | <div> | ||
| 3 | <div class="box"> | ||
| 4 | <el-card class="mb60 mt30" v-loading="loading"> | ||
| 5 | <div class="text-center mt30"> | ||
| 6 | <el-icon color="#e46962" size="80"> | ||
| 7 | <CircleCloseFilled /> | ||
| 8 | </el-icon> | ||
| 9 | <p class="text-success mb20">{{ language == 0 ? '支付失败' : 'Payment Failure!' }}</p> | ||
| 10 | |||
| 11 | <el-button type="primary" class="btn-lineG mb60" @click="goBillDetail" round> | ||
| 12 | {{ language == 0 ? '返回订单详情' : 'Return order details' }} | ||
| 13 | </el-button> | ||
| 14 | </div> | ||
| 15 | </el-card> | ||
| 16 | </div> | ||
| 17 | </div> | ||
| 18 | </template> | ||
| 19 | |||
| 20 | <script setup> | ||
| 21 | import {ref} from "vue"; | ||
| 22 | import {useRoute, useRouter} from "vue-router"; | ||
| 23 | import {onMounted} from "@vue/runtime-core"; | ||
| 24 | import {callbackPalPay} from "/@/apiPc/booking"; | ||
| 25 | import {useStorage} from "@vueuse/core/index"; | ||
| 26 | import {payCallback} from '@/viewsPc/seat/api/index' | ||
| 27 | |||
| 28 | |||
| 29 | const route = useRoute() | ||
| 30 | const router = useRouter() | ||
| 31 | const language= useStorage('language',0) | ||
| 32 | const orderId = ref(route.query.orderId) | ||
| 33 | const form = ref({}) | ||
| 34 | const loading = ref(false) | ||
| 35 | |||
| 36 | onMounted(() => { | ||
| 37 | const code = decodeURIComponent(orderId.value) | ||
| 38 | loading.value = false | ||
| 39 | // payCallback({tradeNo:code}).then(res => { | ||
| 40 | // loading.value = false | ||
| 41 | // form.value = res.data.orderType | ||
| 42 | // }) | ||
| 43 | }) | ||
| 44 | |||
| 45 | function goBillDetail() { | ||
| 46 | router.push({ | ||
| 47 | path: '/seat/order_detail', | ||
| 48 | query: { orderSn: orderId.value, id: 1 }, | ||
| 49 | }) | ||
| 50 | } | ||
| 51 | </script> | ||
| 52 | |||
| 53 | <style scoped lang="scss"> | ||
| 54 | |||
| 55 | </style> |
src/viewsPc/seat/payticketOk.vue
0 → 100644
| 1 | <template> | ||
| 2 | <div> | ||
| 3 | <div class="box"> | ||
| 4 | <el-card class="mb60 mt30" v-loading="loading"> | ||
| 5 | <div class="text-center mt30"> | ||
| 6 | <el-icon color="#32B16C" size="80"> | ||
| 7 | <SuccessFilled/> | ||
| 8 | </el-icon> | ||
| 9 | <p class="text-success mb20">{{ language == 0 ? '支付成功' : 'successfully!' }}</p> | ||
| 10 | |||
| 11 | <el-button type="primary" class="btn-lineG mb60" @click="goBillDetail" round> | ||
| 12 | {{ language == 0 ? '返回订单详情' : 'Return order details' }} | ||
| 13 | </el-button> | ||
| 14 | </div> | ||
| 15 | </el-card> | ||
| 16 | </div> | ||
| 17 | </div> | ||
| 18 | </template> | ||
| 19 | |||
| 20 | <script setup> | ||
| 21 | import {ref} from "vue"; | ||
| 22 | import {useRoute, useRouter} from "vue-router"; | ||
| 23 | import {onMounted} from "@vue/runtime-core"; | ||
| 24 | import {useStorage} from "@vueuse/core/index"; | ||
| 25 | import {payCallback} from '@/viewsPc/seat/api/index' | ||
| 26 | |||
| 27 | const route = useRoute() | ||
| 28 | const router = useRouter() | ||
| 29 | const language= useStorage('language',0) | ||
| 30 | const orderId = ref(route.query.orderId) | ||
| 31 | const form = ref() | ||
| 32 | const loading = ref(false) | ||
| 33 | |||
| 34 | onMounted(() => { | ||
| 35 | const code = decodeURIComponent(orderId.value) | ||
| 36 | loading.value = true | ||
| 37 | payCallback({tradeNo:code}).then(res => { | ||
| 38 | loading.value = false | ||
| 39 | form.value = res.data | ||
| 40 | }) | ||
| 41 | }) | ||
| 42 | |||
| 43 | function goBillDetail() { | ||
| 44 | router.push({ | ||
| 45 | path: '/seat/order_detail', | ||
| 46 | query: { orderSn: form.value.orderSn, id: form.value.actId }, | ||
| 47 | }) | ||
| 48 | } | ||
| 49 | </script> | ||
| 50 | |||
| 51 | <style scoped lang="scss"> | ||
| 52 | |||
| 53 | </style> |
| ... | @@ -9,7 +9,7 @@ const route = useRoute(); | ... | @@ -9,7 +9,7 @@ const route = useRoute(); |
| 9 | const router = useRouter(); | 9 | const router = useRouter(); |
| 10 | 10 | ||
| 11 | const iframeRef = ref(); | 11 | const iframeRef = ref(); |
| 12 | 12 | const loading=ref(true) | |
| 13 | const props = defineProps({ | 13 | const props = defineProps({ |
| 14 | activityId: [String, Number], | 14 | activityId: [String, Number], |
| 15 | }); | 15 | }); |
| ... | @@ -62,6 +62,7 @@ function onWindowMessage(e) { | ... | @@ -62,6 +62,7 @@ function onWindowMessage(e) { |
| 62 | sendMsg("load-seats", seat_arr); | 62 | sendMsg("load-seats", seat_arr); |
| 63 | setTimeout(() => { | 63 | setTimeout(() => { |
| 64 | moveToPriceArea(route.query.ticket_block); | 64 | moveToPriceArea(route.query.ticket_block); |
| 65 | loading.value=false | ||
| 65 | }, 500); | 66 | }, 500); |
| 66 | }); | 67 | }); |
| 67 | 68 | ||
| ... | @@ -304,7 +305,7 @@ price.fetchData(); | ... | @@ -304,7 +305,7 @@ price.fetchData(); |
| 304 | </script> | 305 | </script> |
| 305 | 306 | ||
| 306 | <template> | 307 | <template> |
| 307 | <div class="container"> | 308 | <div class="container" v-loading="loading"> |
| 308 | <div class="top"> | 309 | <div class="top"> |
| 309 | <div class="time"> | 310 | <div class="time"> |
| 310 | <span>{{ route.query?.time_txt }}</span> | 311 | <span>{{ route.query?.time_txt }}</span> | ... | ... |
| ... | @@ -362,6 +362,10 @@ watch( | ... | @@ -362,6 +362,10 @@ watch( |
| 362 | > | 362 | > |
| 363 | {{ it.placeName }} | 363 | {{ it.placeName }} |
| 364 | </div> | 364 | </div> |
| 365 | |||
| 366 | <div style="padding-top: 10px" v-if="language==0"> | ||
| 367 | 备注:B6馆(国际赛事),B4馆(国内赛事),最终以实际赛事表为准 | ||
| 368 | </div> | ||
| 365 | </div> | 369 | </div> |
| 366 | </div> | 370 | </div> |
| 367 | <!-- 票档 --> | 371 | <!-- 票档 --> | ... | ... |
| ... | @@ -12,7 +12,7 @@ const baseURL = import.meta.env.VITE_TICKET_BASE_API | ... | @@ -12,7 +12,7 @@ const baseURL = import.meta.env.VITE_TICKET_BASE_API |
| 12 | 12 | ||
| 13 | // const baseURL = "ticket"; //"http://book.xiaojinyu.games"; // 这里填入你的基础 API URL | 13 | // const baseURL = "ticket"; //"http://book.xiaojinyu.games"; // 这里填入你的基础 API URL |
| 14 | 14 | ||
| 15 | const timeout = 15000; // 请求超时时间 | 15 | const timeout = 150000; // 请求超时时间 |
| 16 | 16 | ||
| 17 | const http = axios.create({ | 17 | const http = axios.create({ |
| 18 | baseURL, | 18 | baseURL, | ... | ... |
-
Please register or sign in to post a comment