API指定用户列表
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\ApiModel::clientList |
| 所属业务 | 用户管理 |
| 来源模块/系统 | API密钥模型 |
功能说明
API指定用户列表
调用示例
$param = ['page' => 1, 'limit' => 1, 'orderby' => 'id', 'sort' => 'string'];
$result = (new \app\common\model\ApiModel())->clientList($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param.page | int | 否 | — | — | 页数 |
param.limit | int | 否 | — | — | 每页条数 |
param.orderby | string | 否 | — | — | 排序 id |
param.sort | string | 否 | — | — | 升/降序 asc,desc |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
list | array | 用户 |
list[].id | int | 用户ID |
list[].username | string | 姓名 |
list[].email | string | 邮箱 |
list[].phone_code | int | 国际电话区号 |
list[].phone | string | 手机号 |
list[].status | int | 状态;0:禁用,1:正常 |
list[].company | string | 公司 |
list[].host_num | int | 产品数量 |
list[].host_active_num | int | 已激活产品数量 |
list[].custom_field | array | 自定义字段 |
list[].custom_field[].name | string | 名称 |
list[].custom_field[].value | string | 值 |
list[].certification | bool | 是否实名认证true是false否 |
list[].certification_type | string | 实名类型person个人company企业 |
count | int | 用户总数 |
正常返回
{
"list": [
{
"id": 1,
"username": "示例名称",
"email": "user@example.com",
"phone_code": 86,
"phone": "13800138000",
"status": 1,
"company": "string",
"host_num": 1,
"host_active_num": 1,
"custom_field": [
{
"name": "示例名称",
"value": "string"
}
],
"certification": true,
"certification_type": "string"
}
],
"count": 1
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |