1 扩展
1.1 条件查询get,非json
根据restful风格,如果直接在user加条件会冲突,所以决定,在/user加上查询条件让后台好区分地址
$.ajax({
url: bashPath + "/rest/api/innovation/user/numpwd",
type: "get",
data: /*JSON.stringify(jsjson)*/{
num : num,
password : password
},
timeout: 20000,
success: function (data) {
console.log(data)
if(data.result == '0000') {
// window.location.href = bashPath + '/rest/index'
window.open(bashPath + '/rest/index','_parent');
} else {
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("访问后台发生错误:" + XMLHttpRequest.status)
}
});