智简魔方文档

物理服务器数据

方法概览

项目内容
文档类型PHP 类方法
方法标识app\common\model\PhysicalServerProductModel::webData
所属业务公共接口
来源模块/系统模板控制器

功能说明

物理服务器数据

调用示例

$result = (new \app\common\model\PhysicalServerProductModel())->webData();

参数

该函数/方法无需传入参数。

返回值

返回项类型说明
listarray物理服务器产品配置
list[].namestring一级区域名称
list[].childrenarray二级区域
list[].children[].idint二级区域ID
list[].children[].namestring二级区域名称
list[].children[].childrenarray商品
list[].children[].children[].idint商品ID
list[].children[].children[].area_idint区域ID
list[].children[].children[].titlestring标题
list[].children[].children[].descriptionstring描述
list[].children[].children[].cpustring处理器
list[].children[].children[].memoryarray内存
list[].children[].children[].diskarray硬盘
list[].children[].children[].ip_numarrayIP数量
list[].children[].children[].bandwidtharray带宽
list[].children[].children[].durationarray时长
list[].children[].children[].tagarray标签
list[].children[].children[].original_pricestring原价
list[].children[].children[].original_price_unitstring原价单位
list[].children[].children[].selling_pricestring售价
list[].children[].children[].selling_price_unitstring售价单位
list[].children[].children[].product_idint关联商品ID
bannerarray轮播图
banner[].idint轮播图ID
banner[].imgstring图片
banner[].urlstring跳转链接
banner[].notesstring备注
more_offersint更多优惠0关闭1开启
discountarray优惠
discount[].idint优惠ID
discount[].titlestring标题
discount[].descriptionstring描述
discount[].urlstring跳转链接

正常返回

{
  "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调用失败时由具体实现抛出异常,异常信息以运行时结果为准。