获取用户列表

简要描述
  • 带分页的api接口
请求URL
  • http://{{myHost}}/api/alone-admin/user
请求方式
  • get
请求参数
参数名 必选 类型 说明
page string 页码
pageSize string 默认返回10条数据。一页多少条数据
返回示例
{
  "error_code": 0,
  "msg": "success!",
  "data": {
    "current_page": 2,
    "data": [
      {
        "id": 3,
        "nickname": "戚雷",
        "status": 0,
        "role": 0,
        "email": "deleniti16@example.com",
        "number": "17157291821",
        "password": "123456",
        "address": "南宁秀英区",
        "reg_ip": "151.51.179.176",
        "created_at": "2021-03-04 16:44:13",
        "updated_at": "2021-03-04 16:44:13"
      },
      {
        "id": 4,
        "nickname": "屠宁",
        "status": 0,
        "role": 0,
        "email": "laborum16@example.net",
        "number": "18961989067",
        "password": "123456",
        "address": "长沙清浦区",
        "reg_ip": "181.236.153.52",
        "created_at": "2021-03-04 16:44:13",
        "updated_at": "2021-03-04 16:44:13"
      }
    ],
    "first_page_url": "http://www.alone.test/api/alone-admin/user?page=1",
    "from": 3,
    "last_page": 25,
    "last_page_url": "http://www.alone.test/api/alone-admin/user?page=25",
    "links": [
      {
        "url": "http://www.alone.test/api/alone-admin/user?page=1",
        "label": "« Previous",
        "active": false
      },
      {
        "url": "http://www.alone.test/api/alone-admin/user?page=1",
        "label": 1,
        "active": false
      },
      {
        "url": "http://www.alone.test/api/alone-admin/user?page=2",
        "label": 2,
        "active": true
      },
      {
        "url": "http://www.alone.test/api/alone-admin/user?page=3",
        "label": 3,
        "active": false
      },
      {
        "url": "http://www.alone.test/api/alone-admin/user?page=4",
        "label": 4,
        "active": false
      },
      {
        "url": "http://www.alone.test/api/alone-admin/user?page=5",
        "label": 5,
        "active": false
      },
      {
        "url": "http://www.alone.test/api/alone-admin/user?page=6",
        "label": 6,
        "active": false
      },
      {
        "url": "http://www.alone.test/api/alone-admin/user?page=7",
        "label": 7,
        "active": false
      },
      {
        "url": "http://www.alone.test/api/alone-admin/user?page=8",
        "label": 8,
        "active": false
      },
      {
        "url": "http://www.alone.test/api/alone-admin/user?page=9",
        "label": 9,
        "active": false
      },
      {
        "url": "http://www.alone.test/api/alone-admin/user?page=10",
        "label": 10,
        "active": false
      },
      {
        "url": null,
        "label": "...",
        "active": false
      },
      {
        "url": "http://www.alone.test/api/alone-admin/user?page=24",
        "label": 24,
        "active": false
      },
      {
        "url": "http://www.alone.test/api/alone-admin/user?page=25",
        "label": 25,
        "active": false
      },
      {
        "url": "http://www.alone.test/api/alone-admin/user?page=3",
        "label": "Next »",
        "active": false
      }
    ],
    "next_page_url": "http://www.alone.test/api/alone-admin/user?page=3",
    "path": "http://www.alone.test/api/alone-admin/user",
    "per_page": "2",
    "prev_page_url": "http://www.alone.test/api/alone-admin/user?page=1",
    "to": 4,
    "total": 50
  }
}
备注