物理服务器数据
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\PhysicalServerProductModel::webData |
| 所属业务 | 公共接口 |
| 来源模块/系统 | 模板控制器 |
功能说明
物理服务器数据
调用示例
$result = (new \app\common\model\PhysicalServerProductModel())->webData();参数
该函数/方法无需传入参数。
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
list | array | 物理服务器产品配置 |
list[].name | string | 一级区域名称 |
list[].children | array | 二级区域 |
list[].children[].id | int | 二级区域ID |
list[].children[].name | string | 二级区域名称 |
list[].children[].children | array | 商品 |
list[].children[].children[].id | int | 商品ID |
list[].children[].children[].area_id | int | 区域ID |
list[].children[].children[].title | string | 标题 |
list[].children[].children[].description | string | 描述 |
list[].children[].children[].cpu | string | 处理器 |
list[].children[].children[].memory | array | 内存 |
list[].children[].children[].disk | array | 硬盘 |
list[].children[].children[].ip_num | array | IP数量 |
list[].children[].children[].bandwidth | array | 带宽 |
list[].children[].children[].duration | array | 时长 |
list[].children[].children[].tag | array | 标签 |
list[].children[].children[].original_price | string | 原价 |
list[].children[].children[].original_price_unit | string | 原价单位 |
list[].children[].children[].selling_price | string | 售价 |
list[].children[].children[].selling_price_unit | string | 售价单位 |
list[].children[].children[].product_id | int | 关联商品ID |
banner | array | 轮播图 |
banner[].id | int | 轮播图ID |
banner[].img | string | 图片 |
banner[].url | string | 跳转链接 |
banner[].notes | string | 备注 |
more_offers | int | 更多优惠0关闭1开启 |
discount | array | 优惠 |
discount[].id | int | 优惠ID |
discount[].title | string | 标题 |
discount[].description | string | 描述 |
discount[].url | string | 跳转链接 |
正常返回
{
"list": [
{
"name": "示例名称",
"children": [
{
"id": 1,
"name": "示例名称",
"children": [
{
"id": 1,
"area_id": 1,
"title": "示例名称",
"description": "192.0.2.1",
"cpu": "string",
"memory": [
"string"
],
"disk": [
"string"
],
"ip_num": [
"192.0.2.1"
],
"bandwidth": [
1
],
"duration": [
"string"
],
"tag": [
"string"
],
"original_price": "string",
"original_price_unit": "string",
"selling_price": "string",
"selling_price_unit": "string",
"product_id": 1
}
]
}
]
}
],
"banner": [
{
"id": 1,
"img": "string",
"url": "https://example.com/callback",
"notes": "示例说明"
}
],
"more_offers": 1,
"discount": [
{
"id": 1,
"title": "示例名称",
"description": "192.0.2.1",
"url": "https://example.com/callback"
}
]
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |