var params={
"path":"",
"type":""
}
$.ajax({
url: this.$config.mediaIp+'/play',
data: JSON.stringify(params),
contentType: "application/json; charset=utf-8",
beforeSend: function(request) {
// request.setRequestHeader("token", token);
},
// timeout: 3000,//3秒后提示错误
dataType: 'JSON',
type: 'post',
success: function (res) {
console.log(res);
},
error: function () {
console.log('连接服务器失败!');
}
});
jQuery.ajax post请求
于 2022-09-16 11:18:04 首次发布