diff --git a/admin/controllers/receiver/Orders.php b/admin/controllers/receiver/Orders.php index 7b8abdaf..2c679a16 100644 --- a/admin/controllers/receiver/Orders.php +++ b/admin/controllers/receiver/Orders.php @@ -42,20 +42,20 @@ class Orders extends HD_Controller $status_arr[] = array("id" => $key, "name" => $value, "cate" => [], "count" => $count); } $where = ['status>=' => 0]; - if($this->admin_biz_str){ + if ($this->admin_biz_str) { $where["biz_id in ($this->admin_biz_str)"] = null; } $params['count_all'] = $this->receiver_orders_model->count($where);//全部 $params['list_type'] = 'all'; - if($this->admin_biz_str){ + if ($this->admin_biz_str) { $params['admin_biz_str'] = $this->admin_biz_str; } $result = $this->orderslist->lists($params['status_pid'], $params); $this->data = $result; //获取品牌 - $brand_rows = $this->auto_brand_model->select(['status>'=>0], 'initial asc', 0, 0, 'id,name'); + $brand_rows = $this->auto_brand_model->select(['status>' => 0], 'initial asc', 0, 0, 'id,name'); $brands = []; - if($brand_rows){ + if ($brand_rows) { foreach ($brand_rows as $v) { $brands[] = array( 'id' => $v['id'], @@ -278,7 +278,7 @@ class Orders extends HD_Controller $row['of_title'] = $of_title; } $row['p_time'] = date('Y-m-d', strtotime($customers['p_time'])); - $row['money_json'] = json_decode($row['money_json'], true); + $row['money_json'] = $row['money_json'] ? json_decode($row['money_json'], true) : []; $jsondata = $row['jsondata'] ? json_decode($row['jsondata'], true) : array(); $row['status'] = intval($row['status']); $row['c_time'] = date('Y-m-d', $row['c_time']); @@ -321,14 +321,14 @@ class Orders extends HD_Controller $img_data['delivery_ck_img'] && $img_data['delivery_ck_img'] = build_qiniu_image_url($img_data['delivery_ck_img']); $img_data['bill_img'] && $img_data['bill_img'] = build_qiniu_image_url($img_data['bill_img']); - if($img_data['insurance_img']){ + if ($img_data['insurance_img']) { $img_data['insurance_img'] = build_qiniu_image_url($img_data['insurance_img']); - strstr($img_data['insurance_img'],'.pdf') && $img_data['insurance_pdf'] = $img_data['insurance_img']; + strstr($img_data['insurance_img'], '.pdf') && $img_data['insurance_pdf'] = $img_data['insurance_img']; } - if($img_data['business_img']){ + if ($img_data['business_img']) { $img_data['business_img'] = build_qiniu_image_url($img_data['business_img']); - strstr($img_data['business_img'],'.pdf') && $img_data['business_pdf'] = $img_data['business_img']; + strstr($img_data['business_img'], '.pdf') && $img_data['business_pdf'] = $img_data['business_img']; } $row['img_data'] = $img_data;