mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-04 10:58:18 +00:00
perf 优化全局评论
This commit is contained in:
parent
2ee349605e
commit
61e958d757
@ -1026,14 +1026,14 @@ class WorkflowController extends AbstractController
|
||||
}
|
||||
}
|
||||
// 全局评论
|
||||
if(isset($res['global_comment_obj'])){
|
||||
foreach ($res['global_comment_obj'] as $k => &$globalComment) {
|
||||
if(isset($res['global_comments'])){
|
||||
foreach ($res['global_comments'] as $k => &$globalComment) {
|
||||
$info = User::whereUserid($globalComment['user_id'])->first();
|
||||
if (!$info) {
|
||||
continue;
|
||||
}
|
||||
$res['global_comment_obj'][$k]['userimg'] = User::getAvatar($info->userid, $info->userimg, $info->email, $info->nickname);
|
||||
$res['global_comment_obj'][$k]['nickname'] = $info->nickname;
|
||||
$res['global_comments'][$k]['userimg'] = User::getAvatar($info->userid, $info->userimg, $info->email, $info->nickname);
|
||||
$res['global_comments'][$k]['nickname'] = $info->nickname;
|
||||
}
|
||||
}
|
||||
$info = User::whereUserid($res['start_user_id'])->first();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user