<commit_before>$(document).ready(function(){
	$(document).keydown(function(event){
		//press Enter
		if(event.keyCode == 13){
			$(".btn-login").click();
		}
	});
	$("#login").on("click", function(){
		var username = $("#username").val();
		var password = $("#password").val();
		$(this).attr("disabled", true).text("登录中...");
		$.ajax({
			type: 'POST',
			url: '/oauth/token?grant_type=password&username=' + username + '&password=' + password,
			beforeSend: function(request) {
				request.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
				request.setRequestHeader("Authorization", "Basic MzUzYjMwMmM0NDU3NGY1NjUwNDU2ODdlNTM0ZTdkNmE6Mjg2OTI0Njk3ZTYxNWE2NzJhNjQ2YTQ5MzU0NTY0NmM=");
			},
			success: function(data){
				sessionStorage.setItem("access_token", data.access_token);
				//sessionStorage.setItem("token_type", data.token_type);
				//sessionStorage.setItem("refresh_token", data.refresh_token);
				//sessionStorage.setItem("expires_in", data.expires_in);
				//sessionStorage.setItem("scope", data.scope);

				$.ajax({
					type: 'GET',
					url: '/api/user/fromtoken',
					beforeSend: function(request) {
						request.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
						request.setRequestHeader("Authorization", "bearer " + data.access_token);
					},
					success: function(dataLogin){
						for(var i = 0; i < dataLogin.roles.length; i++){
							if (dataLogin.roles[i].id == 5) {
								sessionStorage.setItem("cmsId", dataLogin.id);
								window.location.href="cms/index.html";
								return;
							}
						}
					}
				});
			},
			error : function(error){
				alert('用户名或密码错误');
				$("#login").attr("disabled", false).text("登 录");
			},
		});
	});
});<commit_msg>cms redirect<commit_after>$(document).ready(function(){
	$(document).keydown(function(event){
		//press Enter
		if(event.keyCode == 13){
			$(".btn-login").click();
		}
	});
	$("#login").on("click", function(){
		var username = $("#username").val();
		var password = $("#password").val();
		$(this).attr("disabled", true).text("登录中...");
		$.ajax({
			type: 'POST',
			url: '/oauth/token?grant_type=password&username=' + username + '&password=' + password,
			beforeSend: function(request) {
				request.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
				request.setRequestHeader("Authorization", "Basic MzUzYjMwMmM0NDU3NGY1NjUwNDU2ODdlNTM0ZTdkNmE6Mjg2OTI0Njk3ZTYxNWE2NzJhNjQ2YTQ5MzU0NTY0NmM=");
			},
			success: function(data){
				sessionStorage.setItem("access_token", data.access_token);
				//sessionStorage.setItem("token_type", data.token_type);
				//sessionStorage.setItem("refresh_token", data.refresh_token);
				//sessionStorage.setItem("expires_in", data.expires_in);
				//sessionStorage.setItem("scope", data.scope);

				$.ajax({
					type: 'GET',
					url: '/api/user/fromtoken',
					beforeSend: function(request) {
						request.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
						request.setRequestHeader("Authorization", "bearer " + data.access_token);
					},
					success: function(dataLogin){
						for(var i = 0; i < dataLogin.roles.length; i++){
							if (dataLogin.roles[i].id == 5) {
								sessionStorage.setItem("cmsId", dataLogin.id);
								window.location.href="index.html";
								return;
							}
						}
					}
				});
			},
			error : function(error){
				alert('用户名或密码错误');
				$("#login").attr("disabled", false).text("登 录");
			},
		});
	});
});
{'fraction_non_alphanumeric': 0.19331604724863152, 'fraction_numerical': 0.011524056467876692, 'mean_word_length': 3.924822695035461, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7049729', 'n_tokens_mistral': 1490, 'n_tokens_neox': 1215, 'n_words': 155}