diff --git a/aiChat/mixins/chatMixinsV2.js b/aiChat/mixins/chatMixinsV2.js index d88bf43..bfbc696 100644 --- a/aiChat/mixins/chatMixinsV2.js +++ b/aiChat/mixins/chatMixinsV2.js @@ -784,6 +784,25 @@ export const chatMixinsV2 = { } }, nextGiftStep() { + const currentStep = this.giftBuyOptions[this.currentGiftStepIndex] + let hasSelection = false + + // 校验是否已选择 + if (currentStep.type === 'option_card') { + const selectedIds = this.giftSelections[currentStep.id] || [] + hasSelection = selectedIds.length > 0 + } else if (currentStep.type === 'price_input') { + hasSelection = !!this.giftBudget + } + + if (!hasSelection) { + uni.showToast({ + title: '请完善信息后再点击下一步', + icon: 'none' + }) + return + } + if (this.currentGiftStepIndex < this.giftBuyOptions.length - 1) { this.currentGiftStepIndex++ } else {