| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8"/>
- <meta name="author" content=""/>
- <meta name="description" content=""/>
- <meta name="keywords" content="扫码支付,线上投币,运营数据,物联网"/>
- <meta name="format-detection" content="telphone=no,email=no"/>
- <meta name="viewport"
- content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
- <meta http-equiv="Pragma" content="no-cache">
- <meta http-equiv="Cache-control" content="no-cache">
- <meta http-equiv="Cache" content="no-cache">
- <title>测试员:登录</title>
- <link rel="stylesheet" href="/components/lib/mui.min.css"/>
- <link rel="stylesheet" href="/components/custom/css/common.css"/>
- <link rel="stylesheet" href="/app/css/xyf.common.min.css"/>
- </head>
- <body class="bg-white">
- <div class="login-logo"></div>
- <div class="input-group-card">
- <div class="input-row input-clear">
- <input id="userName" type="tel" maxlength="11" placeholder="手机号">
- </div>
- <div class="input-row input-clear">
- <input id="password" type="password" maxlength="20" placeholder="密码">
- </div>
- </div>
- <div class="subt">
- <input class="mui-btn-block" type="button" id="loginBtn" value="登录" onclick="login()">
- </div>
- <script src="/components/lib/jquery.min.js"></script>
- <script src="/components/lib/mui.min.js"></script>
- <script src="/app/js/xyf.login.js"></script>
- <script src="/components/lib/md5.js"></script>
- <script src="/components/custom/js/common.js"></script>
- <script>
- var agentLogoUrl = getCookie(Cookie_Constant.agentLogoUrl);
- if (agentLogoUrl) {
- $(".login-logo").css("background-image", "url(" + agentLogoUrl + ")");
- }
- document.onkeydown = function (event) {
- if (event.keyCode == 13) {
- login();
- }
- };
- function login() {
- //检查手机号码
- var userName = $("#userName").val();
- if (!isPhone(userName)) {
- mui.toast("请输入11位正确手机号码");
- return;
- }
- //检查密码
- var password = $("#password").val();
- if (password.length < 6) {
- mui.toast("请输入正确的密码");
- return;
- }
- myAjax({
- type: "POST",
- url: "/test/login",
- headers: get_token_headers("Tester"),
- data: JSON.stringify({"username": userName, "password": hex_md5(password)}),
- contentType: 'application/json',
- dataType: "json",
- success: function (res) {
- if (res.result == 1) {
- localStorage.setItem(get_token_session_key("Tester"), res.payload.token);
- var url = 'index.html';
- goPage(url);
- } else if (res.result == 0) {
- var btnArray = ['确定'];
- mui.confirm(res.description, '温馨提示', btnArray, function (e) {
- });
- } else {
- mui.alert(res.description, '温馨提示', '确定');
- }
- }
- });
- }
- </script>
- </body>
- </html>
|