where('status',1)->where('is_deleted',0)->value('id'); if(!$item) return 0; $parent = VideoIntro::where('id',$first_id)->where('status',1)->where('is_deleted',0)->find(); if(!$parent) return 0; if($parent->type == 1) { $cate = VideoCate::where('id','in',[$parent->first_classify,$parent->second_classify]) ->where('status',1)->where('is_deleted',0)->count(); }else{ $cate = SeriesVideoCate::where('id','in',[$parent->first_classify,$parent->second_classify]) ->where('status',1)->where('is_deleted',0)->count(); } // if($cate != 2) return 0; break; case 'article': if($second_id != 0){ $item = ArticleItem::where('id',$second_id)->where('status',1)->where('is_deleted',0)->value('id'); if(!$item) return 0; } if($first_id != 0) { $parent = ArticleIntro::where('id', $first_id)->where('status', 1)->where('is_deleted', 0)->find(); if (!$parent) return 0; } if($parent->type == 1) { $cate = ArticleCate::where('id','in',[$parent->first_classify,$parent->second_classify]) ->where('status',1)->where('is_deleted',0)->count(); }else{ $cate = SeriesArticleCate::where('id','in',[$parent->first_classify,$parent->second_classify]) ->where('status',1)->where('is_deleted',0)->count(); } // if($cate != 2) return 0; break; case 'datum': $item = DatumUrl::where('id',$second_id)->where('status',1)->where('is_deleted',0)->value('id'); if(!$item) return 0; $parent = DatumIntro::where('id',$first_id)->where('status',1)->where('is_deleted',0)->find(); if(!$parent) return 0; if(!$parent->datum_cate) return 1; $cate = DatumCate::where('id','in',[$parent->datum_cate]) ->where('status',1)->where('is_deleted',0)->count(); //if($cate != 1) return 0; break; case 'press': $item = Press::where('id',$first_id)->where('status',1)->where('is_deleted',0)->value('id'); if(!$item) return 0; break; case 'forum': $item = UserForum::where('id',$first_id)->where('status',1)->where('is_deleted',0)->value('id'); if(!$item) return 0; break; case 'reply': $item = ForumReply::where('id',$first_id)->where('is_deleted',0)->value('id'); if(!$item) return 0; break; case 'recruit': if($type_id == 4){ $item = RecruitResume::where('id',$first_id)->where('status',1)->where('is_deleted',0)->find(); }else{ $item = Recruit::where('id',$first_id)->where('status',1)->where('is_deleted',0)->find(); } if(!$item) return 0; /* $cate = RecruitCate::where('id','in',[$item->first_classify,$item->second_classify]) ->where('status',1)->where('is_deleted',0)->count(); if($cate != 2) return 0;*/ break; case 'mall': $item = StoreGoods::where('id',$first_id)->where('status',1)->where('is_deleted',0)->find(); if(!$item) return 0; /* $cate = GoodsCate::where('id','in',[$item->first_classify,$item->second_classify]) ->where('status',1)->where('is_deleted',0)->count(); if($cate != 2) return 0;*/ break; case 'supplier': $item = SupplierGoods::where('id',$first_id)->where('status',1)->where('is_deleted',0)->find(); if(!$item) return 0; /* $parent = Supplier::where('id',$item->supplier_id)->where('status',1)->where('is_deleted',0)->find(); if(!$parent) return 0; $cate = SupplierCate::where('id','in',[$parent->first_classify,$parent->second_classify,$parent->third_classify]) ->where('status',1)->where('is_deleted',0)->count(); if($cate != 3) return 0;*/ break; case 'demand': $item = PlatformDemand::where('id',$first_id)->where('status',1)->where('is_deleted',0)->find(); if(!$item) return 0; break ; case 'activity': //$item = \app\common\model\ActivityApply::where('id',$first_id)->where('status',1)->where('is_deleted',0)->find(); $item1 = \app\common\model\Activity::where('id',$first_id)->where('status',1)->where('is_deleted',0)->find(); if(!$item1) return 0; break; case 'activityapply': $item = \app\common\model\ActivityApply::where('id',$first_id)->where('status',1)->where('is_deleted',0)->find(); $item1 = \app\common\model\Activity::where('id',$item['act_id'])->where('status',1)->where('is_deleted',0)->find(); if(!$item1) return 0; break; case 'apply': $item = \app\common\model\ActivityApplyItem::where('id',$first_id)->where('status',1)->where('is_deleted',0)->find(); if(!$item) return 0; break; } return $check_val; } // 检查各个模块是否能跳转 public static function checkItemPower($first_id,$second_id,$module) { } }