<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登录日志</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" type="image/x-icon" th:href="@{/favicon.ico}"/>
    <link rel="stylesheet" th:href="@{/lib/layui/css/layui.css}">
    <link rel="stylesheet" th:href="@{/css/common.css}">
    <link rel="stylesheet" th:href="@{/css/animate.min.css}">
</head>

<body>

    <div class="page-loading">
        <div class="rubik-loader"></div>
    </div>

    <div class="z-body animated fadeIn">
        <table class="layui-hide" id="login-log-table"></table>
    </div>

    <script th:src="@{/lib/jquery/jquery.min.js}"></script>
    <script th:src="@{/lib/layui/layui.js}"></script>
    <script th:src="@{/js/common.js}"></script>

    <script>
        layui.use(['table', 'element', 'laydate'], function () {
            var table = layui.table;
            var $ = layui.$;

            table.render({
                elem: '#login-log-table'
                , url: '/log/login/list'
                , page: true
                , cols: [
                    [
                        {field: 'username', title: '用户名'}
                        , {field: 'loginTime', title: '登陆时间'}
                        , {field: 'loginStatus', title: '状态', templet: function (d) {
                            return d.loginStatus === '1' ? "成功" : "失败";
                        }, width: "15%"}
                        , {field: 'ip', title: 'IP'}
                    ]
                ]
            });
        });
    </script>
</body>

</html>