feat: 在创建订单前添加抽奖订阅消息请求
This commit is contained in:
parent
5c89355469
commit
8963827c32
@ -160,6 +160,7 @@
|
||||
import { ref, computed, watch } from 'vue'
|
||||
import { onLoad, onUnload } from '@dcloudio/uni-app'
|
||||
import { getIssueChoices, joinLottery, createWechatOrder, getLotteryResult } from '@/api/appUser'
|
||||
import { requestLotterySubscription } from '@/utils/subscribe'
|
||||
// 公共组件 - uni-app需要直接导入.vue文件
|
||||
import ActivityPageLayout from '@/components/activity/ActivityPageLayout.vue'
|
||||
import ActivityHeader from '@/components/activity/ActivityHeader.vue'
|
||||
@ -372,6 +373,9 @@ async function onPaymentConfirm(paymentData) {
|
||||
uni.showToast({ title: '请先选择位置', icon: 'none' })
|
||||
return
|
||||
}
|
||||
|
||||
// 请求订阅消息 (尽可能早调用以确保在用户交互上下文中)
|
||||
await requestLotterySubscription()
|
||||
|
||||
try {
|
||||
uni.showLoading({ title: '创建订单中...' })
|
||||
|
||||
@ -97,5 +97,5 @@ export function requestSubscriptions(templateIds) {
|
||||
export default {
|
||||
requestLotterySubscription,
|
||||
requestSubscriptions,
|
||||
LOTTERY_RESULT_TEMPLATE_ID
|
||||
LOTTERY_RESULT_TEMPLATE_ID: DEFAULT_LOTTERY_RESULT_TEMPLATE_ID
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user