我在通过 mirage JS 模拟后端时遇到问题。如何在 creatList 之后将分页数据添加到响应中?
我的服务器 js 返回 JSON https://miragejs.com/repl/v2/6563736c78
{
"users": [
{
"title": "test title",
"id": "1"
},
{
"title": "test title",
"id": "2"
},
{
"title": "test title",
"id": "3"
}
]
}
我要回应
{
"users": [
{
"title": "test title",
"id": "1"
},
{
"title": "test title",
"id": "2"
},
{
"title": "test title",
"id": "3"
}
],
page: 1,
total: 10
}
有人可以帮我吗?