Commit 3dedd5ff by 杨树贤

地址接口列表报错问题

parent 8aeb99a0
...@@ -17,7 +17,7 @@ class UserAddressApiController extends Controller ...@@ -17,7 +17,7 @@ class UserAddressApiController extends Controller
{ {
$userId = $request->user->id; $userId = $request->user->id;
$data = UserAddressService::getUserAddressList($userId); $data = UserAddressService::getUserAddressList($userId);
return $this->setSuccessData($data['data'],count($data['data'])); return $this->setSuccessData($data,count($data));
} }
public function detail(Request $request) public function detail(Request $request)
......
...@@ -23,15 +23,17 @@ class BrandController extends Controller ...@@ -23,15 +23,17 @@ class BrandController extends Controller
* @return \Illuminate\Contracts\Support\Renderable * @return \Illuminate\Contracts\Support\Renderable
*/ */
public function map() public function map()
{ {
$brandList = BrandService::getStandardBrandList(); $brandList = BrandService::getStandardBrandList();
return view('brand.map',compact('brandList')); return view('brand.map',compact('brandList'));
} }
public function info(Request $request) public function info(Request $request)
{ {
$id = $request->route('id');
$brand = BrandService::getStandardBrandList()
return view('brand.list'); return view('brand.list');
} }
} }
...@@ -39,4 +39,9 @@ class BrandService ...@@ -39,4 +39,9 @@ class BrandService
return $standardBrandList; return $standardBrandList;
} }
public static function getBrandInfo($)
{
}
} }
...@@ -58,7 +58,7 @@ class UserAddressService ...@@ -58,7 +58,7 @@ class UserAddressService
} }
])->where('user_id', $userId)->orderBy('address_id', 'desc'); ])->where('user_id', $userId)->orderBy('address_id', 'desc');
$result = $query->get()->toArray(); $result = $query->get()->toArray();
foreach ($result['data'] as &$item) { foreach ($result as &$item) {
$item['create_time'] = date('Y-m-d H:i:s', $item['create_time']); $item['create_time'] = date('Y-m-d H:i:s', $item['create_time']);
$item['country'] = \Arr::get($item['country'], 'name'); $item['country'] = \Arr::get($item['country'], 'name');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment