|
|
@@ -181,13 +181,12 @@ class User extends Api
|
|
|
{
|
|
|
$list['data'] = $productOrder->alias('a')
|
|
|
->join("product_list b", "b.id = a.product_id", "left")
|
|
|
- ->join("product_area d", "d.id = a.area_id", "left") //地区 IF(d.city > 0, d.city, "")
|
|
|
- ->field('a.id as order_id,a.product_id,'.'b.'.$this->lan.'_name as name,b.thum as img_url,a.price,a.status,a.type_id,a.create_time,
|
|
|
- d.province,d.city,d.area,d.county')
|
|
|
- ->where('a.user_id', 1261)
|
|
|
+ ->join("product_area d", "d.id = a.area_id", "left") //地区
|
|
|
+ ->field('a.id as order_id,a.product_id,'.'b.'.$this->lan.'_name as name,b.thum as img_url,a.price,a.status,a.type_id,a.create_time,d.province,d.city,d.area,d.county')
|
|
|
+ ->where('a.user_id', $this->auth->id)
|
|
|
->order('a.id DESC')
|
|
|
->paginate($this->pageSize);
|
|
|
- foreach ($list['data'] as $key => &$item) {
|
|
|
+ foreach ($list['data'] as &$item) {
|
|
|
if($item->province > 0) $item->address_id = $item->province.'-';
|
|
|
if($item->city > 0) $item->address_id .= $item->city.'-';
|
|
|
if($item->area > 0) $item->address_id .= $item->area.'-';
|