Açıklama Yok

login.html 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  6. <meta name="apple-mobile-web-app-capable" content="yes">
  7. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  8. <link href="./css/mui.min.css" rel="stylesheet" />
  9. <title>登陆</title>
  10. <style>
  11. .mui-input-row {
  12. border-bottom: 1px solid #c9c9c9;
  13. }
  14. .mui-card-content {
  15. padding: 0 20px;
  16. }
  17. .mui-input-row {
  18. height: 75px;
  19. }
  20. #phone,
  21. #code {
  22. height: 50%;
  23. }
  24. label,
  25. input {
  26. float: none !important;
  27. }
  28. input {
  29. padding: 0 15px !important;
  30. }
  31. label {
  32. display: block;
  33. font-weight: 600;
  34. padding: 13px 15px 8px !important;
  35. }
  36. .line {
  37. display: inline-block;
  38. border-left: 1px solid #1ba3c9;
  39. padding-left: 10px;
  40. height: 25px;
  41. position: absolute;
  42. right: 10px;
  43. color: #1ba3c9;
  44. font-size: 16px;
  45. font-weight: 600;
  46. }
  47. .btn {
  48. width: 90%;
  49. margin: 50px auto 40px;
  50. background-color: #1ba3c9;
  51. outline: none;
  52. border: none;
  53. padding: 10px 12px;
  54. display: block;
  55. border-radius: 10px;
  56. font-size: 16px;
  57. color: #fff;
  58. }
  59. </style>
  60. </head>
  61. <body>
  62. <header class="mui-bar mui-bar-nav">
  63. <h1 class="mui-title">手机认证</h1>
  64. </header>
  65. <div class="mui-content">
  66. <div class="mui-card">
  67. <div class="mui-card-content">
  68. <div class="mui-input-row phone">
  69. <label>手机号</label>
  70. <input type="text" placeholder="请输入手机号" id="phone">
  71. </div>
  72. <div class="mui-input-row">
  73. <label>验证码</label>
  74. <input type="text" class="mui-input-clear" placeholder="请输入验证码" id="code">
  75. <span class="line" onclick="getCode()">获取验证码</span>
  76. </div>
  77. <button type="button" class="btn">登陆</button>
  78. </div>
  79. </div>
  80. </div>
  81. <script src="./js/mui.min.js"></script>
  82. <script src="./js/zepto.js"></script>
  83. <script src="./script/config.js"></script>
  84. <script src="./js/huayi.http.js"></script>
  85. <script>
  86. var workorderid = helper.request.queryString("workorderid")
  87. $(document).ready(function () {
  88. $('.btn').click(function(){
  89. if (!$('#phone').val()) {
  90. mui.alert('请输入手机号')
  91. }else if (!$('#code').val()){
  92. mui.alert('请输入验证码')
  93. }else{
  94. $.ajax({
  95. type: "get",
  96. url: huayi.config.callcenter_url + 'APP/Verification',
  97. data: {
  98. code: $('#code').val(),
  99. phone:$('#phone').val() ,
  100. },
  101. dataType: 'json',
  102. success: function (data) {
  103. if (data.state.toLowerCase() === 'success') {
  104. window.location.replace("orderDetails.html?workorderid="+workorderid);
  105. }
  106. }
  107. });
  108. }
  109. })
  110. })
  111. function getCode(){
  112. if (!$('#phone').val()) {
  113. mui.alert('请输入手机号')
  114. }else{
  115. var params = {
  116. mobile: $('#phone').val(),
  117. }
  118. if (Number(workorderid)) {
  119. params.id= workorderid
  120. }else{
  121. params.workorderid= workorderid
  122. }
  123. $.ajax({
  124. type: "get",
  125. url: huayi.config.callcenter_url + 'APP/SendCode',
  126. async: true,
  127. dataType: "json",
  128. data:params,
  129. success: function (data) {
  130. if(data.state.toLowerCase() === 'success'){
  131. let num = 60;
  132. $(".line").attr("onclick","")
  133. let fq=setInterval(function(){
  134. num -=1
  135. $('.line').text(num);
  136. if(num == 0){
  137. clearInterval(fq)
  138. $(".line").attr("onclick","getCode()")
  139. $('.line').text('获取验证码')
  140. }
  141. },1000)
  142. }else{
  143. mui.alert(data.message)
  144. }
  145. }
  146. })
  147. }
  148. }
  149. </script>
  150. </body>
  151. </html>