123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico">
- <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
- <title>双子星登录</title>
- <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css">
- <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css">
- <link rel="stylesheet" href="../static/css/beeMansLogin.css">
- </head>
- <body>
- <div class="fcnc">
- <img class="logo" src="../static/img/beeMans/logo.png" alt="">
- <div class="login-title">双子星登录</div>
- <div class="login-subtitle">- 来至云端的手机 -</div>
- <div class="input-item mb30">
- <div class="icon"><img class="icon-user" src="../static/img/beeMans/icon-user.png" alt=""></div>
- <input type="tel" placeholder="双子星账号登录" maxlength="11" id="tel_input">
- </div>
- <div class="input-item mb110">
- <div class="icon"><img class="icon-user" src="../static/img/beeMans/icon-password.png" alt=""></div>
- <input type="password" id="tel_pass" placeholder="请输入密码">
- </div>
- <button class="btn" onclick="handleClick()">登录</button>
- </div>
- </body>
- <script src="../static/js/vender/jquery-3.4.1.min.js"></script>
- <script src="../static/js/vender/jsencrypt.js"></script>
- <script src="../static/js/vender/md5.js"></script>
- <script src="../static/js/vender/config.js"></script>
- <script src="https://cdn.bootcss.com/jquery-weui/1.2.1/js/jquery-weui.min.js"></script>
- <script type="text/javascript">
- $("#tel_input").bind('input propertychange', function (e) {
- var ipt_phones = $('#tel_input').val();
- var c = $(this);
- if (/[^\d]/.test(c.val())) {//替换非数字字符
- var temp_amount = c.val().replace(/[^\d]/g, '');
- $(this).val(temp_amount);
- $.toast('请填写正确的手机号', "text");
- }
- });
- function handleClick() {
- var ipt_phone = $('#tel_input').val();
- var ipt_pass = $('#tel_pass').val();
- if (!ipt_phone) {
- $.toast('请填写正确的手机号', "text");
- } else if (!/^1[3|4|5|6|7|8|9][0-9]\d{8}$/.test(ipt_phone)) {
- $.toast('请填写正确的手机号', "text");
- } else if (!ipt_pass) {
- $.toast('请填写密码', "text");
- } else {
- $.ajax({
- url: baseUrl + '/api/user/v1/client/getPbKey',
- type: 'post',
- contentType: "application/json",
- dataType: 'json',
- cache: false,
- success: function (res) {
- getPbKey(res.data.publicKey)
- }
- })
-
- }
- }
-
- function getPbKey(publicKey) {
- var form = {
- phoneNumber: $('#tel_input').val(),
- password: getcode(md5($('#tel_pass').val()), publicKey),
- client: 5
- }
- $.showLoading();
- $.ajax({
- url: baseUrl + '/api/user/v1/beeMans/fmCloudLogin',
- data: JSON.stringify(form),
- type: 'post',
- contentType: "application/json",
- dataType: 'json',
- cache: false,
- beforeSend: function() {
- $('.btn').attr({ disabled: 'disabled' });
- },
- success: function (res) {
- $.hideLoading();
- if (res.status === 0) {
- WebViewJavascriptBridge.callHandler('OpenBridgeKit', res.data)
- } else {
- $('.btn').removeAttr('disabled');
- $.toast(res.msg, "text");
- }
- },
- error: function() {
- $('.btn').removeAttr('disabled');
- }
- })
- }
- </script>
- </html>
|