refactor: ♻️ cURD的列表数据模拟网络延迟

This commit is contained in:
cshaptx4869
2024-04-26 21:56:02 +08:00
parent 2b6a210855
commit e5fdf3e23b

View File

@@ -3,43 +3,45 @@ const contentConfig = {
indexAction: function (data: any) { indexAction: function (data: any) {
console.log("index", data); console.log("index", data);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
resolve({ setTimeout(() => {
code: "00000", resolve({
data: { code: "00000",
list: [ data: {
{ list: [
id: 2, {
username: "admin", id: 2,
nickname: "系统管理员", username: "admin",
mobile: "17621210366", nickname: "系统管理员",
genderLabel: "男", mobile: "17621210366",
avatar: genderLabel: "男",
"https://oss.youlai.tech/youlai-boot/2023/05/16/811270ef31f548af9cffc026dfc3777b.gif", avatar:
email: null, "https://oss.youlai.tech/youlai-boot/2023/05/16/811270ef31f548af9cffc026dfc3777b.gif",
status: 1, email: null,
deptName: "有来技术", status: 1,
roleNames: "系统管理员", deptName: "有来技术",
createTime: "2019-10-10", roleNames: "系统管理员",
}, createTime: "2019-10-10",
{ },
id: 3, {
username: "test", id: 3,
nickname: "测试小用户", username: "test",
mobile: "17621210366", nickname: "测试小用户",
genderLabel: "男", mobile: "17621210366",
avatar: genderLabel: "男",
"https://oss.youlai.tech/youlai-boot/2023/05/16/811270ef31f548af9cffc026dfc3777b.gif", avatar:
email: null, "https://oss.youlai.tech/youlai-boot/2023/05/16/811270ef31f548af9cffc026dfc3777b.gif",
status: 1, email: null,
deptName: "测试部门", status: 1,
roleNames: "访问游客", deptName: "测试部门",
createTime: "2021-06-05", roleNames: "访问游客",
}, createTime: "2021-06-05",
], },
total: 2, ],
}, total: 2,
msg: "一切ok", },
}); msg: "一切ok",
});
}, 800);
}); });
}, },
deleteAction: function (id: string) { deleteAction: function (id: string) {