Authored by liuyue

封面图调用图片bug fix

@@ -181,7 +181,7 @@ GOLABDATA.on("LYbasicInfo", function() { @@ -181,7 +181,7 @@ GOLABDATA.on("LYbasicInfo", function() {
181 data = e.getSubmitData(); 181 data = e.getSubmitData();
182 data.productSkn = $('#productSkn').val(); 182 data.productSkn = $('#productSkn').val();
183 data.sellChannels = data.sellChannels.split('|').join(','); 183 data.sellChannels = data.sellChannels.split('|').join(',');
184 - data.shopIds = data.shopIds.split('|').join(','); 184 + data.shopIds = data.shopIds ? data.shopIds.split('|').join(',') : '';
185 return data; 185 return data;
186 } 186 }
187 }); 187 });
@@ -343,7 +343,7 @@ $(document).on('click', '.btn-use-img', function() { @@ -343,7 +343,7 @@ $(document).on('click', '.btn-use-img', function() {
343 var data = res.data; 343 var data = res.data;
344 var imgHtml = ''; 344 var imgHtml = '';
345 345
346 - if (res.code == 200 && data.list instanceof Array) { 346 + if (res.code == 200 && data.list instanceof Array && data.list[0].pictureBoList instanceof Array) {
347 $.each(data.list[0].pictureBoList, function(i, value) { 347 $.each(data.list[0].pictureBoList, function(i, value) {
348 imgHtml += '<img class="use-img" src="' + value.fileName + '" alt="" width="100" height="140" data-index="' + index + '" style="cursor:pointer;margin: 0 0 10px 10px;" />'; 348 imgHtml += '<img class="use-img" src="' + value.fileName + '" alt="" width="100" height="140" data-index="' + index + '" style="cursor:pointer;margin: 0 0 10px 10px;" />';
349 }); 349 });