正在显示
1 个修改的文件
包含
5 行增加
和
5 行删除
| @@ -20,16 +20,16 @@ class MailController extends BaseController | @@ -20,16 +20,16 @@ class MailController extends BaseController | ||
| 20 | public function lists(){ | 20 | public function lists(){ |
| 21 | $mailModel = new MailModel(); | 21 | $mailModel = new MailModel(); |
| 22 | //获取当前用户下的所有站内信 | 22 | //获取当前用户下的所有站内信 |
| 23 | - $lists = $mailModel->where('user_list','like','%,'.$this->uid.',%')->orWhere('user_list', '')->select(['*'])->orderBy($this->order,'desc') | 23 | + $lists = $mailModel->where('user_list','like','%,'.$this->uid.',%')->select(['*'])->orderBy($this->order,'desc') |
| 24 | ->paginate($this->row, ['*'], 'page', $this->page); | 24 | ->paginate($this->row, ['*'], 'page', $this->page); |
| 25 | if(!empty($lists)){ | 25 | if(!empty($lists)){ |
| 26 | $lists = $lists->toArray(); | 26 | $lists = $lists->toArray(); |
| 27 | } | 27 | } |
| 28 | $lists['unreadNum'] = $this->unreadNum($mailUserModel,$lists['total']); | 28 | $lists['unreadNum'] = $this->unreadNum($mailUserModel,$lists['total']); |
| 29 | -// if(!empty($lists['list'])){ | ||
| 30 | -// //验证未读还是已读 | ||
| 31 | -// $lists = $this->verifyRead($lists['list']); | ||
| 32 | -// } | 29 | + if(!empty($lists['list'])){ |
| 30 | + //验证未读还是已读 | ||
| 31 | + $lists = $this->verifyRead($lists['list']); | ||
| 32 | + } | ||
| 33 | $this->response('success',Code::SUCCESS,$lists); | 33 | $this->response('success',Code::SUCCESS,$lists); |
| 34 | } | 34 | } |
| 35 | 35 |
-
请 注册 或 登录 后发表评论