Commit 1bbc2bfd authored by christ's avatar christ

Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into ccw

parents 78206042 124b1116
...@@ -117,8 +117,8 @@ class ImageUtil { ...@@ -117,8 +117,8 @@ class ImageUtil {
* @return mixed|string 返回图片路径 * @return mixed|string 返回图片路径
*/ */
public static function getGoodsImgUrl($goodsImg,$width=\Our\ImageConst::goodsListImgSize, $height = 0){ public static function getGoodsImgUrl($goodsImg,$width=\Our\ImageConst::goodsListImgSize, $height = 0){
$width = $width * \Our\ImageConst::sizeScale; $width = ceil($width * \Our\ImageConst::sizeScale);
$height ? $height = $height * \Our\ImageConst::sizeScale : $height = $width; $height ? $height = ceil($height * \Our\ImageConst::sizeScale) : $height = $width;
if (empty($goodsImg)) { if (empty($goodsImg)) {
$directory =\Our\ImageConst::defaultPath; $directory =\Our\ImageConst::defaultPath;
//$goodsImg = str_ireplace('.', '_' . $type . '.', 'default_goods_image.gif'); //$goodsImg = str_ireplace('.', '_' . $type . '.', 'default_goods_image.gif');
......
...@@ -85,8 +85,8 @@ class StoreModel extends \DAO\AbstractModel ...@@ -85,8 +85,8 @@ class StoreModel extends \DAO\AbstractModel
*/ */
public function getStoreLabelSrc($storeLabel, $width = \Our\ImageConst::circleStoreLabel, $height = 0) public function getStoreLabelSrc($storeLabel, $width = \Our\ImageConst::circleStoreLabel, $height = 0)
{ {
$width = $width * \Our\ImageConst::sizeScale; $width = ceil($width * \Our\ImageConst::sizeScale);
$height ? $height = $height * \Our\ImageConst::sizeScale : $height = $width; $height ? $height = ceil($height * \Our\ImageConst::sizeScale) : $height = $width;
if ($storeLabel) { if ($storeLabel) {
$storeLabel = \Our\Common::getStaticFile($storeLabel, \Our\ImageConst::storeLabel, 'ossHost'); $storeLabel = \Our\Common::getStaticFile($storeLabel, \Our\ImageConst::storeLabel, 'ossHost');
} else { } 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