wupengfei 2 سال پیش
والد
کامیت
78b3fbe52d
2فایلهای تغییر یافته به همراه4 افزوده شده و 3 حذف شده
  1. 1 1
      .idea/workspace.xml
  2. 3 2
      application/common/service/CheckPower.php

+ 1 - 1
.idea/workspace.xml

@@ -200,7 +200,7 @@
       <workItem from="1670287594399" duration="11535000" />
       <workItem from="1670461023846" duration="27678000" />
       <workItem from="1670547445908" duration="12147000" />
-      <workItem from="1670633686675" duration="4772000" />
+      <workItem from="1670633686675" duration="4959000" />
     </task>
     <servers />
   </component>

+ 3 - 2
application/common/service/CheckPower.php

@@ -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');