智简魔方文档

云服务器区域列表

方法概览

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

功能说明

云服务器区域列表

调用示例

$result = (new \app\common\model\CloudServerAreaModel())->areaList();

参数

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

返回值

返回项类型说明
listarray区域
list[].idint区域ID
list[].first_areastring一级区域
list[].second_areastring二级区域
areaarray区域选项
area[].namestring一级区域名称
area[].childrenarray二级区域
list[].children[].idint二级区域ID
list[].children[].namestring二级区域名称

正常返回

{
  "list": [
    {
      "id": 1,
      "first_area": "string",
      "second_area": "string",
      "children": [
        {
          "id": 1,
          "name": "示例名称"
        }
      ]
    }
  ],
  "area": [
    {
      "name": "示例名称",
      "children": [
        "string"
      ]
    }
  ]
}

异常情况

异常类型说明
Throwable调用失败时由具体实现抛出异常,异常信息以运行时结果为准。