|
@@ -100,6 +100,8 @@ class Product extends Auth{
|
|
|
$data['quota_start'] = $data['quota_start'] ? strtotime($data['quota_start']) : 0;
|
|
|
$data['quota_end'] = $data['quota_end'] ? strtotime($data['quota_end']) : 0;
|
|
|
// 限购提示
|
|
|
+ if( !$data['thumb'] ) return json_send(['code'=>'error','msg'=>'请上传产品主图','data'=>['error'=>'请上传产品主图']]);
|
|
|
+ // 限购提示
|
|
|
if( $data['quota'] && ( !$data['quota_start'] || !$data['quota_end'] )) return json_send(['code'=>'error','msg'=>'限购必填限购时间','data'=>['error'=>'限购必填限购时间']]);
|
|
|
// 总库存
|
|
|
if( $skuList ) $data['stock'] = array_sum(array_column($skuList,'stock'));
|
|
@@ -243,6 +245,8 @@ class Product extends Auth{
|
|
|
$data['quota_start'] = $data['quota_start'] ? strtotime($data['quota_start']) : 0;
|
|
|
$data['quota_end'] = $data['quota_end'] ? strtotime($data['quota_end']) : 0;
|
|
|
// 限购提示
|
|
|
+ if( !$data['thumb'] ) return json_send(['code'=>'error','msg'=>'请上传产品主图','data'=>['error'=>'请上传产品主图']]);
|
|
|
+ // 限购提示
|
|
|
if( $data['quota'] && ( !$data['quota_start'] || !$data['quota_end'] )) return json_send(['code'=>'error','msg'=>'限购必填限购时间','data'=>['error'=>'限购必填限购时间']]);
|
|
|
// 总库存
|
|
|
if( $skuList ) $data['stock'] = array_sum(array_column($skuList,'stock'));
|
|
@@ -423,6 +427,8 @@ class Product extends Auth{
|
|
|
$data['quota_start'] = $data['quota_start'] ? strtotime($data['quota_start']) : 0;
|
|
|
$data['quota_end'] = $data['quota_end'] ? strtotime($data['quota_end']) : 0;
|
|
|
// 限购提示
|
|
|
+ if( !$data['thumb'] ) return json_send(['code'=>'error','msg'=>'请上传产品主图','data'=>['error'=>'请上传产品主图']]);
|
|
|
+ // 限购提示
|
|
|
if( $data['quota'] && ( !$data['quota_start'] || !$data['quota_end'] )) return json_send(['code'=>'error','msg'=>'限购必填限购时间','data'=>['error'=>'限购必填限购时间']]);
|
|
|
// 总库存
|
|
|
if( $skuList ) $data['stock'] = array_sum(array_column($skuList,'stock'));
|