diff --git a/app/store/controller/goods/Source.php b/app/store/controller/goods/Source.php index 2f6ddc94..4b808914 100644 --- a/app/store/controller/goods/Source.php +++ b/app/store/controller/goods/Source.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace app\store\controller\goods; +use app\store\model\User; use think\response\Json; use app\store\controller\Controller; use app\store\model\GoodsSource as GoodsSourceModel; @@ -28,6 +29,9 @@ class Source extends Controller { $modal = new GoodsSourceModel; $list = $modal->getList($this->request->param()); + $list->each(function ($v, $k){ + $v['nickname'] = User::get($v['user_id'])->nick_name ?? ''; + }); return $this->renderSuccess(compact('list')); }