修复转发没有选择转发人也可以提交

This commit is contained in:
kuaifan 2022-06-05 20:54:14 +08:00
parent d456ea68f7
commit 2f649c0a9e
2 changed files with 8 additions and 0 deletions

View File

@ -646,6 +646,10 @@ class DialogController extends AbstractController
if (empty($msg)) { if (empty($msg)) {
return Base::retError("消息不存在或已被删除"); return Base::retError("消息不存在或已被删除");
} }
if (empty($userids)) {
return Base::retError("请选择转发成员");
}
//
return $msg->forwardMsg($userids, $user->userid); return $msg->forwardMsg($userids, $user->userid);
} }

View File

@ -785,6 +785,10 @@ export default {
}; };
this.forwardShow = true; this.forwardShow = true;
} else if (type === 'submit') { } else if (type === 'submit') {
if ($A.arrayLength(this.forwardData.userids) === 0) {
$A.messageWarning("请选择转发成员");
return
}
this.forwardLoad = true; this.forwardLoad = true;
this.$store.dispatch("call", { this.$store.dispatch("call", {
url: 'dialog/msg/forward', url: 'dialog/msg/forward',