pull/1/head
lqmac 9 months ago
parent 1533f61ad3
commit 054a5b96ba
  1. 13
      app/api/controller/User.php
  2. 1
      app/store/model/User.php

@ -14,6 +14,7 @@ namespace app\api\controller;
use app\api\model\Agreement as AgreementModel;
use app\api\model\User as UserModel;
use app\store\model\User as StoreUserModel;
use app\api\model\user\BalanceLog;
use app\api\model\user\GoodSource as GoodsSourceModel;
use app\api\model\user\InvoiceOrder;
@ -315,5 +316,17 @@ class User extends Controller
$Qrcode = new InviteUser($userInfo, 'MP-WEIXIN');
return $this->renderSuccess(['imageUrl' => $Qrcode->getImage()]);
}
/**
* 用户列表
* @return Json
* @throws \think\db\exception\DbException
*/
public function list(): Json
{
// 用户列表
$model = new StoreUserModel;
$list = $model->getList($this->request->param());
return $this->renderSuccess(compact('list'));
}
}

@ -111,6 +111,7 @@ class User extends UserModel
$filter = [];
// 会员昵称
!empty($params['search']) && $filter[] = ['nick_name|mobile', 'like', "%{$params['search']}%"];
!empty($params['user_type']) && $filter[] = ['user_type', 'in', explode(",", $params['user_type'])];
// 用户性别
$params['gender'] > -1 && $filter[] = ['gender', '=', (int)$params['gender']];
// 用户等级

Loading…
Cancel
Save