api_token: api_token,
id: id,
type: 'zaishou',
}
$.ajax({
type: "GET",
url: webConfig.nonghunonghuTypeList,
data: details,
dataType: "json",
success: function(json) {
console.log(json)
if (json) {
try {
for(var i = 0i<json.lengthi++){
$('.maskedtab .checkcla').find('strong').append('<em id="'+json[i].id+'"><i></i>'+json[i].name+'</em>')
}
} catch (e) {
}
}
}
})
我的api_token 等于你的 cookie中存在的token?
这样紫能明白不
data{} 里面要传你的token参数 你没有传参
ajax返回时php生成一个token附带返回并更新表单的token。token放在http头中.用jquery.ajax,每次提交请求时,用前台用beforeSend携带http头后台验证后修改session请求结束,前台用complete函数修改http头.这样是不是和表单提交的每次刷新页面时修改token一样效果。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)