login.html 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <html>
  2. <!DOCTYPE html>
  3. <html lang="en" class="no-js">
  4. <head>
  5. <meta charset="utf-8">
  6. <title>江苏港口智能监管信息平台</title>
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
  9. <meta name="description" content="">
  10. <meta name="author" content="">
  11. <script src="assets/js/jquery-1.8.2.min.js" ></script>
  12. <script src="assets/js/supersized.3.2.7.min.js" ></script>
  13. <script src="assets/js/supersized-init.js" ></script>
  14. <!-- CSS -->
  15. <link rel="stylesheet" href="assets/css/reset.css">
  16. <link rel="stylesheet" href="assets/css/supersized.css">
  17. <link rel="stylesheet" href="assets/css/style.css">
  18. <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
  19. <!--[if lt IE 9]>
  20. <script src="assets/js/html5.js"></script>
  21. <![endif]-->
  22. <script type="text/javascript">
  23. //alert(getQueryString("code"))
  24. var code = getQueryString("code");
  25. $(function(){
  26. $.ajax({
  27. type: 'post',
  28. url: '../../usercontroller/findinfo.do',
  29. data:{code:code},
  30. dataType: 'json',
  31. success: function(data){
  32. console.log(data)
  33. $("#names").html(data.names)
  34. $("#over").remove();
  35. $("#layout").remove();
  36. console.log("请求结束")
  37. }});
  38. $("#login").live("click",function(){
  39. var username = $("#username").val();
  40. var password = $("#password").val();
  41. var dsid = $("#dsid").val();
  42. if(username.length<1){
  43. layer.open({
  44. shade:false,
  45. content: '用户名不能为空',
  46. style: 'background:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',
  47. time:1
  48. });
  49. return;
  50. }
  51. if(password.length<1){
  52. layer.open({
  53. shade:false,
  54. content: '密码不能为空',
  55. style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',
  56. time:1
  57. });
  58. return;
  59. }
  60. if(dsid.length<1){
  61. layer.open({
  62. shade:false,
  63. content: '请选择地市',
  64. style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',
  65. time:1
  66. });
  67. return;
  68. }
  69. $.ajax({
  70. type: 'post',
  71. url: '../../usercontroller/login.do',
  72. data:{username:username,password:password,code:code,dsid:dsid},
  73. dataType: 'json',
  74. success: function(data){
  75. if(data=="500"){
  76. layer.open({
  77. shade:false,
  78. content: '用户名或密码错误',
  79. style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',
  80. time:1
  81. });
  82. $("#over").remove();
  83. $("#layout").remove();
  84. }else if(data=="200"){
  85. layer.open({
  86. shade:false,
  87. content: '登录成功',
  88. style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',
  89. time:1
  90. });
  91. $("#over").remove();
  92. $("#layout").remove();
  93. setTimeout(function(){
  94. WeixinJSBridge.call('closeWindow');
  95. },1000)
  96. }else{
  97. layer.open({
  98. shade:false,
  99. content: '服务器异常!',
  100. style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',
  101. time:1
  102. });
  103. setTimeout(function(){
  104. window.location.reload();
  105. },1000)
  106. $("#over").remove();
  107. $("#layout").remove();
  108. }
  109. }});
  110. });
  111. /**
  112. $.ajax({
  113. type: 'post',
  114. url: '../usercontroller/login.do',
  115. data:{username:username,password:password},
  116. dataType: 'json',
  117. success: function(data){
  118. console.log(data);
  119. if(data.userEntity==null){
  120. layer.open({
  121. shade:false,
  122. content: '用户名或密码错误',
  123. style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',
  124. time:1
  125. });
  126. }else{
  127. $.ajax({
  128. type: 'post',
  129. url: '../usercontroller/updateuser.do',
  130. data:{dsid:dsid,code:code,bmid:data.bmid,username:data.userEntity.uname,uid:data.userEntity.id,name:data.userEntity.name,orgName:data.userEntity.orgName},
  131. dataType: 'json',
  132. success: function(data){
  133. layer.open({
  134. shade:false,
  135. content: '登录成功',
  136. style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',
  137. time:1
  138. });
  139. setTimeout(function(){
  140. }, 500)
  141. }});
  142. }
  143. }})
  144. **/
  145. })
  146. </script>
  147. <script type="text/javascript">
  148. function inputse(a){
  149. $("#dsidshow").val($('#dsid option:selected').text())
  150. }
  151. </script>
  152. <style type="text/css">
  153. .aaa{
  154. font-family: Microsoft YaHei,Segoe UI,Tahoma,Arial,Verdana,sans-serif;
  155. text-decoration: none;
  156. width: 100%;
  157. height: 42px;
  158. margin-top: 25px;
  159. padding: 0 15px;
  160. background: #2d2d2d;
  161. background: rgba(45,45,45,.15);
  162. -moz-border-radius: 6px;
  163. -webkit-border-radius: 6px;
  164. border-radius: 6px;
  165. border: 1px solid #3d3d3d;
  166. border: 1px solid rgba(255,255,255,.15);
  167. -moz-box-shadow: 0 2px 3px 0 rgba(0,0,0,.1) inset;
  168. -webkit-box-shadow: 0 2px 3px 0 rgba(0,0,0,.1) inset;
  169. box-shadow: 0 2px 3px 0 rgba(0,0,0,.1) inset;
  170. font-size: 14px;
  171. color: #fff;
  172. text-shadow: 0 1px 2px rgba(0,0,0,.1);
  173. -o-transition: all .2s;
  174. -moz-transition: all .2s;
  175. -webkit-transition: all .2s;
  176. -ms-transition: all .2s;
  177. }
  178. </style>
  179. </head>
  180. <body>
  181. <div class="" style="position:absolute;right: 10px;top: 10px">当前绑定用户: <span id="names" style="text-decoration: underline;"></span></div>
  182. <div class="page-container">
  183. <h1>登录</h1>
  184. <form action="" method="post">
  185. <input type="text" name="username" id="username" class="username" placeholder="请输入您的用户名">
  186. <input type="password" name="password" id="password" class="password" placeholder="请输入您的用户密码">
  187. <div style="position: relative;">
  188. <input type="text" readonly="readonly" id="dsidshow" class="username" value="请选择地市">
  189. <span style="width: 20px;height: 20px;font-size: 25px;position: absolute;right: 10px;top: 33px">∨</span>
  190. <select class="aaa" id="dsid" style="opacity:0;position: absolute;z-index: 100;left: 0px;top:0px" onchange="inputse(this)">
  191. <option class="aaa" value="">请选择地市</option>
  192. <option class="aaa" value="900">省级</option>
  193. </select>
  194. </div>
  195. <button type="button" id="login" class="submit_button">登录</button>
  196. <div class="error"><span>+</span></div>
  197. </form>
  198. </div>
  199. <!-- Javascript -->
  200. </body>
  201. </html>