Fix(云灵AI):[#5368]未选择选项卡的情况下点击“下一步”,缺少必填校验
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user