diff --git a/pages/city-activities/city-activities.js b/pages/city-activities/city-activities.js index f784ae9..4ee0796 100644 --- a/pages/city-activities/city-activities.js +++ b/pages/city-activities/city-activities.js @@ -96,6 +96,7 @@ Page({ heat: item.heat || 0, // 使用后端返回的热度字段 isFree: item.priceType === 'free', price: item.priceText || '', + participants: item.current_participants || item.currentParticipants || 0, status: item.status || ((item.current_participants || item.currentParticipants || 0) >= (item.max_participants || item.maxParticipants || 0) && (item.max_participants || item.maxParticipants || 0) > 0 ? 'full' : 'upcoming'), activityGuideQrcode: item.activityGuideQrcode || item.activity_guide_qrcode || '' })) @@ -275,19 +276,16 @@ Page({ return } - wx.showModal({ - title: '确认报名', - content: '确定要报名参加这个活动吗?', - success: (res) => { - if (res.confirm) { - this.handleSignUp(id, index) - } - } + // 2025-02-04: 点击报名直接显示二维码弹窗,不再请求后端报名接口 + const qrCode = activity.activityGuideQrcode || activity.activity_guide_qrcode || this.data.qrcodeImageUrl || 'https://ai-c.maimanji.com/api/common/qrcode?type=group' + this.setData({ + qrcodeImageUrl: qrCode, + showQrcodeModal: true }) }, /** - * 处理报名 + * 处理报名 (Deprecated) */ async handleSignUp(activityId, index) { try { diff --git a/pages/city-activities/city-activities.wxml b/pages/city-activities/city-activities.wxml index e161689..e1ee6e9 100644 --- a/pages/city-activities/city-activities.wxml +++ b/pages/city-activities/city-activities.wxml @@ -76,7 +76,7 @@ - + {{item.participants}}人已报名 立即报名 diff --git a/pages/entertainment/entertainment.wxml b/pages/entertainment/entertainment.wxml index 436f9ce..76bab3d 100644 --- a/pages/entertainment/entertainment.wxml +++ b/pages/entertainment/entertainment.wxml @@ -152,7 +152,7 @@ - + {{item.participants}}人已报名