From 8253d415737086656136adad2fda5eca3cf58e46 Mon Sep 17 00:00:00 2001 From: bobi Date: Wed, 9 Oct 2019 22:27:06 +0800 Subject: [PATCH] impt:home user api --- js/console.js | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/js/console.js b/js/console.js index 750d396..6611735 100644 --- a/js/console.js +++ b/js/console.js @@ -52,30 +52,30 @@ layui.use(["okUtils", "table", "countUp", "okMock"], function () { function userList() { table.render({ method: "get", - url: okMock.api.user.list2, + url: okMock.api.user.list, elem: '#userData', height: 340, page: true, limit: 7, cols: [[ - {field: "id", title: "id", width: 50}, - {field: "u_name", title: "姓名"}, - {field: "u_sex", title: "性别", width: 80}, - {field: "u_email", title: "邮箱"}, - {field: "u_endtime", title: "时间",}, - {field: "u_grade", title: "等级"} + {field: "id", title: "ID", width: 180}, + {field: "username", title: "账号", width: 100}, + {field: "password", title: "密码", width: 80}, + {field: "email", title: "邮箱", width: 200}, + {field: "createTime", title: "创建时间", width: 180}, + {field: "logins", title: "登录次数", width: 100} ]], - parseData: function (res) { - res.data.list.forEach(function (i, j) { - var dateTime = new Date(i.u_endtime); - i.u_endtime = dateTime.getFullYear() + "-" + dateTime.getMonth() + "-" + dateTime.getDay(); - }); - return { - "code": res.code, - "count": res.data.count, - "data": res.data.list - } - } +// parseData: function (res) { +// res.data.list.forEach(function (i, j) { +// var dateTime = new Date(i.u_endtime); +// i.u_endtime = dateTime.getFullYear() + "-" + dateTime.getMonth() + "-" + dateTime.getDay(); +// }); +// return { +// "code": res.code, +// "count": res.data.count, +// "data": res.data.list +// } +// } }); }