正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
@@ -34,8 +34,9 @@ class AdminOrderController extends AdminBaseController{ | @@ -34,8 +34,9 @@ class AdminOrderController extends AdminBaseController{ | ||
34 | $data=$Order->alias('a') | 34 | $data=$Order->alias('a') |
35 | ->field('a.*,b.serial_number,b.hospital') | 35 | ->field('a.*,b.serial_number,b.hospital') |
36 | ->join('equipment b','a.mac_address=b.mac_address') | 36 | ->join('equipment b','a.mac_address=b.mac_address') |
37 | - ->paginate(10); | ||
38 | - dump($data->toArray()); | 37 | + ->paginate(10)->items(function ($item){ |
38 | + $item['time']=($item['end_time']-$item['start_time'])/3600; | ||
39 | + }); | ||
39 | $this->assign('data',$data); | 40 | $this->assign('data',$data); |
40 | return $this->fetch(); | 41 | return $this->fetch(); |
41 | } | 42 | } |
-
请 注册 或 登录 后发表评论