login.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <meta name="viewport" content="width=device-width">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  7. <title>XXXX Login</title>
  8. <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
  9. </head>
  10. <style type="text/css">
  11. html,body{
  12. width: 100%;
  13. height: 100%;
  14. margin: 0px;
  15. }
  16. *{
  17. margin: 0px;
  18. padding: 0px;
  19. box-sizing: border-box;
  20. }
  21. #t_div{
  22. width: 100%;
  23. /*height: 200px;*/
  24. height: 25%;
  25. background-color:#66677C;
  26. margin-top: 0px;
  27. margin-bottom: -20px;
  28. /*border-bottom: solid 1px red;*/
  29. }
  30. #c_div{
  31. width: 100%;
  32. /*height: 430px ;*/
  33. height: 50%;
  34. margin-top: 0px;
  35. margin-bottom: 0px;
  36. border-top: solid 1px #66677C;
  37. position: relative;
  38. background-color: yellow;
  39. }
  40. #c_leftdiv{
  41. width: 50%;
  42. /*height: 430px;*/
  43. height: 100%;
  44. margin: 0px;
  45. background-color: #7ab6b6;
  46. float: left;
  47. /*position: relative;*/
  48. /*left: 50px;
  49. top: 100px;*/
  50. }
  51. #c_rightdiv{
  52. width: 50%;
  53. /*height: 430px;*/
  54. height: 100%;
  55. margin: 0px;
  56. background-color: #e5cfaa;
  57. float: left;
  58. }
  59. /*阴影部分*/
  60. /*#c_centerdiv-shadow{
  61. width: 350px;
  62. height: 390px;
  63. background-color: #a09177;
  64. position: absolute;
  65. left: 0;
  66. right: 0;
  67. margin-left: 37.3%;
  68. margin-top: 3.5%;
  69. z-index: 1;
  70. }*/
  71. #c_centerdiv > p{
  72. font-size: 20px;
  73. font-weight: 100px;
  74. margin-left: 100px;
  75. margin: 10px auto;
  76. text-align: center;
  77. }
  78. #c_centerdiv > img{
  79. margin-left: 10px;
  80. }
  81. #password_text{
  82. width: 90%;
  83. height: 50px;
  84. line-height: 30px;
  85. /*background-color: red;*/
  86. font-size: 40px;
  87. }
  88. #c_centerdiv > img{
  89. display: block;
  90. position: relative;
  91. left: 0px;
  92. top: 10px;
  93. padding: 0px;
  94. }
  95. #c_centerdiv{
  96. background-color: #fff;
  97. position: absolute;
  98. left: 0;
  99. right: 0;
  100. margin-left: auto;
  101. margin-right: auto;
  102. top: 50%;
  103. margin-top: -193px;
  104. /*margin-top: -15.1%;*/
  105. z-index: 10;
  106. }
  107. #c_centerdiv{
  108. width: 350px;
  109. height: 390px;
  110. padding: 50px 30px;
  111. }
  112. #c_center_div1{
  113. width: 100%;
  114. height: 19%;
  115. /*height: 55px;*/
  116. color: #555;
  117. font-size: 30px;
  118. font-weight: 600;
  119. font-family: 'Arimo', sans-serif;
  120. text-align: center;
  121. /*background-color: red;*/
  122. }
  123. #c_center_div2{
  124. width: 100%;
  125. height: 13.8%;
  126. text-align: center;
  127. padding: 0px;
  128. position: relative;
  129. /*background-color: yellow;*/
  130. margin-top: 0px;
  131. margin-top: 30px;
  132. }
  133. /*图片*/
  134. #c_center_div2 > img{
  135. position: absolute;
  136. left: 0px;
  137. top: 0px;
  138. }
  139. #user_text{
  140. width: 100%;
  141. /*width: 80%;*/
  142. height: 40px;
  143. float: right;
  144. background-color: #fff;
  145. font-size: 17px;
  146. letter-spacing: 1px;
  147. box-shadow: 0 0 0 0 transparent;
  148. border: none;
  149. border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  150. border-radius: 0;
  151. display: inline-block;
  152. font-family: "微软雅黑";
  153. }
  154. #password_text{
  155. width: 100%;
  156. /*width: 80%;*/
  157. height: 40px;
  158. float: right;
  159. background-color: #fff;
  160. font-size: 17px;
  161. letter-spacing: 1px;
  162. box-shadow: 0 0 0 0 transparent;
  163. border: none;
  164. border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  165. border-radius: 0;
  166. display: inline-block;
  167. font-family: "微软雅黑";
  168. }
  169. #c_center_div4{
  170. width: 100%;
  171. height: 16%;
  172. text-align: center;
  173. padding: 0px;
  174. position: relative;
  175. /* background-color: yellow;*/
  176. margin-top: 0px;
  177. margin-top: 30px;
  178. }
  179. #login_button{
  180. width: 50.7%;
  181. height: 100%;
  182. /*background-image: url(img/按钮初始界面.png);*/
  183. outline:none;
  184. border:none;
  185. background-color: #7ab6b6;
  186. border-radius:30px;
  187. font-size: large;
  188. color: white;
  189. font-family: Arial;
  190. }
  191. #login_button:hover{
  192. cursor: pointer;
  193. }
  194. #b_div{
  195. width: 100%;
  196. /*height: 120px;*/
  197. height: 27.2%;
  198. background-color:#66677C;
  199. }
  200. </style>
  201. <body marginheight="0px" marginwidth="0px">
  202. <div id="t_div">
  203. </div>
  204. <div id="c_div">
  205. <div id="c_leftdiv"></div>
  206. <div id="c_rightdiv"></div>
  207. <div id="c_centerdiv">
  208. <div id="c_center_div1">
  209. WELCOME
  210. </div>
  211. <div id="c_center_div2">
  212. <!--<img src="img/用户.png"/>-->
  213. <input id="user_text" type="text" placeholder="Account"/>
  214. </div>
  215. <div id="c_center_div2">
  216. <!--<img src="img/密码.png"/>-->
  217. <input id="password_text" type="password" placeholder="Password"/>
  218. </div>
  219. <div id="c_center_div4">
  220. <input type="button" id="login_button" value="LOGIN" onclick="Login();return false;"/>
  221. </div>
  222. </div>
  223. <!--阴影部分-->
  224. <!-- <div id="c_centerdiv-shadow">-->
  225. </div>
  226. </div>
  227. <div id="b_div">
  228. </div>
  229. <script type="text/javascript">
  230. function Login() {
  231. var user = document.getElementById("user_text");
  232. var pwd = document.getElementById("password_text");
  233. if (user.value.length > 0) {
  234. //console.log("user: " + user.value);
  235. //console.log("pwd: " + pwd.value);
  236. var params = ("user=" + user.value + "&pwd=" + pwd.value + "&state={{ state }}" + "&client_id={{ client_id }}" + "&response_type={{ response_type }}" + "&scope={{ scope }}" + "&redirect_uri={{ redirect_uri }}");
  237. $.get("/oa2/login", params, function (reUrl) {
  238. //alert(reUrl);
  239. let data = JSON.parse(reUrl)
  240. console.log('request start')
  241. window.location = data['res'];
  242. });
  243. } else {
  244. alert("please input user and password");
  245. }
  246. }
  247. </script>
  248. </body>
  249. </html>