|
...
|
...
|
@@ -20,16 +20,16 @@ class MailController extends BaseController |
|
|
|
public function lists(){
|
|
|
|
$mailModel = new MailModel();
|
|
|
|
//获取当前用户下的所有站内信
|
|
|
|
$lists = $mailModel->where('user_list','like','%,'.$this->uid.',%')->orWhere('user_list', '')->select(['*'])->orderBy($this->order,'desc')
|
|
|
|
$lists = $mailModel->where('user_list','like','%,'.$this->uid.',%')->select(['*'])->orderBy($this->order,'desc')
|
|
|
|
->paginate($this->row, ['*'], 'page', $this->page);
|
|
|
|
if(!empty($lists)){
|
|
|
|
$lists = $lists->toArray();
|
|
|
|
}
|
|
|
|
$lists['unreadNum'] = $this->unreadNum($mailUserModel,$lists['total']);
|
|
|
|
// if(!empty($lists['list'])){
|
|
|
|
// //验证未读还是已读
|
|
|
|
// $lists = $this->verifyRead($lists['list']);
|
|
|
|
// }
|
|
|
|
if(!empty($lists['list'])){
|
|
|
|
//验证未读还是已读
|
|
|
|
$lists = $this->verifyRead($lists['list']);
|
|
|
|
}
|
|
|
|
$this->response('success',Code::SUCCESS,$lists);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|