text: layout=window.layout||{};var locate=window.location;layout.protocol=locate.protocol;var href=locate.href;-1!==href.indexOf("debugger")&&(layout.debugger=!0),layout.desktop=layout,layout.session=layout.session||{},o2.addReady((function(){o2.load(["../o2_lib/mootools/plugin/mBox.Notice.js","../o2_lib/mootools/plugin/mBox.Tooltip.js"],{sequence:!0},(function(){MWF.loadLP("zh-cn"),MWF.require("MWF.xDesktop.Layout",(function(){MWF.require("MWF.xDesktop.Authentication",null,!1),MWF.require("MWF.xDesktop.Common",null,!1),layout.load=function(){var o=href.toURI().getData("redirect");MWF.require("MWF.xDesktop.Actions.RestActions",(function(){var t=new MWF.xDesktop.Actions.RestActions("","x_organization_assemble_authentication","");t.getActions=function(o){this.actions={auth:{uri:"/jaxrs/welink/code/{code}"}},o&&o()},HWH5.getAuthCode().then((function(e){console.log(e.code),t.invoke({name:"auth",async:!0,parameter:{code:e.code},success:function(t){layout.session.user=t.data,o?(history.replaceState(null,"page",o),o.toURI().go()):(history.replaceState(null,"page","../x_desktop/appMobile.html?app=process.TaskCenter"),"appMobile.html?app=process.TaskCenter".toURI().go())}.bind(this),failure:function(o,t,e){history.replaceState(null,"page","../x_desktop/appMobile.html?app=process.TaskCenter"),"appMobile.html?app=process.TaskCenter".toURI().go()}.bind(this)})})).catch((function(o){console.log("获取异常",o)}))}))},layout.isAuthentication=function(){layout.authentication=new MWF.xDesktop.Authentication({onLogin:layout.load.bind(layout)});var o=!0;return this.authentication.isAuthenticated(function(o){this.user=o.data,layout.session.user=o.data}.bind(this),function(){this.authentication.loadLogin(this.node),o=!1}.bind(this)),o},layout.notice=function(o,t,e,n,i){n||(n={x:"right",y:"top"}),e||(e=this.content),t||(t="ok");var a=e||$(document.body),s=i;s||(s={x:10,y:(n.y.toString().toLowerCase(),10)}),new mBox.Notice({type:t,position:n,move:!1,target:a,delayClose:"error"==t?1e4:5e3,offset:s,content:o})},MWF.getJSON("res/config/config.json",(function(o){layout.config=o,MWF.xDesktop.getServiceAddress(layout.config,function(o,t){layout.serviceAddressList=o,layout.centerServer=t,layout.load()}.bind(this))}))}))}))}));