mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2026-01-20 16:53:37 +08:00
refactor: 重构API接口响应格式,带来简洁高效的接口设计 (#1256)
This commit is contained in:
@@ -8,7 +8,8 @@ export default defineFakeRoute([
|
||||
method: "get",
|
||||
response: () => {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
avatar: "https://avatars.githubusercontent.com/u/44761321",
|
||||
username: "admin",
|
||||
@@ -46,7 +47,8 @@ export default defineFakeRoute([
|
||||
}
|
||||
];
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
list,
|
||||
total: list.length, // 总条目数
|
||||
|
||||
Reference in New Issue
Block a user