diff --git a/app/api/model/Order.php b/app/api/model/Order.php index 0e4da0fb..184a6b78 100644 --- a/app/api/model/Order.php +++ b/app/api/model/Order.php @@ -120,7 +120,17 @@ class Order extends OrderModel ->where('user_id', '=', $userId) ->where('is_delete', '=', 0) ->order(['create_time' => 'desc']); - return $query->paginate(15); + $list = $query->paginate(15); + //这边后面改成多商户的话需要根据storeid去获取信息 + $service = new StoreService; + $info = $service->data()['storeInfo']->toArray(); + if (!empty($info['storeInfo'])) { + $info = $info['storeInfo']->toArray(); + foreach ($list['data'] as &$v) { + $v['storeInfo'] = $info; + } + } + return $list; } /**