From 42d39a830e1df6fae862a11a0dada206538b8e9a Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sat, 2 Mar 2024 13:07:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=9C=80=E5=90=8E=E6=B6=88=E6=81=AF=E6=94=B9?= =?UTF-8?q?=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/pages/manage/components/DialogWrapper.vue | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index 41d85076f..de81a9529 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -1061,10 +1061,6 @@ export default { return this.dialogData.extra_quote_id || 0 }, - quoteUpdate() { - return this.dialogData.extra_quote_type === 'update' - }, - quoteData() { return this.quoteId ? this.allMsgs.find(({id}) => id === this.quoteId) : null }, @@ -1437,7 +1433,7 @@ export default { .replace(/(.*?<\/span>.*?<\/span>.*?<\/span>)(\x20)?/, "$1 ") } // - if (this.quoteUpdate) { + if (this.dialogData.extra_quote_type === 'update') { // 修改 if (textType === "text") { textBody = textBody.replace(new RegExp(`src=(["'])${$A.apiUrl('../')}`, "g"), "src=$1{{RemoteURL}}") @@ -1462,7 +1458,7 @@ export default { method: 'post', complete: _ => this.$store.dispatch("cancelLoad", `msg-${update_id}`) }).then(({data}) => { - this.sendSuccess(data) + this.sendSuccess(data, 0, true) this.onPositionId(update_id) }).catch(({msg}) => { $A.modalError(msg) @@ -2004,7 +2000,7 @@ export default { } }, - sendSuccess(data, tempId = 0) { + sendSuccess(data, tempId = 0, isUpdate = false) { if ($A.isArray(data)) { data.some(item => { this.sendSuccess(item, tempId) @@ -2022,7 +2018,7 @@ export default { }, 1000) } this.$store.dispatch("saveDialogMsg", data); - if (!this.quoteUpdate) { + if (!isUpdate) { this.$store.dispatch("increaseTaskMsgNum", data); this.$store.dispatch("increaseMsgReplyNum", data); this.$store.dispatch("updateDialogLastMsg", data);