1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title></title>
- <link href="AFrontEnd/css/special.css" rel="stylesheet" />
- </head>
- <body class="sp-text-center">
- <div class="sp-box" style="width:1200px">您即将跳转至<a style="color:blue" id="href"></a>,请问是否继续?</div>
- <div class="sp-box">
- <button class="sp-btn-blue sp-radius sp-btn-sm sp-mr-10" onclick="login()">继续访问</button>
- <button class="sp-btn-gray sp-radius sp-btn-sm sp-ml-10" onclick="window.location.href = 'about:blank'">关闭</button>
- </div>
- </body>
- </html>
- <script src="apiurljs.js"></script>
- <script src="AFrontEnd/js/jquery/jquery-1.8.3.min.js"></script>
- <script src="AFrontEnd/js/special/special.js"></script>
- <script>
- document.getElementById("href").innerHTML = window.location.href;
- var urlFiled = window.location.search;
- function login() {
- $.ajax({
- url: apiurljs.login + "g2app/message/getuserInfo",
- type: 'post',
- contentType: 'application/json',
- dataType: 'json',
- data: JSON.stringify({
- userid: getParameter("userid"),
- column: "uinputname,ushowname"
- }),
- success: function (res) {
- $.cookie("GlWorkPlatform-userid", getParameter("userid"), { path: '/', expires: 1 });
- $.cookie("GlWorkPlatform-username", res.data.UINPUTNAME, { path: '/', expires: 1 });
- $.cookie("GlWorkPlatform-chineseName", res.data.USHOWNAME, { path: '/', expires: 1 });
- $.cookie("CrossPage-ctime", sp.getLocalDate1(), { path: '/', expires: 1 });
- //延时进行跳转
- timeout = setTimeout(function () {
- window.location.href = "index.html?openPage=" + getParameter("openPage") + "&&PKID=" + getParameter("PKID") + "&&CNAME=" + decodeURI(getParameter("CNAME"));
- sessionStorage.setItem("GlWorkPlatform-LoginFrom", "GlWorkPlatform-LoginHtml");
- }, 500);
- },
- error: function (e) {
- console.log(e)
- }
- });
- }
- function getParameter(str) {
- var urlFiled = "";
- var urlFileds = window.location.search.slice(1).split("&&");
- urlFileds.forEach(function (item) {
- if (item.indexOf(str) != -1) {
- urlFiled = item.slice(item.indexOf("=") + 1);
- }
- })
- return urlFiled
- }
- </script>
|