问题处理

feature/main20240421
guojia 7 months ago
parent 91b9f0252e
commit ea5c37459e
  1. 12
      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'));
}
/**

Loading…
Cancel
Save