123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <meta http-equiv="x-ua-compatible" content="ie=edge">
- <title>用户登录-计量支付</title>
- <link rel="stylesheet" href="/public/css/bootstrap/bootstrap.min.css">
- <link rel="stylesheet" href="/public/css/main.css">
- <link rel="stylesheet" href="/public/css/toast.css">
- <link rel="stylesheet" href="/public/css/font-awesome/font-awesome.min.css">
- <link rel="stylesheet" type="text/css" href="/public/css/jquery-ui/jquery-ui.min.css">
- <link rel="shortcut icon" href="/public/images/favicon.ico">
- <style>
- html{height:100%;}
- </style>
- </head>
- <body class="login-new-body img-<%- Math.floor(Math.random()*9 + 1); %>">
- <div class="login-new-b d-flex flex-row align-items-center mt-4 ml-5">
- <div>
- <img src="/public/images/image_nav_logo.png">
- </div>
- <div class="ml-3">
- <div class="logo-big-title text-white mt-1">纵横云计量</div>
- <div class="logo-sm-title mt-1">计量支付 结算决算</div>
- </div>
- <div class="side-border ml-4 mr-4"></div>
- <div class="top-subtitle">管好项目每一分钱</div>
- <% if (projectData && ['Y3T2Q','P0505'].indexOf(projectData.code) !== -1) { %><h5 class="ml-auto logo-big-title text-danger mr-3">当前处于办公网络非涉密网络,严禁传输处理涉密信息!</h5><% } %>
- </div>
- <div class="container">
- <div class="d-flex justify-content-center align-items-center content-center">
- <div class="left-login text-white pt-5 px-5">
- <h2>Hi,您好!</h2>
- <div class="login-border my-4"></div>
- <div class="left-login-title" id="project_name"><% if (projectData) { %><%- projectData.name %><% } else { %>管好项目每一分钱<% } %></div>
- </div>
- <% if (maintainData.status === maintainConst.status.ongoing) { %>
- <form class="right-login position-relative text-center">
- <h3 class="mt-5 mb-5"><i class="fa fa-wrench"></i>系统正在维护</h3>
- <div> </div>
- <h5 class="mt-5 mb-5">预计恢复时间<%- (maintainData.duration !== maintainConst.duration.forever ? '为 ' + ctx.helper.dateTran(parseFloat(maintainData.maintain_time) + ctx.helper.timeAdd(maintainData.duration)) : ' 暂未确定') %></h5>
- <h5>造成不便敬请谅解。</h5>
- </form>
- <% } else { %>
- <form method="post" action="/login" id="normal-form" class="right-login position-relative text-center" style="min-width: 360px;">
- <h3 class="mt-5 <% if (projectData) { %>mb-5<% } else { %>mb-4<% } %>">欢迎登录</h3>
- <div class="position-absolute"><a href="javascript:void(0);" class="change-form" data-toggle="tooltip" data-placement="left" title="微信登录"><img alt="微信扫码登录" src="/public/images/icon_login_qr.png"></a></div>
- <div class="mx-4">
- <div <% if (projectData) { %>style="display: none"<% } %> class="input-group mb-4 <% if (errorMessage !== undefined && errorMessage !== null) { %>has-danger<% } %>">
- <div class="input-group-prepend">
- <div class="input-group-text"><img src="/public/images/icon_login_folder.png"></div>
- </div>
- <input type="text" id="project" class="form-control" name="project" value="<% if (projectData) { %><%- projectData.code %><% } %>" placeholder="项目编号" autofocus="">
- </div>
- <div class="input-group mb-4 <% if (errorMessage !== undefined && errorMessage !== null) { %>has-danger<% } %>">
- <div class="input-group-prepend">
- <div class="input-group-text"><img src="/public/images/icon_login_user.png"></div>
- </div>
- <input type="text" id="account" class="form-control" name="account" placeholder="账号" autofocus="">
- </div>
- <div class="input-group mb-2 <% if (errorMessage !== undefined && errorMessage !== null) { %>has-danger<% } %>">
- <div class="input-group-prepend">
- <div class="input-group-text"><img src="/public/images/icon_login_lock.png"></div>
- </div>
- <input type="password" id="project-password" name="project_password" class="form-control" placeholder="密码">
- </div>
- <div class="form-group <% if (projectData) { %>mb-5<% } else { %>mb-4<% } %>">
- <div class="form-check d-flex justify-content-start pl-0">
- <label class="form-check-label" for="exampleCheck1"><a href="#fg-password" data-toggle="modal" data-target="#fg-password">忘记密码?</a></label>
- <% if (projectData) { %><label class="form-check-label ml-auto" for="exampleCheck1"><a href="/">切换系统</a></label><% } %>
- </div>
- </div>
- <button type="submit" class="btn btn-primary btn-block">登 录</button>
- <div class="alert alert-danger mt-1 py-2 inputErrow" <% if(errorMessage === undefined || errorMessage === null) { %>style="display: none"<% } %> role="alert" id="error-msg">
- <% if(errorMessage !== undefined && errorMessage !== null) { %><b>登录失败</b> <%= errorMessage %><% } %>
- </div>
- <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
- <input type="hidden" name="type" value="2" />
- <input type="hidden" name="hide_code" value="<% if (projectData) { %>1<% } else { %>0<% } %>" />
- </div>
- </form>
- <form id="code-form" class="right-login position-relative text-center" style="min-width: 360px;display: none">
- <h5> </h5>
- <div class="position-absolute"><a href="javascript:void(0);" class="change-form" data-toggle="tooltip" data-placement="left" title="账号登录"><img alt="账号登录" src="/public/images/icon_login_pc.png"></a></div>
- <div id="wx-code" style="text-align: center">
- </div>
- </form>
- <% } %>
- </div>
- <div class="text-white fixed-bottom"><p class="text-center mb-1">Copyright © 2019 <a href="https://smartcost.com.cn" target="_blank" class="text-white">珠海纵横创新软件有限公司</a>.All Rights Reserved.<a class="text-white ml-2" href="https://beian.miit.gov.cn" target="_blank">粤ICP备14032472号</a></p></div>
- </div>
- <!--忘记项目版密码-->
- <div class="modal fade" id="fg-password" data-backdrop="static">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title">找回密码</h5>
- </div>
- <div class="modal-body">
- <div class="form-group">
- <label>项目编号</label>
- <input class="form-control" id="forget-project" placeholder="输入项目编号" <% if (projectData) { %>readonly<% } %>>
- <div class="invalid-feedback"></div>
- </div>
- <div class="form-group">
- <label>登录账号</label>
- <input class="form-control" id="forget-name" placeholder="输入登录账号">
- <div class="invalid-feedback"></div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
- <button type="button" class="btn btn-primary" id="forget-btn">重置密码</button>
- </div>
- </div>
- </div>
- </div>
- <!--忘记项目版密码-->
- <div class="modal fade" id="fg-password-done" data-backdrop="static">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title">密码发送成功</h5>
- </div>
- <div class="modal-body">
- <h5>尊敬的 <b></b>,您的账号 <b></b>,新密码已经发送至 <b></b>,注意查收。</h5>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary" data-dismiss="modal" id="focus-pwd">关闭</button>
- </div>
- </div>
- </div>
- </div>
- <!-- JS. -->
- <div class="toast" style="text-align: center">
- <i class="icon fa"></i>
- <span class="message"></span>
- </div>
- <!-- JS. -->
- <script src="/public/js/jquery/jquery-3.2.1.min.js"></script>
- <script src="/public/js/popper/popper.min.js"></script>
- <script src="/public/js/bootstrap/bootstrap.min.js"></script>
- <script src="/public/js/jquery/jquery-ui.js"></script>
- <script src="/public/js/global.js"></script>
- <script>
- const csrf = '<%= ctx.csrf %>';
- </script>
- <% if (projectData) { %>
- <script>
- $(document).ready(function() {
- setLocalCache('project_name', '<%- projectData.name %>');
- setLocalCache('project_code', '<%- projectData.code %>');
- });
- </script>
- <% } %>
- <script src="/public/js/login.js"></script>
- <script src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
- <script>
- $(function () {
- const obj = new WxLogin({
- self_redirect:false,
- id:"wx-code",
- appid: "<%- appid %>",
- scope: "snsapi_login",
- redirect_uri: "<%- hostUrl %>/wxAuth",
- state: getQueryString('referer'),
- style: "black",
- href: ""
- });
- function getQueryString(name) {
- var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
- var r = window.location.search.substr(1).match(reg); //获取url中"?"符后的字符串并正则匹配
- var context = "";
- if (r != null)
- context = r[2];
- reg = null;
- r = null;
- return context == null || context == "" || context == "undefined" ? "" : context;
- }
- $('.change-form').on('click', function () {
- $(this).parents('form').hide();
- $(this).parents('form').siblings('form').show();
- })
- })
- </script>
- </body>
- </html>
|