1、ajax发送ajax跨域请求设置jsonp参数
$.ajax({
url:baseUrl + "/voiceUpload/saveVoiceMessage",
method:"get",
data:{
voiceNumber : voiceNumber,
voiceName : encodeURI(voiceName),
voiceSize : voiceSize,
voiceType : voiceType,
status:status
},
dataType:"jsonp",
jsonp: 'jsoncallback',
success:function (response) {
//弹出提示框
$scope.showKnowFlag = true;
$scope.knowMessage = response.message;
$scope.modalFlag = true;
//调用转写后将数据进行清除
voiceNumber = "";
voiceName = "";
voiceSize = "";
voiceType = "";
voiceCount = 0;
selectCount = 0;
},
error:function () {
//调用转写后将数据进行清除
voiceNumber = "";
voiceName = "";
voiceSize = "";
voiceType = "";
voiceCount = 0;
selectCount = 0;
}
});