From 400b68cb9e722255830e033322a14872a16dca2c Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Thu, 14 Aug 2025 15:50:11 +0800 Subject: [PATCH] v1.0.1 & add lifeIm & site check --- src/pages/member/index.vue | 35 ++++----- src/static/images/service.png | Bin 0 -> 582 bytes .../groupon/pages/confirm_order/venue.vue | 1 + src/subpackage/groupon/pages/list.vue | 6 +- src/subpackage/groupon/pages/site_select.vue | 80 ++++++++++++++------- src/subpackage/order/pages/detail.vue | 2 +- 6 files changed, 74 insertions(+), 50 deletions(-) create mode 100644 src/static/images/service.png diff --git a/src/pages/member/index.vue b/src/pages/member/index.vue index dfa20de..18fbf54 100644 --- a/src/pages/member/index.vue +++ b/src/pages/member/index.vue @@ -1,7 +1,7 @@ @@ -58,14 +48,18 @@ function login() { 登录 - + 我的工具 - + + @@ -128,6 +122,7 @@ function login() { margin-top: 40upx; padding: 0 30upx; .ml-item{ + @include clearBtn; display: inline-block; font-size: 0; .mi-icon{ diff --git a/src/static/images/service.png b/src/static/images/service.png new file mode 100644 index 0000000000000000000000000000000000000000..bd593c34453162e7fda073ff6b6c34df77c9105f GIT binary patch literal 582 zcmV-M0=fN(P)b}m3`GHBNW3PBu@i6E|Nj@Ox;2ApXv=xX1nZ9GB7tBOt*Szbg!4qmqEecL+10t= zVBsRKcLC|46tF>*2cK5S1Uw{CZ5^Z;1jy1KUUa&LAp2Ak?UBPT@S}D;SZzS)Y1*H;4JX6B~vo7vpJL4MV{r1iay!)aj{uWr4|Wp}i1@9t#j-fk~H_gK@s zsCCqC?ix#+6Tc%$E|Y0nGhOiS==jbxQ^bWCQ2S~DXT%L##%Wwk~S!4eX%V&Auf z@&Ai?lsL*p+y-gsIy?^$E*)*k<9>fYxGA*V@Oz(iL z+iOLQ-~HFhURWv)Tv$5_s1463h#4|5<11<~#*EyUVIK2LL_9#zPh0$>8TA~00KC#| UF2MH(8vp', _query) showLoad(); + // 这个api 只能接受点击触发,不能在回调里 return tt.verifyCertificates(_query); } diff --git a/src/subpackage/groupon/pages/list.vue b/src/subpackage/groupon/pages/list.vue index d0f87e8..2374fa4 100644 --- a/src/subpackage/groupon/pages/list.vue +++ b/src/subpackage/groupon/pages/list.vue @@ -16,8 +16,10 @@ onLoad(() => { } }) .then(res => { - if(res?.data?.data?.total === 0)return showModal({ content: '暂无票券' }); - ticketLs.value = res.data?.data?.orders || []; + let _data = res?.data?.data || {}; + if(_data?.error_code&&_data?.description)return showModal({ content: _data?.description }); + if(_data?.total === 0)return showModal({ content: '暂无票券' }); + ticketLs.value = _data?.orders || []; }); }); diff --git a/src/subpackage/groupon/pages/site_select.vue b/src/subpackage/groupon/pages/site_select.vue index 2f9978f..34fac11 100644 --- a/src/subpackage/groupon/pages/site_select.vue +++ b/src/subpackage/groupon/pages/site_select.vue @@ -2,8 +2,9 @@ import { onLoad, onReady } from '@dcloudio/uni-app'; import { reactive, ref, computed, watch, nextTick, onMounted, getCurrentInstance } from 'vue'; import { stadiumBookList } from "@/api"; -import { venueTypes, bookDate, bookList } from '../api'; +import { venueTypes, bookDate, bookList, orderAdd } from '../api'; import { getNodeMes, showModal } from "@/utils/polish"; +import { debounce } from "@/utils"; import siteTable from "../components/site/table.vue"; import siteFooter from "../components/site/footer.vue"; import { get_zh_day, get_zh_date } from "../js/site_select/handle"; @@ -15,6 +16,7 @@ const currentVenueType = ref({}); // 当前场地类型 const bookDateData = ref([]); // 日期列表 const currentBookDate = ref({}); // 当前选中日期 const isShowTypeRuleTxt = ref(false); +const APPID = tt.getEnvInfoSync()?.microapp?.appId ?? ''; const stadiumInfo = ref({}); // 场馆信息 let ticketInfo = null; // 票券信息 @@ -161,34 +163,58 @@ async function setScrollViewSize(){ scrollHeight.value = _sysInfo?.windowHeight - (_otherHeight || 0); } -function submitClick(venues){ - console.warn('submitClick venues', venues); - uni.navigateTo({ - url: `/subpackage/groupon/pages/confirm_order/venue`, - success: res => { - res.eventChannel.emit('dataFromGrouponSiteSelect', { - stadium: stadiumInfo.value, - ticket: ticketInfo, - venueInfo: { - classify: currentVenueType.value?.key ?? '', - typeName: currentVenueType.value?.name ?? '', - date: (currentBookDate.value?.date ?? '').slice(0, 10), - zh_day: currentBookDate.value?._zh_day, - venues: venues.map(e=>({ - time: e?.time ?? '', - venue_name: e?._venue_name ?? '', - venue_id: e?._venue_id ?? '', - price: e?.price ?? '', - date: e?.date ?? '', - index: e?.index ?? '', - _class_tag: e?._class_tag ?? '', - })) - }, - }) +const submitClick = debounce(function(venues){ + let _sVal = stadiumInfo.value; + let _vInfo = { + classify: currentVenueType.value?.key ?? '', + typeName: currentVenueType.value?.name ?? '', + date: (currentBookDate.value?.date ?? '').slice(0, 10), + zh_day: currentBookDate.value?._zh_day, + venues: venues.map(e=>({ + time: e?.time ?? '', + venue_name: e?._venue_name ?? '', + venue_id: e?._venue_id ?? '', + price: e?.price ?? '', + date: e?.date ?? '', + index: e?.index ?? '', + _class_tag: e?._class_tag ?? '', + })) + } + let _classTags = (_vInfo?.venues ?? []).map(e=>e?._class_tag ?? ''); + // 用 add 检查是否存在连场禁止下单 + return orderAdd({ data: { + appid: APPID, + brand_id: _sVal?.brand_id ?? '', + stadium_id: _sVal?.id ?? '', + date: _vInfo?.date, + sessions: (_vInfo?.venues || []).map(el=>({ + venue_id: el?.venue_id ?? '', + duration: el?.time ?? '', + price: el?.price ?? 0, + tag: el?._class_tag ?? '', + })), + type_key: _vInfo?.classify ?? '', + class_tags_enable: _classTags.filter(e=>e!=='').join(','), + douyin_merchant_pay_amount: ticketInfo?.douyin_merchant_pay_amount ?? 0, + douyin_groupon_coupon_code: ticketInfo?.certificate_id ?? '', + } }) + .then(res=>{ + if(res?.code === 0 && res?.data?.order_no){ + uni.navigateTo({ + url: `/subpackage/groupon/pages/confirm_order/venue`, + success: res => { + res.eventChannel.emit('dataFromGrouponSiteSelect', { + stadium: stadiumInfo.value, + ticket: ticketInfo, + venueInfo: _vInfo, + }) + } + }); } - }); + }) +}, 300, true); + -}