From 9e8988acce153f42856dcd6ce8627b4e36271fcb Mon Sep 17 00:00:00 2001 From: wanghousheng Date: Sat, 23 Mar 2024 17:00:07 +0800 Subject: [PATCH] 1 --- app/api/model/Order.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/api/model/Order.php b/app/api/model/Order.php index 4c8e2214..0a1dd7ee 100644 --- a/app/api/model/Order.php +++ b/app/api/model/Order.php @@ -471,11 +471,13 @@ class Order extends OrderModel // 查询订单记录 $order = static::detail($where, $with); empty($order) && throwError('订单不存在'); - //这边后面改成多商户的话需要根据storeid去获取信息 + $service = new StoreService; $info = $service->data(); - $order->storeInfo = $info; + if (!empty($info['storeInfo'])) { + $order->storeInfo = $info['storeInfo']->toArray(); + } return $order; }