@@ -141,6 +141,8 @@ class Order extends Base
if (empty($order)) {
$this->error('未找到订单');
}
+ $address = OrderService::getAddressInfo($orderId);
+ $order->address = $address;
// $order->append(['status_text']);
// $order->hidden(explode(',', 'method,transactionid,updatetime,deletetime'));
// $order->expiretime = $order->expiretime - time();
@@ -529,7 +529,14 @@ class OrderService
{
return Order::with(['orderGoods'])
->where('id', $orderId)
- ->where('user_id', $userId)->find();
+ ->where('user_id', $userId)
+ ->find();
+ }
+
+ // 查询地址信息
+ public static function getAddressInfo($orderId)
+ {
+ return OrderAddress::where('order_id', $orderId)->find();