123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <!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="../static/js/vender/toastr/toastr.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>
- <div class="btn" onclick="handleClick()">登录</div>
- </div>
- <div class="master" onclick="stop()">
- <div class="loading">
- <div class="loadingSix">
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- </div>
- <p>正在登录</p>
- </div>
- </div>
- </body>
- <script src="../static/js/vender/jquery-3.4.1.min.js"></script>
- <script src="../static/js/vender/toastr/toastr.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 type="text/javascript">
- toastr.options.timeOut = 500;
- toastr.options.positionClass = 'toast-center-center';
- $("#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);
- toastr.error('请填写正确的手机号')
- }
- });
- function stop() {
- event.stopPropagation();
- };
- function handleClick() {
- var ipt_phone = $('#tel_input').val();
- var ipt_pass = $('#tel_pass').val();
- if (!ipt_phone) {
- toastr.error('请填写正确的手机号')
- } else if (!/^1[3|4|5|6|7|8|9][0-9]\d{8}$/.test(ipt_phone)) {
- toastr.error('请填写正确的手机号')
- } else if (!ipt_pass) {
- toastr.error('请填写密码')
- } else {
-
- $.ajax({
- url: 'http://vclusters.imwork.net:2221/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
- }
- $('.master').show()
- $.ajax({
- url: 'http://vclusters.imwork.net:2221/api/user/v1/beeMans/fmCloudLogin',
- data: JSON.stringify(form),
- type: 'post',
- contentType: "application/json",
- dataType: 'json',
- cache: false,
- success: function (res) {
- $('.master').hide()
- if (res.status === 0) {
- WebViewJavascriptBridge.callHandler('OpenBridgeKit', res.data)
- } else {
- toastr.error(res.msg)
- }
- }
- })
- }
- </script>
- </html>
|