1 |
- var scripts,currentScript,appConfigSrc,PROJECT_CONFIG={};function ProjectConfig(){var e,t,o={version:.1,siteName:"微服务管理平台",minSiteMame:"微+",projectContext:"/direwolf-app",portalPath:"/admin",loginPath:"/admin/login",portalHome:"/admin/index",homeMenuWidth:200,system:{namespace:"",name:"",root:""},assetsPath:"/common-assets",backServerType:"msa",authServiceConfig:{gatewayRoute:"/auth"},sysServiceConfig:{adminPath:"/a",gatewayRoute:"/sys"},activitiServiceConfig:{adminPath:"/a",gatewayRoute:"/activiti"},platmanServiceConfig:{adminPath:"/a",gatewayRoute:"/platman"},dashboardServiceConfig:{adminPath:"/a",gatewayRoute:"/sys"},quartzServiceConfig:{adminPath:"/a",gatewayRoute:"/sys"},synchronizationServiceConfig:{adminPath:"/a",gatewayRoute:"/000/direwolf-cloud.synchronization-bizc"},defaultTheme:["#2f4050"],showErrorTips:!0,requestTimeout:0,proxyPath:"/api",storeType:"zonS3"};PROJECT_CONFIG.system&&PROJECT_CONFIG.system.root&&PROJECT_CONFIG.system.name&&(t=(e=PROJECT_CONFIG.system.root+"/"+PROJECT_CONFIG.system.name.toLowerCase()+".")+"direwolf-",o.authServiceConfig.gatewayRoute=t+"auth",o.sysServiceConfig.gatewayRoute=t+"sys",o.activitiServiceConfig.gatewayRoute=t+"activiti",o.synchronizationServiceConfig.gatewayRoute=e+"synchronization-bizc");var n=assign({},o,PROJECT_CONFIG);o.dashboardServiceConfig.gatewayRoute=o.sysServiceConfig.gatewayRoute,o.quartzServiceConfig.gatewayRoute=o.sysServiceConfig.gatewayRoute;var a=0===n.assetsPath.indexOf("http");return n.assetsContext=a?n.assetsPath:n.projectContext+n.assetsPath,constantize(n),n}function constantize(o){Object.freeze(o),Object.keys(o).forEach(function(e,t){"object"==typeof o[e]&&constantize(o[e])})}function getSuperiorWindow(){var e=null;if(top===self)return self;try{top.document?e=top:parent.document&&(e=parent)}catch(e){}return e}function fixIEMemoryLeak(){!document.documentMode||(document.onkeydown=function(e){"F5"===e.key&&(window.open(getSuperiorWindow().location.href,"_blank").focus(),window.open("","_self",""),window.close())})}function assign(e,t){"use strict";if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(e),n=1;n<arguments.length;n++){var a=arguments[n];if(null!=a)for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])}return o}"undefined"!=typeof window?(fixIEMemoryLeak(),(currentScript=document.currentScript)||(currentScript=(scripts=document.getElementsByTagName("script"))[scripts.length-1]),appConfigSrc=currentScript.src.replace("project.config.js","app.config.js"),document.write('<script src="'+appConfigSrc+"?t="+(new Date).getTime()+'"><\/script>'),window.__PROJECT_CONFIG__=new ProjectConfig):"undefined"!=typeof module&&(PROJECT_CONFIG=require("./app.config"),module.exports=new ProjectConfig),"undefined"!=typeof sessionStorage&&(sessionStorage.length||(localStorage.removeItem("clearSessionStorage"),localStorage.setItem("getSessionStorage",Date.now().toString())),window.addEventListener("storage",function(e){var t;"getSessionStorage"===e.key&&sessionStorage.length?(localStorage.setItem("sessionStorage",JSON.stringify(sessionStorage)),localStorage.removeItem("sessionStorage")):"clearSessionStorage"===e.key&&sessionStorage.length?(sessionStorage.clear(),e.newValue&&(top.src?top.location.replace(e.newValue):self.location.replace(e.newValue))):"sessionStorage"!==e.key||sessionStorage.length||!e.newValue||(t=JSON.parse(e.newValue))&&Object.keys(t).forEach(function(e){sessionStorage.setItem(e,t[e])})}));
|