define([], function() { var loadDiv = document.createElement("div"); loadDiv.setAttribute("style", "position:absolute;top:49%;width:200px;"); var w = loadDiv.style.width; var w1 = (document.body.clientWidth - w.substring(0, w.length - 2)) / 2; loadDiv.style.left = w1 + "px"; loadDiv.innerHTML = "

页面加载中,请您耐心等待

"; document.body.appendChild(loadDiv); return function(styleSheets, app) { //init loading... require({ cacheBust: true }, ["app/config"], function(config) { require({ cacheBust: config.ver ? config.ver : false }, ["js/appfs"], function() { startapp(config); }); }); function startapp(config) { return require({ cacheBust: config.dojo ? config.dojo : false }, ["js/dojo.all"], function() { //close loading. require({ cacheBust: config.debug ? (config.ver ? config.ver : false) : false }, ["util/css"], function(css) { css(styleSheets, function() { if (app) require([app], function(obj) { document.body.removeChild(loadDiv); }); }); }); }); } } })