这个ajax是怎么提交的
myAjax({
url:url,
data:dataParam,
name : 'jsname.functionname', // myAjax 要求名字,按文件名.函数名 请求
//dataType:'json',
method :'POST',
success:function(data){
},
error:function(xhr,type){
alert("无法提交单品信息!");
console.log(xhr);
},
complete:function(){
alert("单品信息正在提交...");
}
});
function myAjax(e) {
e.type = "background_ajax";
var t = e.extra_key ? e.extra_key + e.name : e.name;
e.key = t, AjaxMsgHandler[t] = e, e.target_tab = LAST_TAB_COOKIE;
my_COMMUNICATE_PORT.postMessage(e)
}
var my_COMMUNICATE_PORT = chrome.extension.connect({
name: "com.my.plugins"
}),
AjaxMsgHandler = {},
LAST_TAB_COOKIE = null;
my_COMMUNICATE_PORT.onMessage.addListener(function(e) {
var t = e.key,
n = AjaxMsgHandler[t];
if(!n) return;
LAST_TAB_COOKIE = e.tab_cookie;
if(e.tabnomatch) return;
e.success ? n.success && n.success(e.data, n) : n.error && n.error(e.data, n)
})