| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <!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">
- <script src="../Script/Common/huayi.config.js"></script>
- <script src="../Script/Common/huayi.http.js"></script>
- <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;
- }
- .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 {
- 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 40px;
- background-color: #1ba3c9;
- outline: none;
- border: none;
- padding: 10px 12px;
- display: block;
- border-radius: 10px;
- font-size: 16px;
- color: #fff;
- }
- </style>
- </head>
- <body>
- <header class="mui-bar mui-bar-nav">
- <h1 class="mui-title">手机认证</h1>
- </header>
- <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>
- </div>
- <button type="button" class="btn">登陆</button>
- </div>
- </div>
- </div>
- <script src="../js/mui.min.js"></script>
- <script>
- var openid = "obwtK6JT-bTCeSbtqu4lkw4lIz0o";
- // var openid = helper.cookies.get("openid");
- if (!openid) {
- window.location.replace("../html/error.html");
- }
- $(document).ready(function () {
- $('.btn').click(function(){
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + '/WxLogin/EditUserInfo',
- data: {
- code: $('#code').val(),
- mobile:$('#phone').val() ,
- OpenId: openid
- },
- dataType: 'json',
- success: function (result) {
- if (result.state.toLowerCase() == "success") {
- window.location.replace("../html/addWorkOrder.html");
- }
- }
- });
- })
- })
- function getCode(){
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + 'WxLogin/SendCode',
- async: true,
- data: {
- mobile: $('#phone').val()
- },
- success: function (data) {
- if(data.data == 'success'){
- let num = 60;
- let fq=setInterval(function(){
- num -=1
- $('.line').text(num);
- if(num == 0){
- clearInterval(fq)
- layer.msg('请重新发送验证码')
- $('.line').text('获取验证码')
- }
- },1000)
- }
-
- }
- })
- }
- </script>
- </body>
- </html>
|