| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <link rel="stylesheet" href="../layui/css/layui.mobile.css" />
- <link href="../css/mui.min.css" rel="stylesheet" />
- <title>手机认证</title>
- <style>
- /* body{
- width: 100vw;
- height: 100vh;
- background-color: #f8f8f8;
- } */
- .mui-input-row {
- border-bottom: 1px solid #c9c9c9;
- }
- .mui-card-content {
- padding: 0 20px;
- position: relative;
- padding-top: 60px;
- }
- .mui-input-row {
- height: 75px;
- }
- #phone,
- #code {
- height: 50%;
- }
- label,
- input {
- float: none !important;
- }
- input {
- padding: 0 15px !important;
- }
- label {
- display: block;
- font-weight: 600;
- padding: 13px 15px 8px !important;
- }
- .line,.codeTX {
- display: inline-block;
- border-left: 1px solid #1ba3c9;
- padding-left: 10px;
- height: 25px;
- position: absolute;
- right: 10px;
- color: #1ba3c9;
- font-size: 16px;
- font-weight: 600;
- }
- .btn{
- width: 90%;
- margin: 50px auto 78px;
- background-color: #1ba3c9;
- outline: none;
- border: none;
- padding: 12px 12px;
- display: block;
- border-radius: 30px;
- font-size: 18px;
- color: #fff;
- }
- .tbtn{
- position: absolute;
- left: -1px;
- top: 15px;
- display: inline-block;
- width: 85px;
- padding: 5px 0;
- color: #fff;
- text-align: center;
- border-radius: 0 20px 20px 0;
- background-color: #fb9703;
- }
- </style>
- </head>
- <body>
- <div class="mui-content">
- <div class="mui-card">
- <div class="mui-card-content">
- <div class="mui-input-row phone">
- <label>手机号</label>
- <input type="text" placeholder="请输入手机号" id="phone">
- </div>
- <div class="mui-input-row">
- <label>验证码</label>
- <input type="text" class="mui-input-clear" placeholder="请输入验证码" id="code">
- <span class="line" onclick="getCode()">获取验证码</span>
- <span class="codeTX">60s</span>
- </div>
- <button type="button" class="btn" >登录</button>
- <button type="button" class="tbtn" >退回</button>
- </div>
- </div>
- </div>
- <script src="../js/mui.min.js"></script>
- <script src="../js/jquery.min.js"></script>
- <script src="../layui/layui.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <script src="../Script/Common/huayi.http.js"></script>
- <script>
- $('.codeTX').css('display', 'none')
- // var openid = 'obwtK6JT-bTCeSbtqu4lkw4lIz0o'
- var openid = helper.cookies.get("openid");
- // if (!openid) {
- // window.location.replace("../html/error.html");
- // }
-
- $('.btn').click(function(){
-
-
- if(!(/^1[3|4|5|7|8]\d{9}$/.test($('#phone').val()))){
- mui.alert("请输入正确的手机号");
- return false;
- }
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + '/APP/Checking',
- data: {
- code: $('#code').val(),
- phone:$('#phone').val()
- },
- dataType: 'json',
- success: function (result) {
- if (result.state.toLowerCase() == "success") {
- localStorage.setItem('tell', $('#phone').val());
- window.location.replace("../html/workOrdeListr.html?tell="+$('#phone').val());
- }
- }
- });
- })
-
- $('.tbtn').click(function(){
- window.location.replace("../html/home.html")
- })
-
- function getCode(){
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + 'WxLogin/SendCode',
- async: true,
- dataType: 'json',
- data: {
- mobile: $('#phone').val()
- },
- success: function (res) {
- if (res.state == 'success') {
- let num = 60
- $('.line').css('display', 'none')
- $('.codeTX').css('display', 'inline-block')
- var fq = setInterval(function() {
- num -= 1
- $('.codeTX').text(num+'s')
- console.log(num)
- if (num == 0) {
- clearInterval(fq)
- $('.codeTX').css('display', 'none')
- $('.line').css('display', 'inline-block')
- }
-
- }, 1000)
- }
- }
- })
- }
- </script>
- </body>
- </html>
|