|
@@ -65,14 +65,18 @@ class Iphone extends Backend |
|
@@ -65,14 +65,18 @@ class Iphone extends Backend |
65
|
->select();
|
65
|
->select();
|
66
|
|
66
|
|
67
|
foreach ($list as $row) {
|
67
|
foreach ($list as $row) {
|
68
|
-
|
|
|
69
|
$row->getRelation('pic')->visible(['title']);
|
68
|
$row->getRelation('pic')->visible(['title']);
|
70
|
- $row->getRelation('video')->visible(['title']);
|
|
|
71
|
}
|
69
|
}
|
72
|
$list = collection($list)->toArray();
|
70
|
$list = collection($list)->toArray();
|
73
|
- foreach ($list as $k=>$v){
|
|
|
74
|
- $list[$k]['user_id'] = Db::name('user')->where('id',$v['user_id'])->value('nickname');
|
|
|
75
|
- $list[$k]['user_phone'] = Db::name('user')->where('id',$v['user_id'])->value('mobile');
|
71
|
+ foreach ($list as &$v){
|
|
|
72
|
+ if(!empty($v['video_id'])){
|
|
|
73
|
+ $video_id = unserialize($v['video_id']);
|
|
|
74
|
+ //获取视频标题
|
|
|
75
|
+ $v['video.title'] = Db::name('video')->where('id',$video_id['id'])->value('title');
|
|
|
76
|
+ }
|
|
|
77
|
+
|
|
|
78
|
+ $v['user_id'] = Db::name('user')->where('id',$v['user_id'])->value('nickname');
|
|
|
79
|
+ $v['user_phone'] = Db::name('user')->where('id',$v['user_id'])->value('mobile');
|
76
|
}
|
80
|
}
|
77
|
$result = array("total" => $total, "rows" => $list);
|
81
|
$result = array("total" => $total, "rows" => $list);
|
78
|
|
82
|
|