<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">$(document).ready(function(){
	$('#login').click(function(e){
		e.preventDefault();
		if (!$('#username').val()) {
			$('#msg_wrap').slideDown();
			$('#msg_content').text('请输入用户名');
		}
		else if (!$('#password').val()) {
			$('#msg_wrap').slideDown();
			$('#msg_content').text('请输入密码');
		}
		else {

			$.post("./api_login.php",
			{
				UserName: encodeURIComponent($('#username').val()),
				UserPassword: $('#password').val()
			},
			function(data, status){
				if (status == 'success') {
					result = JSON.parse(data);
					if (result.status == 'success') {
						location.reload();
					}
					else {
						$('#msg_wrap').slideDown();
						$('#msg_content').html(result.message);
						$('.white_content').animate({left: '100px'}, 50, function(){
							$(this).animate({left: '-100px'}, 100, function(){
								$(this).animate({left: '0'}, 50, function(){
								});
							});
						});
					}
				}
			});

		}
	});


})</pre></body></html>