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([
|
||||
response: ({ body }) => {
|
||||
if (body.username === "admin") {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
avatar: "https://avatars.githubusercontent.com/u/44761321",
|
||||
username: "admin",
|
||||
@@ -24,7 +25,8 @@ export default defineFakeRoute([
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
avatar: "https://avatars.githubusercontent.com/u/52823142",
|
||||
username: "common",
|
||||
|
||||
Reference in New Issue
Block a user