...
|
...
|
@@ -119,9 +119,19 @@ class MoneyController extends Controller |
|
|
*/
|
|
|
public function messageIndex()
|
|
|
{
|
|
|
$user=$this->getUser();
|
|
|
$data=Db::name('message')->select()->each(function($item){
|
|
|
$item['create_time']=date('Y.m.d H:i:s',$item['create_time']);
|
|
|
});
|
|
|
return $item;
|
|
|
})->toArray();
|
|
|
foreach ($data as $k=>$v){
|
|
|
$re=Db::name('message_read')->where(['user_id'=>$user['id'],'message_id'=>$data[$k]['id']])->find();
|
|
|
if ($re){
|
|
|
$data[$k]['status']=1;
|
|
|
}else{
|
|
|
$data[$k]['status']=0;
|
|
|
}
|
|
|
}
|
|
|
$this->success('获取数据成功',$data);
|
|
|
}
|
|
|
|
...
|
...
|
|