.post('http:phpapi.com', {
key: key,
type: 'getdata',
data: {
id: 1
}
})
.then(function (res) {
// 成功的回调
console.log(res)
})
.catch(function (error) {
// 失败的回调
console.log(error);
});