1
This commit is contained in:
@@ -6,6 +6,7 @@ use app\common\model\SkuAttributeValue;
|
|||||||
use app\common\validate\SkuValidate;
|
use app\common\validate\SkuValidate;
|
||||||
use app\common\traits\crud\CrudServiceTrait;
|
use app\common\traits\crud\CrudServiceTrait;
|
||||||
use app\common\model\Sku;
|
use app\common\model\Sku;
|
||||||
|
use support\exception\BusinessException;
|
||||||
use support\Redis;
|
use support\Redis;
|
||||||
use support\Request;
|
use support\Request;
|
||||||
|
|
||||||
@@ -84,6 +85,10 @@ class SkuService
|
|||||||
isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http');
|
isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http');
|
||||||
$domain = $protocol . '://' . $request->host();
|
$domain = $protocol . '://' . $request->host();
|
||||||
|
|
||||||
|
if(!is_numeric($data['price'])){
|
||||||
|
throw new BusinessException('价格不合法,需要是数字');
|
||||||
|
}
|
||||||
|
|
||||||
$spec = [];
|
$spec = [];
|
||||||
foreach ($data['spec'] as $key => $value) {
|
foreach ($data['spec'] as $key => $value) {
|
||||||
$specItem = [];
|
$specItem = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user