服务器托管商品列表
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\ServerHostingProductModel::productList |
| 所属业务 | 商品管理 |
| 来源模块/系统 | 模板控制器 |
功能说明
服务器托管商品列表
调用示例
$param = ['page' => 1, 'limit' => 1, 'orderby' => 'id', 'sort' => 'string'];
$result = (new \app\common\model\ServerHostingProductModel())->productList($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param.page | int | 否 | — | — | 页数 |
param.limit | int | 否 | — | — | 每页条数 |
param.orderby | string | 否 | — | — | 排序 id |
param.sort | string | 否 | — | — | 升/降序 asc,desc |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
list | array | 商品 |
list[].id | int | 商品ID |
list[].area_id | int | 区域ID |
list[].first_area | string | 所属区域 |
list[].title | string | 标题 |
list[].region | string | 地域 |
list[].ip_num | string | IP数量 |
list[].bandwidth | string | 带宽 |
list[].defense | string | 防御 |
list[].bandwidth_price | string | 带宽价格 |
list[].bandwidth_price_unit | string | 带宽价格单位,month/M/月year/M/年 |
list[].selling_price | string | 售价 |
list[].selling_price_unit | string | 售价单位,month月year年 |
list[].product_id | int | 关联商品ID |
count | int | 商品数量 |
正常返回
{
"list": [
{
"id": 1,
"area_id": 1,
"first_area": "string",
"title": "示例名称",
"region": "string",
"ip_num": "192.0.2.1",
"bandwidth": "string",
"defense": "string",
"bandwidth_price": "string",
"bandwidth_price_unit": "string",
"selling_price": "string",
"selling_price_unit": "string",
"product_id": 1
}
],
"count": 1
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |