From ea5c37459edde5b7014bbee9ece4cb82fdeab421 Mon Sep 17 00:00:00 2001 From: guojia <445241500@qq.com> Date: Sun, 28 Apr 2024 16:00:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/store/controller/Merchant.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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')); } /**