{"size": 1415, "ext": "js", "max_stars_repo_path": "wiesel-admin/src/main/resources/static/js/plugins/app-core.js", "max_stars_repo_name": "wiesel07/wiesel", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "wiesel-admin/src/main/resources/static/js/plugins/app-core.js", "max_issues_repo_name": "wiesel07/wiesel", "max_issues_repo_issues_event_min_datetime": "2021-05-08T17:31:45.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-09T22:08:39.000Z", "max_forks_repo_path": "wiesel-admin/src/main/resources/static/js/plugins/app-core.js", "max_forks_repo_name": "wiesel07/wiesel", "max_forks_repo_forks_event_min_datetime": "2018-12-14T00:46:29.000Z", "max_forks_repo_forks_event_max_datetime": "2018-12-14T00:46:29.000Z"}
{"max_stars_count": null, "max_issues_count": 3, "max_forks_count": 1, "avg_line_length": 28.3, "max_line_length": 83, "alphanum_fraction": 0.4932862191}
/**
 * 通用方法封装处理
 * Copyright (c) 2018 wuj
 */
(function ($) {
	 $.extend({
		 // 表格树封装处理
	     treeTable: {
	        _option: {},
	        _treeTable: {},
	        // 初始化表格
	        init: function(options) {
	            $.treeTable._option = options;
	            var treeTable = $('#bootstrap-treeTable').bootstrapTreeTable(options);
	            $.treeTable._treeTable = treeTable;
	        },
	        // 条件查询
	        search: function(formId) {
	        	var currentId = app.isEmpty(formId) ? $('form').attr('id') : formId;
	        	var params = {};
	        	$.each($("#" + currentId).serializeArray(), function(i, field) {
	        		params[field.name] = field.value;
		        });
	        	$.treeTable._treeTable.bootstrapTreeTable('refresh', params);
	        },
	        // 刷新
	        refresh: function() {
	        	$.treeTable._treeTable.bootstrapTreeTable('refresh');
	        }
	    }
	 });
	 
	  $(document).ajaxStart(function () {
	        var index = layer.load(1, {
	            shade: [0.1, '#fff'] //0.1透明度的白色背景
	        });
	    });
	    $(document).ajaxStop(function () {
	        layer.closeAll('loading');
	    });
	    //登录过期，shiro返回登录页面
	    $.ajaxSetup({
	        complete: function (xhr, status,dataType) {
	            if('text/html;charset=UTF-8'==xhr.getResponseHeader('Content-Type')){
	                top.location.href = '/login';
	            }
	        }
	    });
})(jQuery);
