|
|
@ -87,10 +87,9 @@ class OrderOnlineController extends BaseController |
|
|
throw new ErrorCodeException(ErrorCode::NOT_BIND_TEL_ERROR); |
|
|
throw new ErrorCodeException(ErrorCode::NOT_BIND_TEL_ERROR); |
|
|
} |
|
|
} |
|
|
//获取用户收货地址
|
|
|
//获取用户收货地址
|
|
|
$address = UserAddress::query()->where([ |
|
|
|
|
|
['user_id','=',$userId], |
|
|
|
|
|
['is_default','=',1], |
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
$address = UserAddress::query()->where('user_id',$userId) |
|
|
|
|
|
->orderByDesc('is_default') |
|
|
|
|
|
->orderByDesc('updated_at') |
|
|
->first(); |
|
|
->first(); |
|
|
$res['location'] = [ |
|
|
$res['location'] = [ |
|
|
'address' => $address, |
|
|
'address' => $address, |
|
|
|