mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 22:10:49 +00:00
【程序目录】优化生成图片流程
This commit is contained in:
parent
ebf9dd9c52
commit
0afffdcf98
@ -201,11 +201,11 @@ class StoreOrderComputedServices extends BaseServices
|
||||
if (!$flag) {
|
||||
throw new ApiException(410243);
|
||||
}
|
||||
$payPrice = (float)bcsub((string)$payPrice, (string)$couponInfo['coupon_price'], 2);
|
||||
if ($isCreate) {
|
||||
$res1 = $couponServices->useCoupon($couponId);
|
||||
}
|
||||
$couponPrice = $couponInfo['coupon_price'];
|
||||
$couponPrice = $couponInfo['coupon_price'] > $price ? $price : $couponInfo['coupon_price'];
|
||||
$payPrice = (float)bcsub((string)$payPrice, (string)$couponPrice, 2);
|
||||
} else {
|
||||
$couponPrice = 0;
|
||||
}
|
||||
|
||||
@ -74,8 +74,14 @@ class DownloadImage
|
||||
if (!$name) {
|
||||
//TODO 获取要下载的文件名称
|
||||
$downloadImageInfo = $this->getImageExtname($url);
|
||||
$ext = $downloadImageInfo['ext_name'];
|
||||
$name = $downloadImageInfo['file_name'];
|
||||
if (!$name) throw new AdminException(400725);
|
||||
} else {
|
||||
$ext = $this->getImageExtname($name)['ext_name'];
|
||||
}
|
||||
if (in_array($ext, ['php', 'js', 'html'])) {
|
||||
throw new AdminException(400558);
|
||||
}
|
||||
if (strstr($url, 'http://') === false && strstr($url, 'https://') === false) {
|
||||
$url = 'http:' . $url;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user