impt:home user api
parent
f3b7428204
commit
8253d41573
|
|
@ -52,30 +52,30 @@ layui.use(["okUtils", "table", "countUp", "okMock"], function () {
|
||||||
function userList() {
|
function userList() {
|
||||||
table.render({
|
table.render({
|
||||||
method: "get",
|
method: "get",
|
||||||
url: okMock.api.user.list2,
|
url: okMock.api.user.list,
|
||||||
elem: '#userData',
|
elem: '#userData',
|
||||||
height: 340,
|
height: 340,
|
||||||
page: true,
|
page: true,
|
||||||
limit: 7,
|
limit: 7,
|
||||||
cols: [[
|
cols: [[
|
||||||
{field: "id", title: "id", width: 50},
|
{field: "id", title: "ID", width: 180},
|
||||||
{field: "u_name", title: "姓名"},
|
{field: "username", title: "账号", width: 100},
|
||||||
{field: "u_sex", title: "性别", width: 80},
|
{field: "password", title: "密码", width: 80},
|
||||||
{field: "u_email", title: "邮箱"},
|
{field: "email", title: "邮箱", width: 200},
|
||||||
{field: "u_endtime", title: "时间",},
|
{field: "createTime", title: "创建时间", width: 180},
|
||||||
{field: "u_grade", title: "等级"}
|
{field: "logins", title: "登录次数", width: 100}
|
||||||
]],
|
]],
|
||||||
parseData: function (res) {
|
// parseData: function (res) {
|
||||||
res.data.list.forEach(function (i, j) {
|
// res.data.list.forEach(function (i, j) {
|
||||||
var dateTime = new Date(i.u_endtime);
|
// var dateTime = new Date(i.u_endtime);
|
||||||
i.u_endtime = dateTime.getFullYear() + "-" + dateTime.getMonth() + "-" + dateTime.getDay();
|
// i.u_endtime = dateTime.getFullYear() + "-" + dateTime.getMonth() + "-" + dateTime.getDay();
|
||||||
});
|
// });
|
||||||
return {
|
// return {
|
||||||
"code": res.code,
|
// "code": res.code,
|
||||||
"count": res.data.count,
|
// "count": res.data.count,
|
||||||
"data": res.data.list
|
// "data": res.data.list
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue