|
@@ -97,11 +97,12 @@ class WechatPush extends Base{
|
|
|
$where[]=['belong','=',$post['belong']];
|
|
|
}
|
|
|
$data = $this->model->where($where)->paginate(['list_rows'=>$post['size'],'page'=>$post['page']])
|
|
|
- ->each(function(&$item){
|
|
|
+ ->each(function($item){
|
|
|
if(!empty($item->push_user_info)){
|
|
|
- $item->push_user_info = array_walk($item->push_user_info,function(&$value){
|
|
|
- $value['nickname'] = \app\user\model\User::where(['account_id'=>$value['account_id']])->value('nickname','');
|
|
|
- });
|
|
|
+ $item->push_user_info = array_map(function ($item){
|
|
|
+ $item['nickname'] =\app\user\model\User::where(['account_id'=>$item['account_id']])->value('nickname');
|
|
|
+ return $item;
|
|
|
+ }, $item->push_user_info);
|
|
|
}
|
|
|
});
|
|
|
return success('获取成功',["list"=>$data->items(),"count"=>$data->total()]);
|