<%@ page import="java.net.URLDecoder" %>
<%@ page import="com.manage.encrypt.Base64" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jspf/common.jspf" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    String password = "";
    String userName = "";
    String checked = "";
    Cookie[] cookies = request.getCookies();        //取出cookie对象组
    for (int i = 0; cookies != null && i < cookies.length; i++) {
        Cookie cookie = cookies[i];       //  取出其中的一个对象，含有name ,value
        if (cookie != null && "name".equals(cookie.getName())) {      //获取第一个cookie对象的name
            userName = URLDecoder.decode(cookie.getValue(), "UTF-8");//进行解码
            checked = "checked";
        }
        if (cookie != null && "password".equals(cookie.getName())) {
            password = cookie.getValue();
            password = Base64.decodeBase64(password);
        }
    }
%>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>嘉时软件</title>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    .login {
        width: 100%;
        height: 100vh;
        display: flex;

    }

    .login .left {
        width: 57vw;
        height: 100%;
    }

    .qRCodeDiv{
        width: 70%;
        height: 240px;
        margin-left: 80px;
        margin-top: 11%;
    }
    .qRCodeDivBut{
        width: 70%;
        height: 240px;
        margin-top: 11%;

    }
    .login .left img {
        width: 100%;
        height: 100%;
    }

    .login .right {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 671px;
        position: relative;
        margin: 0 auto;
        margin-top: 30px;
    }

    .logo {
        margin-top: 74px;
        margin-bottom: 123px;
        display: flex;
        align-items: center;
    }

    .title {
        text-align: center;
        font-size: 40px;
        font-weight: 500;
        margin-top: 34px;
    }

    .shuru {
        width: 500px;
        height: 50px;
        background: #EFF0F4;
        border-radius: 6px;
        border: 1px solid #EFF0F4;
        outline: none;
        padding-left: 20px;
        font-size: 16px;
    }

    .shuru:focus {
        border-color: #09f !important;
    }

    .item {
        margin-bottom: 20px;
    }

    .item1 {
        margin-bottom: 30px;
    }

    .item-name {
        font-size: 22px;
        font-family: Source Han Sans CN;
        font-weight: 400;
        color: #555555;
        margin: 10px 0;
    }

    .btn {
        width: 500px;
        height: 64px;
        background: linear-gradient(90deg, #00AFFF 0%, #007CFF 100%);
        border-radius: 6px;
        text-align: center;
        line-height: 53px;
        cursor: pointer;
        font-size: 22px;
        font-family: Source Han Sans CN;
        font-weight: 400;
        color: #FFFFFF;
        margin-top: 108px;
    }


    .UserPassbtn {
        width: 260px;
        height: 60px;
        background: linear-gradient(90deg, #00AFFF 0%, #007CFF 100%);
        border-radius: 6px;
        text-align: center;
        line-height: 53px;
        cursor: pointer;
        font-size: 22px;
        font-family: Source Han Sans CN;
        font-weight: 400;
        color: #FFFFFF;
        margin-top: 10px;
    }

    .boxCss {
        margin-top: 60px;
    }

    .bottom {
        width: 500px;
        text-align: center;
        font-size: 14px;
        font-family: Source Han Sans CN;
        font-weight: 400;
        position: absolute;
        bottom: 0;
        color: #919191;
    }
</style>
<body>
<div class="login">
    <div class="left">
        <img src="./static/img/login/login_bg.png" alt="">
    </div>
    <div class="right">
        <c:if test="${loginSet.logoPath != ''}">
            <img src="${path}/${loginSet.logoPath}" width="${loginSet.logoWidth}px" height="${loginSet.logoHeight}px">
        </c:if>
        <div id="switchHandoff">
            <div class="title">
                账号登录
            </div>
            <div class="boxCss">
                <form action="">
                    <div class="item item1">
                        <div class="item-name">用户名</div>
                        <input type="text" placeholder="请输入" class="shuru" id="userName" name="userName">
                    </div>
                    <div class="item">
                        <div class="item-name">用户密码</div>
                        <input type="password" placeholder="请输入" class="shuru" id="userPwd" name="userPwd">
                    </div>
                    <div style="display: flex;justify-content: space-between">
                        <div>
                            <input type="checkbox" name="" id="">
                            <span>记住密码</span>
                        </div>
                        <div>
                            <input value="扫码登录" type="button" name="" id="scanCode" onclick="handoffLogin()">
                        </div>
                    </div>

                </form>
            </div>
            <div class="btn" onclick="login()">立即登录</div>
        </div>

        <div id="switchHandoff2" style="display:none;flex-direction: column;align-items: center ">
            <div class="title">
                扫码登录
            </div>
<%--            <div class="qRCodeDiv" >--%>
<%--                <img id="QRcordImg" height="300px" width="300px" class="QRcordImg">--%>
<%--            </div>--%>
            <img id="QRcordImg" height="300px" width="300px" class="QRcordImg">
            <div class="boxCss">
                <form action="">
                    <div class="UserPassbtn" onclick="handoffLogin2()">账号密码登录</div>
                </form>
            </div>
        </div>
        <div class="bottom">
            <div class="top">技术支持：厦门嘉时软件科技有限公司</div>
            <div class="bot">Copyright © 2019-2090 厦门嘉时软件. All rights reserved.</div>
        </div>
    </div>
</div>
<script type="text/javascript" src="${path}/static/js/zsxmHospitalLogin.js?time=2022-01-13"></script>
</body>
</html>





