|
@@ -117,8 +117,9 @@ class Message extends Api
|
|
public function getMessage(){
|
|
public function getMessage(){
|
|
$post=$this->request->post();
|
|
$post=$this->request->post();
|
|
$user = User::getByUserId($post['user_id']);
|
|
$user = User::getByUserId($post['user_id']);
|
|
- $config['page']=$post['page'];
|
|
|
|
- $size=$post['size'];
|
|
|
|
|
|
+ $config['page']=empty($post['page'])?1:$post['page'];
|
|
|
|
+ $size=empty($post['size'])?10:$post['size'];
|
|
|
|
+
|
|
$data=array();
|
|
$data=array();
|
|
if($user){
|
|
if($user){
|
|
$wheres['status']=2;
|
|
$wheres['status']=2;
|
|
@@ -218,7 +219,8 @@ class Message extends Api
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- $this->success('',$count);
|
|
|
|
|
|
+ $data['unread']=$count;
|
|
|
|
+ $this->success('',$data);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|