權(quán)限列表

簡要描述
  • 權(quán)限列表
請求url
  • https://www.商城域名.com/index.php?s=/admin/store.api/index
請求方式
  • GET
請求header
參數(shù)名 類型 是否必須 示例值 說明
Access-Token string 必填 - 當前登錄用戶的 Token
返回示例
{
  "status": 200,
  "message": "success",
  "data": {
    "list": [{
      "api_id": 10002,
      "name": "管理員",
      "url": "-",
      "parent_id": 0,
      "sort": 105,
      "create_time": "2021-03-01 08:00:00",
      "update_time": "2021-03-01 08:00:00",
      "children": [{
        "api_id": 10003,
        "name": "管理員管理",
        "url": "\/store.user",
        "parent_id": 10002,
        "sort": 100,
        "create_time": "2021-03-01 08:00:00",
        "update_time": "2021-03-01 08:00:00",
        "children": [{
          "api_id": 10004,
          "name": "管理員列表",
          "url": "\/store.user\/list",
          "parent_id": 10003,
          "sort": 100,
          "create_time": "2021-03-01 08:00:00",
          "update_time": "2021-03-01 08:00:00"
        }, {
          "api_id": 10005,
          "name": "添加管理員",
          "url": "\/store.user\/add",
          "parent_id": 10003,
          "sort": 100,
          "create_time": "2021-03-01 08:00:00",
          "update_time": "2021-03-01 08:00:00"
        }, {
          "api_id": 10006,
          "name": "編輯管理員",
          "url": "\/store.user\/edit",
          "parent_id": 10003,
          "sort": 100,
          "create_time": "2021-03-01 08:00:00",
          "update_time": "2021-03-01 08:00:00"
        }, {
          "api_id": 10007,
          "name": "刪除管理員",
          "url": "\/store.user\/delete",
          "parent_id": 10003,
          "sort": 100,
          "create_time": "2021-03-01 08:00:00",
          "update_time": "2021-03-01 08:00:00"
        }]
      }, {
        "api_id": 10008,
        "name": "角色管理",
        "url": "\/store.role",
        "parent_id": 10002,
        "sort": 105,
        "create_time": "2021-03-01 08:00:00",
        "update_time": "2021-03-01 08:00:00",
        "children": [{
          "api_id": 10009,
          "name": "角色列表",
          "url": "\/store.role\/list",
          "parent_id": 10008,
          "sort": 100,
          "create_time": "2021-03-01 08:00:00",
          "update_time": "2021-03-01 08:00:00"
        }, {
          "api_id": 10010,
          "name": "添加角色",
          "url": "\/store.role\/add",
          "parent_id": 10008,
          "sort": 100,
          "create_time": "2021-03-01 08:00:00",
          "update_time": "2021-03-01 08:00:00"
        }, {
          "api_id": 10011,
          "name": "編輯角色",
          "url": "\/store.role\/edit",
          "parent_id": 10008,
          "sort": 100,
          "create_time": "2021-03-01 08:00:00",
          "update_time": "2021-03-01 08:00:00"
        }, {
          "api_id": 10012,
          "name": "刪除角色",
          "url": "\/store.role\/delete",
          "parent_id": 10008,
          "sort": 100,
          "create_time": "2021-03-01 08:00:00",
          "update_time": "2021-03-01 08:00:00"
        }]
      }, {
        "api_id": 11006,
        "name": "菜單權(quán)限列表",
        "url": "\/store.menu\/list",
        "parent_id": 10002,
        "sort": 110,
        "create_time": "2021-03-01 08:00:00",
        "update_time": "2021-03-01 08:00:00"
      }]
    },
    ...
    ]
  }
}
返回參數(shù)
參數(shù)名 類型 示例值 說明
status int 200 請求狀態(tài)(200:請求成功;500:請求錯誤/失?。?/td>
message string success 請求結(jié)果的信息,默認為 success
data object - 返回的業(yè)務數(shù)據(jù)
data 參數(shù)
參數(shù)名 類型 示例值 說明
list array - 列表數(shù)據(jù)
data.list 參數(shù)
參數(shù)名 類型 示例值 說明
api_id int 10002 API權(quán)限ID
name string 管理員 API權(quán)限名稱
url string - API權(quán)限URL
parent_id int 0 上級權(quán)限ID
sort int 105 排序 (數(shù)字越小越靠前)
create_time string 2021-03-01 08:00:00 創(chuàng)建時間
update_time string 2021-03-01 08:00:00 更新時間
children array - 子API權(quán)限列表