ajax固定套路 function http(url, data, method, success, fail) { data = method == 'GET' ? data : JSON.stringify(data) console.log(data); $.ajax({ url: url, type: method, dataType: 'json', contentType: 'application/json; charset=UTF-8', data: data, success:…