From c2fec1953b222170ec01ff9df9097ca395ec4e3a Mon Sep 17 00:00:00 2001 From: kuaifan Date: Tue, 19 Jul 2022 16:41:34 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=B6=88=E6=81=AF=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=94=AF=E6=8C=81=E5=86=8D=E6=AC=A1=E7=BC=96?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/manage/components/DialogWrapper.vue | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index 767811927..66de4a86d 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -947,7 +947,16 @@ export default { }).then(({data}) => { this.sendSuccess(data) }).catch(({msg}) => { - $A.modalError(msg) + $A.modalConfirm({ + icon: 'error', + title: '发送失败', + content: msg, + cancelText: '取消', + okText: '再次编辑', + onOk: () => { + this.msgText = msgText + } + }) }); }, 10) } @@ -984,8 +993,17 @@ export default { complete: _ => this.tempMsgs = this.tempMsgs.filter(({id}) => id != tempId) }).then(({data}) => { this.sendSuccess(data); - }).catch(({msg}) => { - $A.modalError(msg); + }).catch(error => { + $A.modalConfirm({ + icon: 'error', + title: '发送失败', + content: error.msg, + cancelText: '取消', + okText: '重新发送', + onOk: () => { + this.sendRecord(msg) + } + }) }); },