用户详情
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\ClientModel::indexClient |
| 所属业务 | 用户管理 |
| 来源模块/系统 | 用户模型 |
功能说明
用户详情
调用示例
$id = 1;
$result = (new \app\common\model\ClientModel())->indexClient($id);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
id | int | 是 | — | required | 用户ID |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
id | int | 用户ID |
username | string | 姓名 |
email | string | 邮箱 |
phone_code | int | 国际电话区号 |
phone | string | 手机号 |
company | string | 公司 |
country_id | int | 国家ID |
address | string | 地址 |
language | string | 语言 |
notes | string | 备注 |
status | int | 状态;0:禁用,1:正常,后台使用 |
register_time | int | 注册时间,后台使用 |
last_login_time | int | 上次登录时间,后台使用 |
last_login_ip | string | 上次登录IP,后台使用 |
credit | string | 余额 |
consume | string | 消费,后台使用 |
refund | string | 退款,后台使用 |
withdraw | string | 提现,后台使用 |
host_num | int | 产品数量,后台使用 |
host_active_num | int | 已激活产品数量,后台使用 |
login_logs | array | 登录记录,后台使用 |
login_logs[].ip | string | IP |
login_logs[].login_time | int | 登录时间 |
login_logs[].register_time | int | 注册时间 |
certification | boolean | 是否实名认证,后台使用 |
certification_detail | object | 实名认证详情(当certification==true时,才会有此字段),后台使用 |
certification_detail.company | object | 企业实名认证详情 |
client.certification_detail.company.card_name | string | 认证姓名 |
client.certification_detail.company.card_type | int | 证件类型:1身份证、2港澳通行证、3台湾通行证、4港澳居住证、5台湾居住证、6海外护照、7中国以外驾照、8其他 |
client.certification_detail.company.card_number | string | 证件号 |
client.certification_detail.company.phone | string | 手机号 |
client.certification_detail.company.status | int | 状态1已认证,2未通过,3待审核,4已提交资料 |
client.certification_detail.company.company | string | 公司名称 |
client.certification_detail.company.company_organ_code | string | 公司代码 |
client.certification_detail.company.img_one | string | 身份证正面 |
client.certification_detail.company.img_two | string | 身份证反面 |
client.certification_detail.company.img_three | string | 营业执照 |
client.certification_detail.company.auth_fail | string | 失败原因 |
certification_detail.person | object | 个人实名认证详情 |
client.certification_detail.person.card_name | string | 认证姓名 |
client.certification_detail.person.card_type | int | 证件类型:1身份证、2港澳通行证、3台湾通行证、4港澳居住证、5台湾居住证、6海外护照、7中国以外驾照、8其他 |
client.certification_detail.person.card_number | string | 证件号 |
client.certification_detail.person.phone | string | 手机号 |
client.certification_detail.person.status | int | 状态1已认证,2未通过,3待审核,4已提交资料 |
client.certification_detail.person.img_one | string | 身份证正面 |
client.certification_detail.person.img_two | string | 身份证反面 |
client.certification_detail.person.img_three | string | 营业执照 |
client.certification_detail.person.auth_fail | string | 失败原因 |
client.customfield | object | 自定义字段 |
client.currency_prefix | string | 货币符号,前台使用 |
client.oauth | array | 三方登录,前台使用 |
client.oauth[].name | string | 标识 |
client.oauth[].title | string | 名称 |
client.oauth[].url | string | 跳转链接 |
client.oauth[].link | bool | 是否绑定true是false否 |
client.set_operate_password | bool | 是否设置了操作密码 |
client.notice_open | int | 是否接收短信、邮件通知,1是默认0否 |
client.notice_method | string | 通知方式:all所有,email邮件,sms短信 |
client.receive_sms | int | 接收短信(0=关闭1=开启) |
client.receive_email | int | 接收邮件(0=关闭1=开启) |
client.mp_weixin_notice | int | 微信公众号关注状态(0=未关注1=已关注) |
client.credit_remind | int | 余额提醒:0关闭默认,1开启 |
client.credit_remind_amount | float | 阈值 |
正常返回
{
"id": 1,
"username": "示例名称",
"email": "user@example.com",
"phone_code": 86,
"phone": "13800138000",
"company": "string",
"country_id": 1,
"address": "string",
"language": "zh-cn",
"notes": "示例说明",
"status": 1,
"register_time": 1752984000,
"last_login_time": 1752984000,
"last_login_ip": "192.0.2.1",
"credit": "string",
"consume": "string",
"refund": "string",
"withdraw": "string",
"host_num": 1,
"host_active_num": 1,
"login_logs": [
{
"ip": "192.0.2.1",
"login_time": 1752984000,
"register_time": 1752984000
}
],
"certification": true,
"certification_detail": {
"company": {},
"person": {}
},
"client": {
"certification_detail": {
"company": {
"card_name": "示例名称",
"card_type": 1,
"card_number": "string",
"phone": "13800138000",
"status": 1,
"company": "string",
"company_organ_code": "123456",
"img_one": "string",
"img_two": "string",
"img_three": "string",
"auth_fail": "string"
},
"person": {
"card_name": "示例名称",
"card_type": 1,
"card_number": "string",
"phone": "13800138000",
"status": 1,
"img_one": "string",
"img_two": "string",
"img_three": "string",
"auth_fail": "string"
}
},
"customfield": {},
"currency_prefix": "CNY",
"oauth": [
{
"name": "示例名称",
"title": "示例名称",
"url": "https://example.com/callback",
"link": true
}
],
"set_operate_password": true,
"notice_open": 1,
"notice_method": "string",
"receive_sms": 1,
"receive_email": 1,
"mp_weixin_notice": 1,
"credit_remind": 1,
"credit_remind_amount": 0.01
}
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |