Commit 3dedd5ff by 杨树贤

地址接口列表报错问题

parent 8aeb99a0
......@@ -17,7 +17,7 @@ class UserAddressApiController extends Controller
{
$userId = $request->user->id;
$data = UserAddressService::getUserAddressList($userId);
return $this->setSuccessData($data['data'],count($data['data']));
return $this->setSuccessData($data,count($data));
}
public function detail(Request $request)
......
......@@ -32,6 +32,8 @@ class BrandController extends Controller
public function info(Request $request)
{
$id = $request->route('id');
$brand = BrandService::getStandardBrandList()
return view('brand.list');
}
}
......@@ -39,4 +39,9 @@ class BrandService
return $standardBrandList;
}
public static function getBrandInfo($)
{
}
}
......@@ -58,7 +58,7 @@ class UserAddressService
}
])->where('user_id', $userId)->orderBy('address_id', 'desc');
$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['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