diff --git a/aiChat/mixins/chatMixinsV2.js b/aiChat/mixins/chatMixinsV2.js index 9205bf6..d88bf43 100644 --- a/aiChat/mixins/chatMixinsV2.js +++ b/aiChat/mixins/chatMixinsV2.js @@ -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 }) } }