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 @@