default.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  6. <title></title>
  7. <link href="AFrontEnd/css/fontawesome/css/font-awesome.css" rel="stylesheet" />
  8. <link href="AFrontEnd/css/bootstrap.css" rel="stylesheet" />
  9. <link href="AFrontEnd/css/style.css" rel="stylesheet" />
  10. <link rel="icon" href="js/login/images/logo3.png" type="image/x-icon">
  11. <script>document.write("<link href='AFrontEnd/css/special.css?time=" + new Date().getTime() + "' rel='stylesheet'>");</script>
  12. <style type="text/css">
  13. body, html {
  14. overflow: hidden;
  15. }
  16. /*写在最外层首页,用来隐藏最外层的滚动条*/
  17. </style>
  18. </head>
  19. <body>
  20. <script src="AFrontEnd/js/jquery/jquery-1.8.3.min.js"></script>
  21. <script src="js/base64.js"></script>
  22. <script src="apiurljs.js"></script>
  23. <script src="js/sm4.js"></script>
  24. <script>document.write('<scri' + 'pt src="AFrontEnd/js/special/special.js?time=' + new Date().getTime() + '" type="text/javascript"></s' + 'cript>');;</script>
  25. <script>
  26. $.ajax({
  27. //url: "js/login/userData1.txt",
  28. url: apiurljs.login + 'g2app/usercertification/verifytoken',
  29. type: 'post',
  30. dataType: 'json',
  31. contentType: "application/json",
  32. headers: { "Access-Token": sp.getUrlName("token") }, ////请求头headers
  33. data: JSON.stringify({
  34. data: s4.encryptData_CBC(JSON.stringify({
  35. client_id: "androidclient",
  36. grant_type: "password",
  37. scope: "openid profile email RefineAPI"
  38. }))
  39. }),
  40. success: function (obj) {
  41. var res = strToJson(s4.decryptData_CBC(obj.data));
  42. if (sp.getUrlName("token") != "" && res.success == true) {
  43. localStorage.setItem("GlWorkPlatform-AccessToken", res.data.postAccessToken)
  44. /////存入userid、及英文名
  45. $.cookie("GlWorkPlatform-userid", res.data.userid, { path: '/', expires: 1 });
  46. $.cookie("GlWorkPlatform-username", res.data.username, { path: '/', expires: 1 });
  47. $.cookie("CrossPage-ctime", sp.getLocalDate1(), { path: '/', expires: 1 });
  48. $.cookie("GlWorkPlatform-chineseName", res.data.ushowname, { path: '/', expires: 1 });
  49. $.ajax({
  50. url: apiurljs.login + "api/User/UserInfo",
  51. type: 'post',
  52. dataType: 'json',
  53. contentType: 'application/json',
  54. headers: { Authorization: "Bearer " + res.data.postAccessToken }, ////请求头headers
  55. success: function (obj1) {
  56. var res1 = strToJson(s4.decryptData_CBC(obj1.data));
  57. localStorage.setItem("GlWorkPlatform-userInfoJsonStr", s4.encryptData_CBC(JSON.stringify(res1.data)));
  58. timeout = setTimeout(function () {
  59. window.location.href = "index.html";
  60. sessionStorage.setItem("GlWorkPlatform-LoginFrom", "GlWorkPlatform-LoginHtml");
  61. }, 500);
  62. }
  63. });
  64. }
  65. }
  66. })
  67. </script>
  68. </body>
  69. </html>