作者 lyh

gx

@@ -50,9 +50,11 @@ class VisitLogic extends BaseLogic @@ -50,9 +50,11 @@ class VisitLogic extends BaseLogic
50 public function downloadItem($map,$page,$row,$order,$filed = ['*']){ 50 public function downloadItem($map,$page,$row,$order,$filed = ['*']){
51 $lists = $this->model->lists($map,$page,$row,$order,$filed); 51 $lists = $this->model->lists($map,$page,$row,$order,$filed);
52 $itemModel = new VisitItem(); 52 $itemModel = new VisitItem();
53 - foreach ($lists as $k => $v){ 53 + if(!empty($lists) && !empty($lists['list'])){
  54 + foreach ($lists['list'] as $k => $v){
54 // $v['sub'] = $itemModel->list(['customer_visit_id' => $v['id']]); 55 // $v['sub'] = $itemModel->list(['customer_visit_id' => $v['id']]);
55 - $lists[$k] = $v; 56 + $lists['list'][$k] = $v;
  57 + }
56 } 58 }
57 return $this->success($lists); 59 return $this->success($lists);
58 } 60 }