Fix(云灵AI):[#5351]【送礼预设流程】在最后一步,快速连续点击两次「下一步」按钮,触发重复提交请求,对话页出现两条加载中的 AI 回复
This commit is contained in:
@@ -53,7 +53,8 @@ export const chatMixinsV2 = {
|
||||
exceptionConfig: {
|
||||
model_exception: '您提的问题未能理解,云灵思想跑偏啦,重新整理一下问题或者重新提问,让云灵再试试!',
|
||||
voice_exception: ''
|
||||
}
|
||||
},
|
||||
giftStepLoading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -217,6 +218,7 @@ export const chatMixinsV2 = {
|
||||
handleLoginFailure()
|
||||
return
|
||||
}
|
||||
if (this.loading) return
|
||||
const prompt = params.prompt
|
||||
if (params.init !== 1) {
|
||||
_this.chatMessageList.push({
|
||||
@@ -796,6 +798,7 @@ export const chatMixinsV2 = {
|
||||
}
|
||||
},
|
||||
finishGiftSteps() {
|
||||
if (this.giftStepLoading || this.loading) return
|
||||
const selectedSteps = []
|
||||
this.giftBuyOptions.forEach(step => {
|
||||
if (step.type === 'option_card') {
|
||||
@@ -822,6 +825,7 @@ export const chatMixinsV2 = {
|
||||
})
|
||||
console.log(selectedSteps)
|
||||
uni.showLoading()
|
||||
this.giftStepLoading = true
|
||||
getGiftRecommendPrompt(selectedSteps).then(res => {
|
||||
const { success, data } = res
|
||||
if (success) {
|
||||
@@ -833,6 +837,7 @@ export const chatMixinsV2 = {
|
||||
}
|
||||
}).finally(() => {
|
||||
uni.hideLoading()
|
||||
this.giftStepLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user