Commit 124b1116 authored by zhz's avatar zhz

sale

parent 0156bf37
......@@ -117,8 +117,8 @@ class ImageUtil {
* @return mixed|string 返回图片路径
*/
public static function getGoodsImgUrl($goodsImg,$width=\Our\ImageConst::goodsListImgSize, $height = 0){
$width = $width * \Our\ImageConst::sizeScale;
$height ? $height = $height * \Our\ImageConst::sizeScale : $height = $width;
$width = ceil($width * \Our\ImageConst::sizeScale);
$height ? $height = ceil($height * \Our\ImageConst::sizeScale) : $height = $width;
if (empty($goodsImg)) {
$directory =\Our\ImageConst::defaultPath;
//$goodsImg = str_ireplace('.', '_' . $type . '.', 'default_goods_image.gif');
......
......@@ -85,8 +85,8 @@ class StoreModel extends \DAO\AbstractModel
*/
public function getStoreLabelSrc($storeLabel, $width = \Our\ImageConst::circleStoreLabel, $height = 0)
{
$width = $width * \Our\ImageConst::sizeScale;
$height ? $height = $height * \Our\ImageConst::sizeScale : $height = $width;
$width = ceil($width * \Our\ImageConst::sizeScale);
$height ? $height = ceil($height * \Our\ImageConst::sizeScale) : $height = $width;
if ($storeLabel) {
$storeLabel = \Our\Common::getStaticFile($storeLabel, \Our\ImageConst::storeLabel, 'ossHost');
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment