文档
测试
POST
/open/login_user

接口描述

$.ajax({ url : '/open/login_user', data : { username : username, password : password }, success:function(data){ // console.log(data); // alert(JSON.stringify(data)); if(data.ret == '0') { window.location.href = "/user/home_index.do"; } else{ errorLabel.html(data.msg); $(".middle").css("margin-top","60px"); $(".error").show(); return; //alert(data.msg); } }, error:function(err){ errorLabel.html("服务器异常,请与管理员联系!"); } })

请求参数

参数名
类型
描述
必填
usernam
文本
用户账号
必填
password
文本
密码
必填

响应参数

参数名
类型
描述
必填
data.ret == '0'
文本
window.location.href = "/user/home_index.do";
必填

说明 / 示例

$.ajax({ url : '/open/login_user', data : { username : username, password : password }, success:function(data){ // console.log(data); // alert(JSON.stringify(data)); if(data.ret == '0') { window.location.href = "/user/home_index.do"; } else{ errorLabel.html(data.msg); $(".middle").css("margin-top","60px"); $(".error").show(); return; //alert(data.msg); } }, error:function(err){ errorLabel.html("服务器异常,请与管理员联系!"); } })