123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace app\services\cashier;
- use app\services\BaseServices;
- use app\services\user\UserWechatuserServices;
- class UserServices extends BaseServices
- {
- protected $userType = [
- 'wechat' => '公众号',
- 'routine' => '小程序',
- 'h5' => 'H5',
- 'pc' => 'PC',
- 'app' => 'APP'
- ];
-
- public function getUserList(array $where)
- {
-
- $services = app()->make(UserWechatuserServices::class);
- [$list, $count] = $services->getWhereUserList($where, 'u.uid,avatar,u.nickname,phone,u.user_type,now_money,integral');
- foreach ($list as &$item) {
- $item['user_type'] = $this->userType[$item['user_type']] ?? '其他';
- }
- return compact('list', 'count');
- }
- }
|