Fix(云灵AI):[#5368]未选择选项卡的情况下点击“下一步”,缺少必填校验

This commit is contained in:
lifizer
2026-06-23 14:14:24 +08:00
parent 9f2fefbf28
commit 6ae771ecf0
+19
View File
@@ -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 {