Authored by 郝肖肖

单击图片放大,客户

@@ -1193,12 +1193,16 @@ function pageInit() { @@ -1193,12 +1193,16 @@ function pageInit() {
1193 }); 1193 });
1194 1194
1195 // 消息图片放大显示 1195 // 消息图片放大显示
1196 - $msgList.on('click', '.msg-bubble .img-msg', function(e) { 1196 + $msgList.on('click', '.msg-bubble img', function(e) {
1197 var $et = $(e.target), 1197 var $et = $(e.target),
1198 $zoom = $('.img-zoom-in'), 1198 $zoom = $('.img-zoom-in'),
1199 $img = $zoom.find('img'), 1199 $img = $zoom.find('img'),
1200 maxH = $window.height() - 100; 1200 maxH = $window.height() - 100;
1201 1201
  1202 + if ($et.attr('src') === '') {
  1203 + return false;
  1204 + }
  1205 +
1202 $img.css('max-height', maxH); 1206 $img.css('max-height', maxH);
1203 $img.attr('src', $et.attr('src')); 1207 $img.attr('src', $et.attr('src'));
1204 $zoom.fadeIn(); 1208 $zoom.fadeIn();