|
@ -4,8 +4,9 @@ import { reactive, ref, onMounted, getCurrentInstance } from "vue"; |
|
|
import confirmTemplate from "../../components/confirm_template.vue"; |
|
|
import confirmTemplate from "../../components/confirm_template.vue"; |
|
|
import ticketItem from "../../components/ticket_item.vue"; |
|
|
import ticketItem from "../../components/ticket_item.vue"; |
|
|
import venueInfo from "../../components/venue_info.vue"; |
|
|
import venueInfo from "../../components/venue_info.vue"; |
|
|
import { jsapiPreVerifyCertificates, orderAdd, orderPayMini } from "../../api"; |
|
|
|
|
|
|
|
|
import { jsapiPreVerifyCertificates, orderAdd, orderPayMini, computedPayInfo } from "../../api"; |
|
|
import { routeTo, showModal, showLoad, hideLoad } from '@/utils/polish'; |
|
|
import { routeTo, showModal, showLoad, hideLoad } from '@/utils/polish'; |
|
|
|
|
|
import { accAdd } from "@/utils/calculation"; |
|
|
const stadiumInfo = ref({}); |
|
|
const stadiumInfo = ref({}); |
|
|
const ticketInfo = ref({}); |
|
|
const ticketInfo = ref({}); |
|
|
const venueData = ref({}); |
|
|
const venueData = ref({}); |
|
@ -34,8 +35,35 @@ onMounted(() =>{ |
|
|
classify: venueInfo?.classify ?? '', |
|
|
classify: venueInfo?.classify ?? '', |
|
|
class_tags: _classTags.filter(e=>e!=='').join(','), |
|
|
class_tags: _classTags.filter(e=>e!=='').join(','), |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let _totalPrice = 0; |
|
|
|
|
|
venueInfo.venues.forEach(e=>{ |
|
|
|
|
|
_totalPrice = accAdd(_totalPrice, e?.price ?? 0); |
|
|
|
|
|
}); |
|
|
|
|
|
computedPayInfo({ |
|
|
|
|
|
data: { |
|
|
|
|
|
brand_id: stadium?.brand_id ?? '', |
|
|
|
|
|
stadium_id: stadium?.id ?? '', |
|
|
|
|
|
amount: _totalPrice, |
|
|
|
|
|
scenes: 'venue_number', |
|
|
|
|
|
type_key: venueInfo?.classify ?? '', |
|
|
|
|
|
class_tags_enable: _classTags.filter(e=>e!=='').join(','), |
|
|
|
|
|
integral: 0, |
|
|
|
|
|
times: venueInfo.venues.map(e=>{ |
|
|
|
|
|
let [ start, end ] = e?.time?.split('-') ?? []; |
|
|
|
|
|
let _date = e?.date?.substring(0, 10) ?? ''; |
|
|
|
|
|
return { |
|
|
|
|
|
start: `${_date} ${start}:00`, |
|
|
|
|
|
end: `${_date} ${end}:00`, |
|
|
|
|
|
tag: e?._class_tag ?? '', |
|
|
|
|
|
price: e?.price ?? 0, |
|
|
|
|
|
} |
|
|
|
|
|
}), |
|
|
|
|
|
douyin_groupon_coupon_code: ticket?.certificate_id ?? '' |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.then(res=>{ |
|
|
|
|
|
console.warn('computedPayInfo--->', res); |
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|