|
@@ -77,9 +77,10 @@ class CheckPower
|
|
|
if(!$item) return 0;
|
|
|
$parent = DatumIntro::where('id',$first_id)->where('status',1)->where('is_deleted',0)->find();
|
|
|
if(!$parent) return 0;
|
|
|
- $cate = DatumCate::where('id','in',[$parent->first_classify,$parent->second_classify])
|
|
|
+ if(!$parent->datum_cate) return 1;
|
|
|
+ $cate = DatumCate::where('id','in',[$parent->datum_cate])
|
|
|
->where('status',1)->where('is_deleted',0)->count();
|
|
|
- if($cate != 2) return 0;
|
|
|
+ if($cate != 1) return 0;
|
|
|
break;
|
|
|
case 'press':
|
|
|
$item = Press::where('id',$first_id)->where('status',1)->where('is_deleted',0)->value('id');
|