login_VSees.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  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>VSees Login</title>
  8. <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
  9. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-..." crossorigin="anonymous" />
  10. </head>
  11. <style type="text/css">
  12. html,body{
  13. width: 100%;
  14. height: 100%;
  15. margin: 0px;
  16. }
  17. *{
  18. margin: 0px;
  19. padding: 0px;
  20. box-sizing: border-box;
  21. }
  22. #t_div{
  23. width: 100%;
  24. /*height: 200px;*/
  25. height: 25%;
  26. background-color:#66677C;
  27. margin-top: 0px;
  28. margin-bottom: -20px;
  29. /*border-bottom: solid 1px red;*/
  30. }
  31. #c_div{
  32. width: 100%;
  33. /*height: 430px ;*/
  34. height: 50%;
  35. margin-top: 0px;
  36. margin-bottom: 0px;
  37. border-top: solid 1px #66677C;
  38. position: relative;
  39. background-color: yellow;
  40. }
  41. #c_leftdiv{
  42. width: 50%;
  43. /*height: 430px;*/
  44. height: 100%;
  45. margin: 0px;
  46. background-color: #7ab6b6;
  47. float: left;
  48. /*position: relative;*/
  49. /*left: 50px;
  50. top: 100px;*/
  51. }
  52. #c_rightdiv{
  53. width: 50%;
  54. /*height: 430px;*/
  55. height: 100%;
  56. margin: 0px;
  57. background-color: #e5cfaa;
  58. float: left;
  59. }
  60. /*阴影部分*/
  61. /*#c_centerdiv-shadow{
  62. width: 350px;
  63. height: 390px;
  64. background-color: #a09177;
  65. position: absolute;
  66. left: 0;
  67. right: 0;
  68. margin-left: 37.3%;
  69. margin-top: 3.5%;
  70. z-index: 1;
  71. }*/
  72. #c_centerdiv > p{
  73. font-size: 20px;
  74. font-weight: 100;
  75. margin-left: 100px;
  76. margin: 10px auto;
  77. text-align: center;
  78. }
  79. #c_centerdiv > img{
  80. margin-left: 10px;
  81. }
  82. #password_text{
  83. width: 90%;
  84. height: 50px;
  85. line-height: 30px;
  86. /*background-color: red;*/
  87. font-size: 40px;
  88. }
  89. #c_centerdiv > img{
  90. display: block;
  91. position: relative;
  92. left: 0px;
  93. top: 10px;
  94. padding: 0px;
  95. }
  96. #c_centerdiv{
  97. background-color: #fff;
  98. position: absolute;
  99. left: 0;
  100. right: 0;
  101. margin-left: auto;
  102. margin-right: auto;
  103. top: 50%;
  104. margin-top: -193px;
  105. /*margin-top: -15.1%;*/
  106. z-index: 10;
  107. }
  108. #c_centerdiv{
  109. width: 350px;
  110. height: 390px;
  111. padding: 50px 30px;
  112. }
  113. #c_center_title{
  114. width: 100%;
  115. height: 19%;
  116. /*height: 55px;*/
  117. color: #555;
  118. font-size: 30px;
  119. font-weight: 600;
  120. font-family: 'Arimo', sans-serif;
  121. text-align: center;
  122. /*background-color: red;*/
  123. }
  124. #c_center_div1{
  125. width: 100%;
  126. height: 19%;
  127. /*height: 55px;*/
  128. color: #555;
  129. font-size: 10px;
  130. font-weight: 600;
  131. font-family: 'Arimo', sans-serif;
  132. text-align: center;
  133. /*background-color: red;*/
  134. }
  135. #c_center_div2{
  136. width: 100%;
  137. height: 13.8%;
  138. text-align: center;
  139. padding: 0px;
  140. position: relative;
  141. /*background-color: yellow;*/
  142. margin-top: 0px;
  143. margin-top: 30px;
  144. }
  145. /*图片*/
  146. #c_center_div2 > img{
  147. position: absolute;
  148. left: 0px;
  149. top: 0px;
  150. }
  151. #user_text{
  152. width: 100%;
  153. /*width: 80%;*/
  154. height: 40px;
  155. float: right;
  156. background-color: #fff;
  157. font-size: 17px;
  158. letter-spacing: 1px;
  159. box-shadow: 0 0 0 0 transparent;
  160. border: none;
  161. border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  162. border-radius: 0;
  163. display: inline-block;
  164. font-family: "微软雅黑";
  165. }
  166. #password_text{
  167. width: 100%;
  168. /*width: 80%;*/
  169. height: 40px;
  170. float: right;
  171. background-color: #fff;
  172. font-size: 17px;
  173. letter-spacing: 1px;
  174. box-shadow: 0 0 0 0 transparent;
  175. border: none;
  176. border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  177. border-radius: 0;
  178. display: inline-block;
  179. font-family: "微软雅黑";
  180. }
  181. #password_icon {
  182. position: absolute;
  183. top: 8px;
  184. right: 10px;
  185. cursor: pointer;
  186. }
  187. #c_center_div4{
  188. display: flex;
  189. align-items: center;
  190. justify-content: center;
  191. width: 100%;
  192. height: 16%;
  193. text-align: center;
  194. padding: 0px;
  195. position: relative;
  196. /* background-color: yellow;*/
  197. margin-top: 0px;
  198. margin-top: 30px;
  199. }
  200. #login_button{
  201. width: 50.7%;
  202. height: 100%;
  203. /*background-image: url(img/按钮初始界面.png);*/
  204. outline:none;
  205. border:none;
  206. background-color: #7ab6b6;
  207. border-radius:30px;
  208. font-size: large;
  209. color: white;
  210. font-family: Arial;
  211. }
  212. #login_button:hover{
  213. cursor: pointer;
  214. }
  215. #login_button:disabled {
  216. background-color: #ccc; /* 灰色背景 */
  217. cursor: not-allowed; /* 禁用指针样式 */
  218. }
  219. #b_div{
  220. width: 100%;
  221. /*height: 120px;*/
  222. height: 27.2%;
  223. background-color:#66677C;
  224. }
  225. #loading_icon{
  226. position: absolute;
  227. right: 89px;
  228. color: #fff;
  229. }
  230. .loading-icon {
  231. display: none;
  232. }
  233. .loading-icon.visible {
  234. display: inline-block;
  235. }
  236. </style>
  237. <body marginheight="0px" marginwidth="0px">
  238. <div id="t_div">
  239. </div>
  240. <div id="c_div">
  241. <div id="c_leftdiv"></div>
  242. <div id="c_rightdiv"></div>
  243. <div id="c_centerdiv">
  244. <div id="c_center_title">
  245. VSees
  246. </div>
  247. <div id="c_center_div1">
  248. Please enter your VSees account for association
  249. </div>
  250. <div id="c_center_div2">
  251. <!--<img src="img/用户.png"/>-->
  252. <input id="user_text" type="text" placeholder="Account"/>
  253. </div>
  254. <div id="c_center_div2">
  255. <!--<img src="img/密码.png"/>-->
  256. <input id="password_text" type="password" placeholder="Password"/>
  257. <i
  258. id="password_icon"
  259. class="far fa-eye-slash"
  260. onclick="togglePasswordVisibility()"
  261. ></i>
  262. </div>
  263. <div id="c_center_div4">
  264. <input type="button" id="login_button" value="LOGIN" onclick="Login();return false"/>
  265. <i id="loading_icon" class="fas fa-spinner fa-spin loading-icon"></i>
  266. </div>
  267. </div>
  268. <!--阴影部分-->
  269. <!-- <div id="c_centerdiv-shadow">-->
  270. </div>
  271. </div>
  272. <div id="b_div">
  273. </div>
  274. <script type="text/javascript">
  275. function showLoadingIcon() {
  276. var loginButton = document.getElementById("login_button");
  277. var loadingIcon = document.getElementById("loading_icon");
  278. loginButton.disabled = true;
  279. loadingIcon.classList.add("visible");
  280. }
  281. function hideLoadingIcon() {
  282. var loginButton = document.getElementById("login_button");
  283. var loadingIcon = document.getElementById("loading_icon");
  284. loginButton.disabled = false;
  285. loadingIcon.classList.remove("visible");
  286. }
  287. function togglePasswordVisibility() {
  288. var passwordInput = document.getElementById("password_text");
  289. var passwordIcon = document.getElementById("password_icon");
  290. if (passwordInput.type === "password") {
  291. passwordInput.type = "text";
  292. passwordIcon.classList.remove("fa-eye-slash");
  293. passwordIcon.classList.add("fa-eye");
  294. } else {
  295. passwordInput.type = "password";
  296. passwordIcon.classList.remove("fa-eye");
  297. passwordIcon.classList.add("fa-eye-slash");
  298. }
  299. }
  300. function Login() {
  301. var user = document.getElementById("user_text");
  302. var pwd = document.getElementById("password_text");
  303. if (user.value.length > 0) {
  304. showLoadingIcon();
  305. //console.log("user: " + user.value);
  306. //console.log("pwd: " + pwd.value);
  307. var params = ("user=" + user.value + "&pwd=" + pwd.value + "&state={{ state }}" + "&client_id={{ client_id }}"
  308. + "&response_type={{ response_type }}" + "&scope={{ scope }}" + "&redirect_uri={{ redirect_uri }}"
  309. + "&skill_name={{ skill_name }}");
  310. $.get("/oa2/login", params)
  311. .done(function (reUrl) {
  312. let data = JSON.parse(reUrl);
  313. if (data['code'] === 0) {
  314. console.log('request start');
  315. window.location = data['res'];
  316. } else {
  317. alert(data['msg']);
  318. }
  319. hideLoadingIcon();
  320. })
  321. .fail(function (xhr, textStatus, error) {
  322. // 请求失败的处理
  323. hideLoadingIcon();
  324. alert(textStatus);
  325. });
  326. } else {
  327. alert("please input user and password");
  328. }
  329. }
  330. </script>
  331. </body>
  332. </html>