login.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>国天云医院后勤保障服务支持系统</title>
  6. <meta name="renderer" content="webkit">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <link rel="Shortcut Icon" href="/public/images/logo.png" type="image/x-icon" />
  9. <link rel="stylesheet" href="/public/bootstrap-3.3.5-dist/css/bootstrap.min.css">
  10. <link href="/public/layer/skin/layer.css" rel="stylesheet">
  11. <script src="/public/js/jquery-1.11.3.min.js"></script>
  12. <script src="/public/bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>
  13. <script src="/public/layer/layer.js"></script>
  14. <style type="text/css">
  15. html {
  16. height: 100%;
  17. }
  18. body {
  19. font-family:"Microsoft Yahei";
  20. font-size:12px;
  21. margin:0;
  22. background: #fff url(/public/images/bg2x.png) no-repeat;
  23. background-size:100% 100%;
  24. height:100%;
  25. width:100%;
  26. overflow: hidden;
  27. background-size: cover;
  28. color: #fff;
  29. padding-top: 11%;
  30. }
  31. .login-div{
  32. width: 950px;
  33. height: 600px;
  34. margin: 0 auto;
  35. }
  36. .login-left{
  37. padding-top: 85px;
  38. }
  39. .login-left img{
  40. width: 313px;
  41. height: 163px;
  42. }
  43. .login-left-body{
  44. padding-top: 24px;
  45. color: #ffffff;
  46. font-weight: bold;
  47. }
  48. .login-left-title{
  49. font-size: 22px;
  50. letter-spacing: 2px;
  51. }
  52. .login-left-desc{
  53. font-size: 15px;
  54. }
  55. .login-right{
  56. width: 390px;
  57. height: 420px;
  58. background-color: #ffffff;
  59. padding: 15px 25px 20px 25px;
  60. float: right;
  61. padding-top: 25px;
  62. }
  63. .login-right h3{
  64. width: 100%;
  65. height: 30px;
  66. line-height: 30px;
  67. padding-left: 3px;
  68. color: #0f0f0f;
  69. text-align: center;
  70. letter-spacing: 10px;
  71. }
  72. .login-input{
  73. width: 100%;
  74. height:50px ;
  75. line-height: 50px;
  76. margin-top: 10px;
  77. }
  78. .login_user{
  79. width: 50px;
  80. height: 100%;
  81. display: inline-block;
  82. background: #295898;
  83. border-radius: 8px 0px 0px 8px;
  84. padding: 0px 12px;
  85. }
  86. .login_user img{
  87. width: 26px;
  88. height: 26px;
  89. margin-top: -4px;
  90. }
  91. .login_input {
  92. width: 280px;
  93. height: 50px;
  94. line-height: 48px;
  95. display: inline-block;
  96. margin-left: -3px;
  97. border-right:1px solid #F1F1F1;
  98. border-top:1px solid #F1F1F1;
  99. border-bottom:1px solid #F1F1F1;
  100. border-radius: 0px 5px 5px 0px;
  101. }
  102. .login-input1{
  103. padding: 10px 0;
  104. }
  105. .login-input1 a{
  106. color: #8B8EAA;
  107. padding-right: 35px;
  108. }
  109. .login-input1 a:hover,.login-input1 a:focus,.login-input1 a:active{
  110. color: #8B8EAA;
  111. text-decoration: none;
  112. }
  113. .login-input input{
  114. width: 100%;
  115. height: 45px;
  116. /*line-height: 50px;*/
  117. background-color: transparent;
  118. border: 0;
  119. outline: none;
  120. border-radius: 5px;
  121. font-size: 16px;
  122. padding-left: 30px;
  123. color: #0f0f0f;
  124. }
  125. input::-webkit-input-placeholder {
  126. font-weight: 400;
  127. color: #BBBBBB;
  128. }
  129. .login-ss{
  130. margin-top: 40px;
  131. }
  132. .login-footer{
  133. padding: 20px 10px;
  134. margin-top: 10px;
  135. }
  136. .login-submit{
  137. display: inline-block;
  138. width: 100%;
  139. height: 50px;
  140. line-height: 50px;
  141. background: #295898;
  142. border-radius: 8px;
  143. color: #ffffff;
  144. font-size: 16px;
  145. text-align: center;
  146. }
  147. .login-submit:hover,.login-submit:focus{
  148. color: #ffffff;
  149. text-decoration: none;
  150. }
  151. .login-input-box{
  152. width: 100%;
  153. height: 50px;
  154. line-height: 50px;
  155. overflow: hidden;
  156. margin-top: 30px;
  157. }
  158. .login-input-box .login_icon{
  159. width: 60px;
  160. height: 48px;
  161. text-align: center;
  162. background-color: #295898;
  163. float: left;
  164. border-radius: 8px 0 0 8px;
  165. border: 1px solid #295898;
  166. }
  167. .login-input-box .login_icon img{
  168. width: 25px;
  169. height: 25px;
  170. vertical-align: middle;
  171. margin-top: -5px;
  172. }
  173. .login_input-box{
  174. width: 279px;
  175. height: 48px;
  176. float: left;
  177. border-radius: 0 8px 8px 0;
  178. border: 1px solid #DDDDDD;
  179. border-left: 0;
  180. color: #222222;
  181. overflow: hidden;
  182. }
  183. .login_input-box input{
  184. width: 100%;
  185. height: 100%;
  186. vertical-align: middle;
  187. border: 0;
  188. outline: none;
  189. margin-top: -8px;
  190. font-size: 16px;
  191. padding: 0 15px;
  192. }
  193. </style>
  194. </head>
  195. <body>
  196. <div class="login-div">
  197. <div class="col-xs-6 login-left text-center">
  198. <img src="/public/images/login2x.png">
  199. <div class="login-left-body">
  200. <span class="login-left-title">医院后勤保障服务支持系统</span> <br>
  201. </div>
  202. </div>
  203. <div class="col-xs-6 login-right">
  204. <h3 >用户登录</h3>
  205. <div class="login-ss" id="login1">
  206. <div class="login-input-box">
  207. <div class="login_icon">
  208. <img src="/public/images/login_user2x.png" alt="">
  209. </div>
  210. <div class="login_input-box">
  211. <input id="Username" type="text" placeholder="请输入您的用户名">
  212. </div>
  213. </div>
  214. <div class="login-input-box">
  215. <div class="login_icon">
  216. <img src="/public/images/login_pw2x.png" alt="">
  217. </div>
  218. <div class="login_input-box">
  219. <input id="Password" type="password" placeholder="请输入您的密码">
  220. </div>
  221. </div>
  222. </div>
  223. <div class="login-footer">
  224. <a href="javascript:;" class="login-submit" id="login-btn" onclick="login()">登 录</a>
  225. </div>
  226. </div>
  227. </div>
  228. </body>
  229. </html>
  230. <script type="text/javascript">
  231. if(window.top!==window.self){
  232. window.top.location=window.location
  233. }
  234. var type = 1;
  235. function logintab(_self) {
  236. $('.login-btn').removeClass('cur');
  237. $(_self).addClass('cur');
  238. $('.login-ss').hide();
  239. $('#'+$(_self).attr('data-ele')).show();
  240. type = $(_self).attr('data-type');
  241. }
  242. function login() {
  243. var flag = $('#login-btn').attr('data-flag');
  244. if(flag == 1){
  245. return false;
  246. }
  247. $('#login-btn').attr('data-flag',1).html('登 录 中...');
  248. if(type == 1){
  249. var username = $('#Username').val();
  250. var password = $('#Password').val();
  251. }else{
  252. var username = $('#phone').val();
  253. var password = $('#code').val();
  254. // layer.msg('暂不支持此登录方式');
  255. // $('#login-btn').attr('data-flag',0).html('登 录');
  256. // return false;
  257. }
  258. $.ajax({
  259. url:'/Account/checkLogin',
  260. type:"POST",
  261. data:{'Username':username,'Password':password,'type':type},
  262. success:function (res) {
  263. if(res.status == 1){
  264. window.location.href = '/Home/index';
  265. }else{
  266. layer.msg(res.info);
  267. }
  268. $('#login-btn').attr('data-flag',0).html('登 录');
  269. },
  270. error:function (result) {
  271. layer.msg('请求失败');
  272. $('#login-btn').attr('data-flag',0).html('登 录');
  273. }
  274. });
  275. }
  276. document.onkeydown = function (e) { // 回车提交表单
  277. var theEvent = window.event || e;
  278. var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
  279. if (code == 13) {
  280. login();
  281. }
  282. }
  283. </script>