//加载动画
U.loading().startLoad('正在加载页面资源…').ready(function() {
	U.closeLoad();
});
//版本检测
U.V = function(s){
	//储存版本号在浏览器本地
	let v = s != U.versions;
	if (v) {
		localStorage['gyl_web_versions'] = U.versions;
		alert("发现新版本立即更新");
		U.L("正在更新资源……");
		window.location.reload(true);
	}
}
U.ready(function(){
	let v = localStorage['gyl_web_versions'];
	if(v != undefined){
		U.V(v);
	}else{
		localStorage['gyl_web_versions'] = U.versions;
	}
});
//拦截器
U.hookAjax({
	//拦截回调 - readyState状态改变触发
	onreadystatechange: function(xhr) {
		if (xhr.status != 200) {
			U.E(xhr.responseURL + "<br>(" + xhr.status + ")出错了");
		}
	},
	//拦截打开
	open: function(arg, xhr) {
		
	},
	onload: function(xhr) {

	},
	//拦截POST 发送请求
	send: function(a) {

	},
	//请求头
	setRequestHeader: function(h, xhr) {}
});
