{"size": 1096, "ext": "js", "max_stars_repo_path": "public/static/js/base.js", "max_stars_repo_name": "erikbZhang/raksmartOld", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/static/js/base.js", "max_issues_repo_name": "erikbZhang/raksmartOld", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/static/js/base.js", "max_forks_repo_name": "erikbZhang/raksmartOld", "max_forks_repo_forks_event_min_datetime": "2021-08-29T09:28:02.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-07T18:28:16.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 21.92, "max_line_length": 84, "alphanum_fraction": 0.5958029197}
/**
* 消息提示 
* @param msg 消息内容
* @param bool true成功提示;false错误提示
* @param func 回调函数
*/
function show_msg(msg,bool,func){
	layer.closeAll('loading'); //关闭加载层
	var type = bool == true || (!bool && bool !==false) ?1:2;
	layer.msg(msg,{icon:type,time:1200},function(){
		if(typeof(func) == 'function') func();
	});
}

/**
* 消息提示 
* @param msg 消息内容
* @param func 回调函数
*/
function show_confirm(msg,func){	
	layer.confirm(msg, function(index) {  
	   if(typeof(func) == 'function') func();
	});
}

$(function(){
	$('a#cancel').click(function(){
		parent.layer.closeAll();
	});
	
	$('a[lay-src]').click(function(){
		var val = $(this).attr('lay-src');
		if(val.length == 0) return false;
		$.post(val,function(res){
			if(res.code == 0) show_msg(res.msg,true);
			else show_msg(res.msg,false);
		},'json');
		parent.layer.closeAll();
	});
	
	 $(document).on('blur', 'input[data-href]', function() {
		var that = $(this);
		var ajaxUrl = that.data('href');
		layer.load(1);
		$.post(ajaxUrl, {value : that.val(),field:that.data('field')}, function(res) {				
				layer.closeAll();
			
		}, 'json');
	});
});