diff --git a/aiChat/mixins/chatMixinsV2.js b/aiChat/mixins/chatMixinsV2.js index 274f7e5..1dc03af 100644 --- a/aiChat/mixins/chatMixinsV2.js +++ b/aiChat/mixins/chatMixinsV2.js @@ -507,7 +507,7 @@ export const chatMixinsV2 = { uniqueId: _this.attr.productSelect !== undefined ? _this.attr.productSelect.unique : '' }).then(function (res) { try { - _this.$set(_this.attr, 'cartAttr', false) + _this.closeAttrWindow() const { cartId } = res.data if (type === 1) { uni.navigateTo({ @@ -534,6 +534,9 @@ export const chatMixinsV2 = { _this.buyLoading = false }) }, + closeAttrWindow() { + this.$set(this.attr, 'cartAttr', false) + }, hotelItemClickHandle(item) { this.audioStopHandle() this.$yrouter.push({ diff --git a/aiChat/views/index.vue b/aiChat/views/index.vue index 897642e..4aef3b3 100644 --- a/aiChat/views/index.vue +++ b/aiChat/views/index.vue @@ -645,6 +645,7 @@ export default { }, // 创建新会话 createNewHandle() { + this.closeAttrWindow() if (this.audioContext) { this.audioContext.stop() } @@ -681,9 +682,6 @@ export default { }) } } else { - if (this.$refs.attrWindow && this.$refs.attrWindow.attr) { - this.$refs.attrWindow.attr.cartAttr = false - } this.createNewHandle() } }