作者 郭盛
1 个管道 的构建 失败 耗费 9 秒

修改订单

... ... @@ -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);
... ...
... ... @@ -257,10 +257,6 @@ class Order extends Backend
->limit($offset, $limit)
->select();
foreach ($list as $row) {
}
$list = collection($list)->toArray();
$type = new \app\admin\model\Pic();
$video = new \app\admin\model\Video();
... ...