diff --git a/app/store/controller/Merchant.php b/app/store/controller/Merchant.php index 12fa7031..6f7c0db9 100644 --- a/app/store/controller/Merchant.php +++ b/app/store/controller/Merchant.php @@ -33,11 +33,11 @@ class Merchant extends Controller public function userinfo(): Json { $model = new StoreUserModel; - $list = $model->getList($this->request->param())->toArray(); - $res = []; - foreach ($list['data'] as $l) { + $listUser = $model->getList($this->request->param())->toArray(); + $list = []; + foreach ($listUser['data'] as $l) { if (!empty($l['user_name'])) { - array_push($res, $l['user_name']); + array_push($list, $l['user_name']); } } @@ -45,9 +45,9 @@ class Merchant extends Controller $list2 = $model2->getList($this->request->param())->toArray(); $userIds = array_column($list2['data'], "user_name"); - $res = array_diff($res, $userIds); + $list = array_diff($list, $userIds); - return $this->renderSuccess(compact('res')); + return $this->renderSuccess(compact('list')); } /**