增加功能:登录日志功能登录结果成功失败增加颜色 #IS7RM

This commit is contained in:
Argo-MacBookPro 2019-03-04 18:41:24 +08:00
parent 61763418a0
commit d69e93c8f2
2 changed files with 10 additions and 1 deletions

View File

@ -565,3 +565,7 @@ li[data-category="1"] .dd3-content .menuType {
background: #5cb85c; background: #5cb85c;
border: 1px solid #404040; border: 1px solid #404040;
} }
.bootstrap-table .badge {
padding: 4px 6px;
}

View File

@ -21,7 +21,12 @@ $(function () {
{ title: "登录地点", field: "City" }, { title: "登录地点", field: "City" },
{ title: "浏览器", field: "Browser" }, { title: "浏览器", field: "Browser" },
{ title: "操作系统", field: "OS" }, { title: "操作系统", field: "OS" },
{ title: "登录结果", field: "Result" } {
title: "登录结果", field: "Result", formatter: function (value, row, index) {
var css = value === "登录成功" ? "success" : "danger";
return $.format('<span class="badge badge-{0}">{1}</span>', css, value);
}
}
] ]
}); });