From a3ec9c102da817c29ea596c429c4d02298e3ace5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=96=B9=E6=88=90?= Date: Fri, 26 Dec 2025 13:38:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=88=90=E5=8A=9F=E5=90=8E=E7=9A=84=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=B7=B3=E8=BD=AC=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/orders/detail.vue | 29 +++++++++++++++++- pages/orders/index.vue | 66 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 89 insertions(+), 6 deletions(-) diff --git a/pages/orders/detail.vue b/pages/orders/detail.vue index f217540..59ce509 100644 --- a/pages/orders/detail.vue +++ b/pages/orders/detail.vue @@ -312,7 +312,8 @@ function handlePay() { .then(async () => { uni.hideLoading() uni.showToast({ title: '支付成功', icon: 'success' }) - await loadOrder() + // 支付成功后跳转到对应游戏页面 + navigateToGame(ord) }) .catch((e) => { uni.hideLoading() @@ -324,6 +325,32 @@ function handlePay() { }) } +function navigateToGame(ord) { + const playType = ord.play_type + const activityId = ord.activity_id + + if (!activityId) { + // 没有活动ID,返回订单列表 + uni.navigateBack() + return + } + + let url = '' + if (playType === 'match') { + url = `/pages/activity/duiduipeng/index?activity_id=${activityId}` + } else if (playType === 'ichiban') { + url = `/pages/activity/yifanshang/index?activity_id=${activityId}` + } else if (playType === 'infinity') { + url = `/pages/activity/wuxianshang/index?activity_id=${activityId}` + } + + if (url) { + uni.redirectTo({ url }) + } else { + uni.navigateBack() + } +} + function copyText(text) { if (!text) return uni.setClipboardData({ diff --git a/pages/orders/index.vue b/pages/orders/index.vue index 891d45d..1effbb0 100644 --- a/pages/orders/index.vue +++ b/pages/orders/index.vue @@ -105,7 +105,7 @@ - + @@ -128,7 +128,7 @@