标签:time alert json格式 err 响应 success body arch arc
var rh = new Object(); rh.ReqId = "ls123"; rh.Salt = "sssseee"; var rb = new Object(); rb.CatId = "00001"; var jn = new Object(); jn.ReqHead = rh; jn.ReqBody = rb; var sendData = JSON.stringify(jn); console.log("------", sendData); mui.ajax("http://123.207.88.84:8080/zdm/AppApi/Search/CategoryList", { data: sendData, dataType: ‘json‘, //服务器返回json格式数据 type: ‘post‘, //HTTP请求类型 timeout: 10000, //超时时间设置为10秒; headers: { ‘Content-Type‘: ‘application/json‘ }, success: function(data) { //服务器返回响应,根据响应结果,分析是否登录成功; _this.message = data; }, error: function(xhr, type, errorThrown) { //异常处理; console.log(type); alert(type); } });
标签:time alert json格式 err 响应 success body arch arc
原文地址:http://www.cnblogs.com/thankyouGod/p/7748463.html