...
|
...
|
@@ -65,14 +65,18 @@ class Iphone extends Backend |
|
|
->select();
|
|
|
|
|
|
foreach ($list as $row) {
|
|
|
|
|
|
$row->getRelation('pic')->visible(['title']);
|
|
|
$row->getRelation('video')->visible(['title']);
|
|
|
}
|
|
|
$list = collection($list)->toArray();
|
|
|
foreach ($list as $k=>$v){
|
|
|
$list[$k]['user_id'] = Db::name('user')->where('id',$v['user_id'])->value('nickname');
|
|
|
$list[$k]['user_phone'] = Db::name('user')->where('id',$v['user_id'])->value('mobile');
|
|
|
foreach ($list as &$v){
|
|
|
if(!empty($v['video_id'])){
|
|
|
$video_id = unserialize($v['video_id']);
|
|
|
//获取视频标题
|
|
|
$v['video.title'] = Db::name('video')->where('id',$video_id['id'])->value('title');
|
|
|
}
|
|
|
|
|
|
$v['user_id'] = Db::name('user')->where('id',$v['user_id'])->value('nickname');
|
|
|
$v['user_phone'] = Db::name('user')->where('id',$v['user_id'])->value('mobile');
|
|
|
}
|
|
|
$result = array("total" => $total, "rows" => $list);
|
|
|
|
...
|
...
|
|