lqmac 4 months ago
commit 9df3572113
  1. 1
      app/api/controller/Goods.php
  2. 9
      app/common/library/Download.php
  3. 1
      app/common/service/qrcode/Goods.php

@ -612,6 +612,7 @@ class Goods extends Controller
if (empty($value['jd_short_url'])) {
$value['jd_short_url'] = $jd_url[$value['goods_no']]['copy'];
}
$value['membership_price'] = $value['goods_price_min'];
//分类
if ($cates) {
//会员价

@ -36,7 +36,14 @@ class Download
$result = $this->curl($url);
empty($result) && throwError('获取到的图片内容为空 url: ' . $url);
$this->fwrite($savePath, $result);
}
//特殊处理一下文件格式为webp的图片
$mime = mime_content_type($savePath);
if ($mime=='image/webp') {
$im = imagecreatefromwebp($savePath);
imagepng($im, $savePath);
}
}
return $savePath;
}

@ -96,6 +96,7 @@ class Goods extends BaseQRcode
$fontPath = Grafika::fontsDir() . '/' . 'st-heiti-light.ttc';
// 打开海报背景图
$editor->open($backdropImage, $backdrop);
// 打开商品图片
$editor->open($goodsImage, $goodsUrl);
// 重设商品图片宽高

Loading…
Cancel
Save