amp生成返回空判断

hotfix/远程访问多媒体中心
尹诚诚 6 years ago
parent 5bb020a9a4
commit cf39c1fb83

@ -11,6 +11,13 @@
dataType: "json", dataType: "json",
url: "<?php echo site_url('amp/auto_create/') ?>/" + ic_id, url: "<?php echo site_url('amp/auto_create/') ?>/" + ic_id,
success: function (result, textStatus) { success: function (result, textStatus) {
//当result为空的时候跳过
if(result.length == 0 || result =='' || undefined || null){
$(msg_obj).html("<a href='javascript:void(0);' onclick='create_amp_data(" + index + ");' >发生错误,请重试</a>");
create_amp_data(++index);
return;
}
$.each(result, function (i, field) { $.each(result, function (i, field) {
if (i === 'data') { if (i === 'data') {
amp_code = field.amp; amp_code = field.amp;

Loading…
Cancel
Save