$this->auth->id, ]; $list = Db::name('order')->field('order.*,product.images,product.title,product.category') ->join('product','order.product_id = product.id','LEFT') ->where($where)->order('order.id desc')->autopage()->select(); $list = list_domain_image($list,['images']); if(!empty($list)){ foreach($list as $key => &$item){ //第一个图 $item['image'] = isset($item['images'][0]) ? $item['images'][0] : ''; } } $this->success(1,$list); } }