This commit is contained in:
2026-02-09 17:08:31 +08:00
parent c40682a171
commit bc721c3add
+5
View File
@@ -6,6 +6,7 @@ use app\common\model\SkuAttributeValue;
use app\common\validate\SkuValidate;
use app\common\traits\crud\CrudServiceTrait;
use app\common\model\Sku;
use support\exception\BusinessException;
use support\Redis;
use support\Request;
@@ -84,6 +85,10 @@ class SkuService
isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http');
$domain = $protocol . '://' . $request->host();
if(!is_numeric($data['price'])){
throw new BusinessException('价格不合法,需要是数字');
}
$spec = [];
foreach ($data['spec'] as $key => $value) {
$specItem = [];