mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 19:23:26 +00:00
perf: 消息发送失败支持再次编辑
This commit is contained in:
parent
f7061d1a8d
commit
c2fec1953b
@ -947,7 +947,16 @@ export default {
|
|||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
this.sendSuccess(data)
|
this.sendSuccess(data)
|
||||||
}).catch(({msg}) => {
|
}).catch(({msg}) => {
|
||||||
$A.modalError(msg)
|
$A.modalConfirm({
|
||||||
|
icon: 'error',
|
||||||
|
title: '发送失败',
|
||||||
|
content: msg,
|
||||||
|
cancelText: '取消',
|
||||||
|
okText: '再次编辑',
|
||||||
|
onOk: () => {
|
||||||
|
this.msgText = msgText
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}, 10)
|
}, 10)
|
||||||
}
|
}
|
||||||
@ -984,8 +993,17 @@ export default {
|
|||||||
complete: _ => this.tempMsgs = this.tempMsgs.filter(({id}) => id != tempId)
|
complete: _ => this.tempMsgs = this.tempMsgs.filter(({id}) => id != tempId)
|
||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
this.sendSuccess(data);
|
this.sendSuccess(data);
|
||||||
}).catch(({msg}) => {
|
}).catch(error => {
|
||||||
$A.modalError(msg);
|
$A.modalConfirm({
|
||||||
|
icon: 'error',
|
||||||
|
title: '发送失败',
|
||||||
|
content: error.msg,
|
||||||
|
cancelText: '取消',
|
||||||
|
okText: '重新发送',
|
||||||
|
onOk: () => {
|
||||||
|
this.sendRecord(msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user