{"size": 728, "ext": "js", "max_stars_repo_path": "target/classes/static/js/dict.js", "max_stars_repo_name": "wyb01/springboot-security", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "target/classes/static/js/dict.js", "max_issues_repo_name": "wyb01/springboot-security", "max_issues_repo_issues_event_min_datetime": "2021-06-04T02:13:54.000Z", "max_issues_repo_issues_event_max_datetime": "2021-06-04T02:13:54.000Z", "max_forks_repo_path": "target/classes/static/js/dict.js", "max_forks_repo_name": "wyb01/springboot-security", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 19.6756756757, "max_line_length": 66, "alphanum_fraction": 0.5137362637}
function showDictSelect(id, type, all) {
	var data = getDict(type);
	var select = $("#" + id);
	select.empty();

	if (all != undefined && all) {
		select.append("<option value=''>全部</option>");
	}

	$.each(data, function(k, v) {
		select.append("<option value ='" + k + "'>" + v + "</option>");
	});

	return data;
}

function getDict(type) {
	var v = sessionStorage[type];
	if (v == null || v == "") {
		$.ajax({
			type : 'get',
			url : '/dicts?type=' + type,
			async : false,
			success : function(data) {
				v = {};
				$.each(data, function(i, d) {
					v[d.k] = d.val;
				});

				sessionStorage[type] = JSON.stringify(v);
			}
		});
	}

	return JSON.parse(sessionStorage[type]);
}
