会员中心首页产品列表
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\HostModel::indexHostList |
| 所属业务 | 用户管理 |
| 来源模块/系统 | 产品模型 |
功能说明
会员中心首页产品列表
调用示例
$param = ['page' => 1, 'limit' => 1];
$result = (new \app\common\model\HostModel())->indexHostList($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param.page | int | 否 | — | — | 页数 |
param.limit | int | 否 | — | — | 每页条数 |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
list | array | 产品 |
list[].id | int | 产品ID |
list[].product_id | int | 商品ID |
list[].product_name | string | 商品名称 |
list[].name | string | 标识 |
list[].due_time | int | 到期时间 |
list[].status | string | 状态Unpaid未付款Pending开通中Active已开通Suspended已暂停Deleted已删除Failed开通失败 |
list[].client_notes | string | 用户备注 |
list[].type | string | 类型 |
list[].ip | string | IP |
count | int | 产品总数 |
expiring_count | int | 即将到期产品数量 |
正常返回
{
"list": [
{
"id": 1,
"product_id": 1,
"product_name": "示例名称",
"name": "示例名称",
"due_time": 1752984000,
"status": "Active",
"client_notes": "示例说明",
"type": "string",
"ip": "192.0.2.1"
}
],
"count": 1,
"expiring_count": 1
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |