问题优化

feature/main20240421
guojia 9 months ago
parent c187e2cd33
commit 91b9f0252e
  1. 17
      app/store/controller/Merchant.php

@ -33,12 +33,21 @@ class Merchant extends Controller
public function userinfo(): Json public function userinfo(): Json
{ {
$model = new StoreUserModel; $model = new StoreUserModel;
$list = $model->getList($this->request->param()); $list = $model->getList($this->request->param())->toArray();
print_r($list);die; $res = [];
foreach ($list['data'] as $l) {
if (!empty($l['user_name'])) {
array_push($res, $l['user_name']);
}
}
$model2 = new MerchantModel; $model2 = new MerchantModel;
$list = $model2->getList($this->request->param()); $list2 = $model2->getList($this->request->param())->toArray();
return $this->renderSuccess(['storeInfo' => $model2]); $userIds = array_column($list2['data'], "user_name");
$res = array_diff($res, $userIds);
return $this->renderSuccess(compact('res'));
} }
/** /**

Loading…
Cancel
Save