123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
- <title></title>
- <link href="AFrontEnd/css/fontawesome/css/font-awesome.css" rel="stylesheet" />
- <link href="AFrontEnd/css/bootstrap.css" rel="stylesheet" />
- <link href="AFrontEnd/css/style.css" rel="stylesheet" />
- <link rel="icon" href="js/login/images/logo3.png" type="image/x-icon">
- <script>document.write("<link href='AFrontEnd/css/special.css?time=" + new Date().getTime() + "' rel='stylesheet'>");</script>
- <style type="text/css">
- body, html {
- overflow: hidden;
- }
- /*写在最外层首页,用来隐藏最外层的滚动条*/
- </style>
- </head>
- <body>
- <script src="AFrontEnd/js/jquery/jquery-1.8.3.min.js"></script>
- <script src="js/base64.js"></script>
- <script src="apiurljs.js"></script>
- <script src="js/sm4.js"></script>
- <script>document.write('<scri' + 'pt src="AFrontEnd/js/special/special.js?time=' + new Date().getTime() + '" type="text/javascript"></s' + 'cript>');;</script>
- <script>
- $.ajax({
- //url: "js/login/userData1.txt",
- url: apiurljs.login + 'g2app/usercertification/verifytoken',
- type: 'post',
- dataType: 'json',
- contentType: "application/json",
- headers: { "Access-Token": sp.getUrlName("token") }, ////请求头headers
- data: JSON.stringify({
- data: s4.encryptData_CBC(JSON.stringify({
- client_id: "androidclient",
- grant_type: "password",
- scope: "openid profile email RefineAPI"
- }))
- }),
- success: function (obj) {
- var res = strToJson(s4.decryptData_CBC(obj.data));
- if (sp.getUrlName("token") != "" && res.success == true) {
- localStorage.setItem("GlWorkPlatform-AccessToken", res.data.postAccessToken)
- /////存入userid、及英文名
- $.cookie("GlWorkPlatform-userid", res.data.userid, { path: '/', expires: 1 });
- $.cookie("GlWorkPlatform-username", res.data.username, { path: '/', expires: 1 });
- $.cookie("CrossPage-ctime", sp.getLocalDate1(), { path: '/', expires: 1 });
- $.cookie("GlWorkPlatform-chineseName", res.data.ushowname, { path: '/', expires: 1 });
- $.ajax({
- url: apiurljs.login + "api/User/UserInfo",
- type: 'post',
- dataType: 'json',
- contentType: 'application/json',
- headers: { Authorization: "Bearer " + res.data.postAccessToken }, ////请求头headers
- success: function (obj1) {
- var res1 = strToJson(s4.decryptData_CBC(obj1.data));
- localStorage.setItem("GlWorkPlatform-userInfoJsonStr", s4.encryptData_CBC(JSON.stringify(res1.data)));
- timeout = setTimeout(function () {
- window.location.href = "index.html";
- sessionStorage.setItem("GlWorkPlatform-LoginFrom", "GlWorkPlatform-LoginHtml");
- }, 500);
- }
- });
- }
- }
- })
- </script>
- </body>
- </html>
|