<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <title>至存项目管理系统</title>
    <meta name="description" content="至存项目管理系统">
    <link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
    <link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
    <link href="../static/css/login.min.css" th:href="@{/css/login.min.css}" rel="stylesheet"/>
    <link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.6.0}" rel="stylesheet"/>
    <!-- 360浏览器急速模式 -->
    <meta name="renderer" content="webkit">
    <!-- 避免IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="shortcut icon" href="../static/favicon.ico" th:href="@{favicon.ico}"/>
    <style type="text/css">label.error {
        position: inherit
    }

    .ui.horizontal.divider::before, .ui.horizontal.divider::after {
        background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABaAAAAACCAYAAACuTHuKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1OThBRDY4OUNDMTYxMUU0OUE3NUVGOEJDMzMzMjE2NyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1OThBRDY4QUNDMTYxMUU0OUE3NUVGOEJDMzMzMjE2NyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU5OEFENjg3Q0MxNjExRTQ5QTc1RUY4QkMzMzMyMTY3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU5OEFENjg4Q0MxNjExRTQ5QTc1RUY4QkMzMzMyMTY3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+VU513gAAADVJREFUeNrs0DENACAQBDBIWLGBJQby/mUcJn5sJXQmOQMAAAAAAJqt+2prAAAAAACg2xdgANk6BEVuJgyMAAAAAElFTkSuQmCC")
    }

    .ui.horizontal.divider::after {
        background-position: left 1em top 50%
    }

    .ui.horizontal.divider::before, .ui.horizontal.divider::after {
        content: '';
        display: table-cell;
        position: relative;
        top: 50%;
        width: 50%;
        background-repeat: no-repeat
    }

    .ui.horizontal.divider::before {
        background-position: right 1em top 50%
    }

    .ui.horizontal.list {
        display: inline-block;
        font-size: 0
    }

    ul.ui.list:last-child, ol.ui.list:last-child, .ui.list:last-child {
        margin-bottom: 0;
        padding-bottom: 0
    }

    ul.ui.list, ol.ui.list, .ui.list {
        list-style-type: none;
        margin: 1em 0;
        padding: 0
    }

    .login-oauth__list {
        display: -webkit-box !important;
        display: -ms-flexbox !important;
        display: flex !important;
        -webkit-box-pack: center !important;
        -ms-flex-pack: center !important;
        justify-content: center !important
    }

    .login-login-oauth__container {
        margin-top: 20px
    }

    .ui.horizontal.login-login__oauth-title {
        font-weight: normal
    }

    .ui.divider {
        margin: 1.4rem 0rem;
        line-height: 1;
        height: 0;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: rgba(0, 0, 0, 0.85);
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0)
    }

    .ui.horizontal.divider {
        display: table;
        white-space: nowrap;
        height: auto;
        margin: '';
        line-height: 1;
        text-align: center
    }

    .ui.horizontal.list > .item:first-child, .ui.horizontal.list > .item:last-child {
        padding-top: .3em;
        padding-bottom: .3em
    }

    .ui.horizontal.list > .item:first-child {
        margin-left: 0 !important;
        padding-left: 0 !important
    }

    .login-oauth__list > .item {
        margin-left: 40px !important
    }

    .ui.list .item a > img {
        width: 32px;
        height: 32px
    }</style>
    <script>
        if (window.top !== window.self) {
            alert('未登录或登录超时。请重新登录');
            window.top.location = window.location
        }
        ;
    </script>
