if(6 == etype) {
var isKkcy = 14 == projectId ? 1 : 0;
var nowType = isKkcy ? 5 : 6; //kkcy type=5
if(0 == tpdid && (14 == projectId || 2 == projectId)) {
alert('1');//alert()
ajaxInfo({
pid: myPaperId,
option_id: 6,
etype: nowType,
sub: linkmark,
}, ajax_url + 'Exam/createImitatePaper', function(data) {
alert('2');//alert()
if(data.status == 1) {
if(isKkcy){
window.location.href = ajax_url + linkmark+ '/Imitate/index/eid/' + data.eid; //kkcy的继续
}else {
window.location.href=ajax_url +'Imitate/enter/eid/'+data.eid;//cma的继续
}
}
如上面代码,alert('1')弹出来了,alert('2')并没有弹出来,关键是接口请求成功了,还请大神指教:
ajaxInfo,这个你是封装的函数?你看看第三个参数是回调函数吗?