<script>
$(function(){
$("#login").on('click',function(event){
$.ajax({
type:"POST",
url:"{:url('checkLogin')}",//地址
data:$("form").serialize(),
dataType:"json",
success:function(data){
if(data.$status === 1){
window.location.href="{:url('index/index')}"
}else{
console.log(data.$message)
}
}
})
})
})
</script>
Server Error