原来的详情也下滑到商品详情也的时候会先显示图片占位符 很难看 不如直接用src了
/addons/ewei_shopv2/core/model/ui.php
<?php if( !defined("IN_IA") )
{
exit( "Access Denied" );
}
//屏蔽了lazyload功能
class Ui_EweiShopV2Model
{
public function lazy($html = "")
{
global $_W;
$html = preg_replace_callback("/<img.*?src=[\\\\'| \\\"](.*?(?:[\\.gif|\\.jpg|\\.png|\\.jpeg]?))[\\\\'|\\\"].*?[\\/]?>/", function($matches) use ($_W)
{
$images = $matches[0];
// if( strexists($images, "http://") || strexists($images, "https://") )
// {
// return preg_replace("/src=/", "data-lazy=", $images);
// }
if( file_exists(IA_ROOT . "/" . $_W["config"]["upload"]["attachdir"] . "/" . $matches[1]) )
{
$image = $matches[1];
$images = str_replace($image, tomedia($image), $images);
}
$attachurl = str_replace(array( "https://", "http://" ), "", $_W["attachurl_local"]);
if( strexists($images, $attachurl) )
{
$image = $matches[1];
$image = str_replace(array( "https://", "http://" ), "", $image);
$image = str_replace($attachurl, "", $image);
$images = str_replace(array( "https://", "http://" ), "", $images);
$images = str_replace($attachurl, "", $images);
$images = str_replace($image, tomedia($image), $images);
}
else
{
$image = $matches[1];
$images = str_replace($image, tomedia($image), $images);
}
// return preg_replace("/src=/", "data-lazy=", $images);
return preg_replace("/src=/", "src=", $images);
}
, $html);
return $html;
}
}