</head>
<body class="signin">
<div class="signinpanel">
    <div class="row">
        <div class="col-sm-7">
            <div class="signin-info">
                <div class="logopanel m-b">
                    <h1><img alt="[ 至存 ]" src="../static/ruoyi.png" th:src="@{/ruoyi.png}"></h1>
                </div>
                <div class="m-b"></div>
                <h4>欢迎使用 <strong>至存 项目管理系统9999</strong></h4>
                <ul class="m-b">
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 志存高远</li>
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 惟勤是路</li>
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 追求卓越</li>
                </ul>
                <strong th:if="${@config.getKey('sys.account.registerUser')}">还没有账号？ <a th:href="@{/register}">立即注册&raquo;</a></strong>
            </div>
        </div>
        <div class="col-sm-5">
            <form id="signupForm" autocomplete="off">
                <div id="accountSign">
                    <h4 class="no-margins">登录：</h4>
                    <p class="m-t-md">至存网络科技有限公司</p>
                    <input type="text" name="username" class="form-control uname" placeholder="用户名" value=""/>
                    <input type="password" name="password" class="form-control pword" placeholder="密码" value=""/>
                    <div class="row m-t" th:if="${captchaEnabled==true}">
                        <div class="col-xs-6">
                            <input type="text" name="validateCode" class="form-control code" placeholder="验证码"
                                   maxlength="5"/>
                        </div>
                        <div class="col-xs-6">
                            <a href="javascript:void(0);" title="点击更换验证码">
                                <img th:src="@{captcha/captchaImage(type=${captchaType})}" class="imgcode" width="85%"/>
                            </a>
                        </div>
                    </div>
                    <div class="checkbox-custom" th:classappend="${captchaEnabled==false} ? 'm-t'">
                        <input type="checkbox" id="rememberme" name="rememberme"> <label for="rememberme">记住我</label>
                    </div>
                    <button class="btn btn-success btn-block" id="btnSubmit" data-loading="正在验证登录，请稍后...">登录</button>
                    <div class="login-login-oauth__container">
                        <div class="ui horizontal divider login-login__oauth-title">
                            <span class="text-muted">其他方式登录</span>
                        </div>
                        <div class="ui horizontal list login-oauth__list">
                            <div class="item" title="">
                                <a href="#" onclick="qrCodeSign('wechat');">
                                    <img src="../static/img/weixin.svg" th:src="@{/img/weixin.svg}"/>
                                </a>
                            </div>
                            <div class="item" title="">
                                <a href="#" onclick="qrCodeSign('wechat_enterprise');">
                                    <img src="../static/img/wechat-enterprise.svg"
                                         th:src="@{/img/wechat-enterprise.svg}"/>
                                </a>
                            </div>
                        </div>
                    </div>

                </div>
                <div id="qrCodeSign">
                    <div id="qrCodeBaseBox" style="width: 233px;height: 300px;">
                        <div id="qrCodeBox" class="qrcode">
                        </div>
                    </div>
                    <div class="">
                        <button class="btn btn-success btn-block" onclick="accountSign();">返回</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="signup-footer">
        <div class="pull-left">
            Copyright © 2018-2021 Zcunsoft All Rights Reserved. <br>
        </div>
    </div>
</div>
<script th:inline="javascript"> var ctx = [[@{/}]]; var captchaType = [[${captchaType}]]; </script>
<!-- 全局js -->
<script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
<script src="../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
<!-- 验证插件 -->
<script src="../static/ajax/libs/validate/jquery.validate.min.js"
        th:src="@{/ajax/libs/validate/jquery.validate.min.js}"></script>
<script src="../static/ajax/libs/validate/messages_zh.min.js"
        th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.6.0}"></script>
<script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
<script src="../static/ruoyi/wxutils.js" th:src="@{/ruoyi/wxutils.js}"></script>
<script type="application/javascript">
    // var uuu = [[@{/}]];
    $(function () {
        $('#qrCodeSign').hide();
    });

    function qrCodeSign(type) {
        $('#accountSign').hide();
        $('#qrCodeSign').show();
        $.ajax({
            type: 'post',
            url: '/auth/qrcodeauth',
            data: type,
            contentType: "application/json;charset=utf-8",
            dataType: 'json',
            success: function (e) {
                if (e.code == web_status.SUCCESS) {
                    var opt = {
                        id: "qrCodeBox",
                        style: "",
                        url: e.data,
                        self_redirect: true,
                        href: window.location.origin + "/ruoyi/css/wxstyle.css"
                    };
                    switch (type) {
                        case 'wechat':
                            var obj = new WxLogin(opt);
                            break;
                        case 'wechat_enterprise':
                            var obj = new WxLogin(opt);
                            break;
                        default:
                            break;
                    }
                } else {
                    $.modal.alertError("<div style='color: #676a6c;'>" + e.msg + "</div>");
                }
            },
            error: function () {
                $.modal.alertError("<div style='color: #676a6c;'>系统错误请联系管理员</div>");
            }
        });
    }

    function weChatSign() {
        $('#accountSign').hide();
        $('#qrCodeSign').show();
        $.ajax({
            type: 'post',
            url: '/auth/qrcodeauth',
            data: 'wechat',
            contentType: "application/json;charset=utf-8",
            dataType: 'json',
            success: function (e) {
                if (e.code == web_status.SUCCESS) {
                    var opt = {
                        id: "qrCodeBox",
                        style: "",
                        url: e.data,
                        self_redirect: true,
                        href: window.location.origin + "/ruoyi/css/wxstyle.css"
                    };
                    var obj = new WxLogin(opt);
                }
            }
        });
    }

    function accountSign() {
        $('#qrCodeSign').hide();
        $('#accountSign').show();
    }


</script>
</body>
</html>
