sugangqiang 2 år sedan
förälder
incheckning
006669fddc
2 ändrade filer med 96 tillägg och 41 borttagningar
  1. 96 41
      app/index/view/auth/login.html
  2. BIN
      public/static/img/login_bg.jpg

+ 96 - 41
app/index/view/auth/login.html

@@ -10,7 +10,8 @@
         <link href="/static/css/style.css?v=4.1.0" rel="stylesheet">
         <script>if (window.top !== window.self) {
                 window.top.location = window.location;
-            }</script>
+            }
+        </script>
         <script src="/static/js/jquery.min.js?v=2.1.4"></script>
         <script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
         <script src="/static/js/plugins/layer/layer.js"></script>
@@ -24,53 +25,107 @@
             #pwd-form .row{
                 padding-top: 10px;
             }
+            a,a:hover{color:#000;}
+            .header,.footer{height:80px;width:100%;background:#fff;}
+            .header .content{width:980px;height:100%;margin:0 auto;}
+            .header .content .title{color:#000;font-size:24px;font-weight:bold;line-height:40px;padding:20px 10px;}
+            .footer{line-height:60px;text-align:center;margin:0;}
+            .body{background:url(/static/img/login_bg.jpg) no-repeat center;background-size:100% auto;min-height:500px;height:calc(100% - 160px);}
+            .body .content{width:980px;margin:0 auto;height:100%;position:relative;}
+            .loginForm{
+                position:absolute;top:50%;right:20px;margin-top:-225px;width:360px;height:450px;background:#fff;padding:20px;border-radius:10px;
+            }
+            .loginForm .greeting{color:#33a1ff;font-size:24px;font-weight:bold;letter-spacing:5px;text-align:center;height:60px;line-height:60px;border-bottom:1px solid #ddd;margin:0 50px;}
+            .bg1{background-size:auto 100%;}
+            button[type=submit],button[type=submit]:hover{background:#3073d5;}
+            button[type=submit]:active{background:#5F9BEE !important;}
         </style>
     </head>
 
-    <body class="gray-bg" style="background: url(/static/img/login4.jpg) no-repeat center;  overflow: hidden;min-width:1200px;">
-
-        <div class="middle-box text-center loginscreen" style=" margin-left: 51%;margin-top: 11%;">
-            <br/>
-            <form style="position:absolute;top:35%;margin:0 auto;width:300px;" id="login_form" class="m-t" role="form" action="/index/auth/login" method="post">
-                <h4 style="color: red;">{$msg}</h4>
-                <div class="form-group bg" >
-                    <select name="usertype" id="userType" class="form-control" placeholder="用户类型" required="">
-                        <option value="">--- 请选择用户类型 ---</option>
-                        <option value="1">管理员用户</option>
-                        <option value="2">机构用户</option>
-<!--                        <option value="3">个人用户</option>-->
-                    </select>
-                </div>
-                <div class="form-group">
-                    <input type="text" name="username" class="form-control" placeholder="用户名" autocomplete="off" required="" style="background: url(/static/img/user.png) 6px 9px no-repeat;padding-left: 25px;">
-                </div>
-                <div class="form-group">
-                    <input type="password" name="password" class="form-control" placeholder="密码" autocomplete="off"  required="" style="background: url(/static/img/mm.png) 6px 9px no-repeat;padding-left: 25px;">
-                </div>
-                {if condition="session('captcha') == 1"}
-                <div class="form-group" style="float: left;">
-                    <div class="col-sm-8" style="padding-left: 0px; padding-right: 0px;">
-                        <input class="form-control" type="text" name="kaptcha" placeholder="验证码" required="">
-                    </div>
-                    <div class="col-sm-4" style="padding-left: 0px; padding-right: 0px;">
-                        <img src="{:captcha_src()}" id="kaptcha" width="100%" height="100%"/>
-                    </div>
-                </div>
-                {/if}
-                <div class="form-group" style="float: left;">
-                    <div class="checkbox" style="text-align: left">
-                        <label>
-                            <input type="checkbox" name="remember" style="margin-top: 2px;">记住我
-                        </label>
+    <body class="gray-bg">
+        <div class="header">
+            <div class="content">
+                <div class="title">晋江市人才综合服务平台</div>
+            </div>
+        </div>
+        <div class="body" id="body">
+            <div class="content">
+                <div class="loginForm">
+                    <div class="greeting">
+                        欢迎登录
                     </div>
+                    <form id="login_form" class="m-t" role="form" action="/index/auth/login" method="post">
+                        <div style="color:red;height:20px;margin-bottom:5px;text-align:center;">{$msg}</div>
+                        <div class="form-group bg" >
+                            <select name="usertype" id="userType" class="form-control" placeholder="用户类型" required="">
+                                <option value="">--- 请选择用户类型 ---</option>
+                                <option value="1">管理员用户</option>
+                                <option value="2">机构用户</option>
+                                <!--<option value="3">个人用户</option>-->
+                            </select>
+                        </div>
+                        <div class="form-group">
+                            <input type="text" name="username" class="form-control" placeholder="用户名" autocomplete="off" required="" style="background: url(/static/img/user.png) 6px 9px no-repeat;padding-left: 25px;">
+                        </div>
+                        <div class="form-group">
+                            <input type="password" name="password" class="form-control" placeholder="密码" autocomplete="off"  required="" style="background: url(/static/img/mm.png) 6px 9px no-repeat;padding-left: 25px;">
+                        </div>
+                        {if condition="session('captcha') == 1"}
+                        <div class="form-group" style="float: left;">
+                            <div class="col-sm-8" style="padding-left: 0px; padding-right: 0px;">
+                                <input class="form-control" type="text" name="kaptcha" placeholder="验证码" required="">
+                            </div>
+                            <div class="col-sm-4" style="padding-left: 0px; padding-right: 0px;">
+                                <img src="{:captcha_src()}" id="kaptcha" width="100%" height="100%"/>
+                            </div>
+                        </div>
+                        {/if}
+                        <div class="form-group" style="float: left;">
+                            <div class="checkbox" style="text-align: left">
+                                <label>
+                                    <input type="checkbox" name="remember" style="margin-top: 2px;">记住我
+                                </label>
+                            </div>
+                        </div>
+                        <button type="submit" class="btn btn-primary block full-width m-b">登录</button>
+                        <div style="margin-top:20px;">
+                            <button onclick="Login.openEditPassword()" type="button" style="border:none;background: #fff;float:left;color: #008ef9;color:#888;">忘记密码?</button>
+                            <button onclick="Login.gotoRegisterPage('/common/auth/register')" type="button" style="border:none; background: #fff;color: #008ef9;float:right;">注册新用户</button>
+                        </div>
+                    </form>
                 </div>
-                <button type="submit" class="btn btn-primary block full-width m-b" style="background:url(/static/img/btn.png);height: 34px;"></button>
-                </p>
-                <button onclick="Login.gotoRegisterPage('/common/auth/register')" type="button" style="border:none; background: #fff;color: #008ef9;margin-left: 150px;">注册新用户</button>
-                <button onclick="Login.openEditPassword()" type="button" style="border:none; background: #fff;float: right;color: #008ef9;">忘记密码</button>
-            </form>
+            </div>
+        </div>
+        <div class="footer">
+            <a>Copyight@ 晋江市人才办 All Rights Reserved </a>
         </div>
         <iframe id="hiddenIframe" name="hiddenIframe" style="display: none;"></iframe>
+        <script>
+            resize();
+            window.onresize = function () {
+                resize();
+            }
+            function resize() {
+                var height = document.body.clientHeight - 160;
+                var width = document.body.clientWidth;
+                var ratio = height / width;
+                var loginBgRatio = 862 / 1920;
+                var oldClass = document.querySelector('#body').className;
+                var classes = oldClass.split(" ");
+                console.log(ratio, loginBgRatio)
+                if (ratio > loginBgRatio) {
+                    if (classes.indexOf("bg1") == -1) {
+                        classes.push("bg1");
+                    }
+                } else {
+                    var index = classes.indexOf("bg1");
+                    if (index > -1) {
+                        classes.splice(index, 1);
+                    }
+                }
+                document.querySelector('#body').className = classes.join(" ");
+            }
+        </script>
         <script>
             Feng.addCtx("");
             $(function () {

BIN
public/static/img/login_bg.jpg