wupengfei před 1 rokem
rodič
revize
de08be0b32

+ 4 - 2
.idea/workspace.xml

@@ -3,7 +3,9 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/api/controller/Activity.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Activity.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Article.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Article.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Datum.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Datum.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Video.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Video.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -402,7 +404,7 @@
       <workItem from="1692320300408" duration="11625000" />
       <workItem from="1692579530643" duration="3954000" />
       <workItem from="1692665781192" duration="20574000" />
-      <workItem from="1692752372482" duration="7814000" />
+      <workItem from="1692752372482" duration="7998000" />
     </task>
     <servers />
   </component>

+ 2 - 1
application/api/controller/Article.php

@@ -1602,7 +1602,7 @@ class Article extends Base
         $sel_where[] = ['p.switch_value','=',1];
         $title = input('title');
         if($title)  $sel_where[] = ['a.title','like','%'.$title.'%'];
-        $field = 'p.id,p.switch_id as article_id,p.create_at,a.title,a.total_sequel,a.cover';
+        $field = 'p.id,p.switch_id as article_id,p.create_at,a.title,a.total_sequel,a.cover,a.status ,a.is_deleted';
         $list  = PlatformSwitch::field($field)
             ->alias('p')
             ->leftJoin('ArticleIntro a','p.switch_id = a.id')
@@ -1611,6 +1611,7 @@ class Article extends Base
             ->order('p.id desc')
             ->select()->toArray();
         array_walk($list,function (&$v){
+            $v['is_normal'] = $v['status'] == 1 && $v['is_deleted'] == 0 ? 1 : 0;
             $recently_id = UserTrack::getRecentlyTrack($this->user_id,3,$v['article_id']);
             $v['is_recently'] = $recently_id ? 1 : 0;
             $v['recently_id'] = $recently_id ? $recently_id : 0;

+ 2 - 1
application/api/controller/Datum.php

@@ -865,12 +865,13 @@ class Datum extends Base
         $sel_where[] = ['p.switch_value','=',1];
         $title = input('title');
         if($title)  $sel_where[] = ['a.title','like','%'.$title.'%'];
-        $field = 'p.id,p.switch_id as datum_id,p.create_at,a.title,a.is_deleted,total_sequel';
+        $field = 'p.id,p.switch_id as datum_id,p.create_at,a.title,a.is_deleted,total_sequel,a.status ,a.is_deleted';
         $list  = PlatformSwitch::field($field)
             ->alias('p')->leftJoin('DatumIntro a','p.switch_id = a.id')
             ->where($sel_where)->limit($this->off_set,$this->page_num)
             ->order('p.id desc')->select()->toArray();
         array_walk($list,function (&$v){
+            $v['is_normal'] = $v['status'] == 1 && $v['is_deleted'] == 0 ? 1 : 0;
             $recently_id = UserTrack::getRecentlyTrack($this->user_id,2,$v['datum_id']);
             $v['is_recently'] = $recently_id ? 1 : 0;
             $v['recently_id'] = $recently_id ? $recently_id : 0;

+ 2 - 2
application/api/controller/Video.php

@@ -1679,7 +1679,7 @@ class Video extends Base
         $sel_where[] = ['p.switch_value','=',1];
         $title = input('title');
         if($title)  $sel_where[] = ['a.title','like','%'.$title.'%'];
-        $field = 'p.id,p.switch_id as video_id,p.create_at,a.title,a.total_sequel,a.is_vip,a.cover,a.is_over';
+        $field = 'p.id,p.switch_id as video_id,p.create_at,a.title,a.total_sequel,a.is_vip,a.cover,a.is_over,a.status ,a.is_deleted';
         $list  = PlatformSwitch::field($field)
             ->alias('p')
             ->leftJoin('VideoIntro a','p.switch_id = a.id')
@@ -1688,7 +1688,7 @@ class Video extends Base
             ->order('p.id desc')
             ->select()->toArray();
         array_walk($list,function (&$v){
-          //  $v['is_normal'] = CheckPower::checkModulesPower($v['video_id'],$v['url_id'],$this->request->controller());
+            $v['is_normal'] = $v['status'] == 1 && $v['is_deleted'] == 0 ? 1 : 0;
             $v['recently_title'] = UserTrack::getRecentlyTitle($this->user_id,1,$v['video_id']);
             $recently_id = UserTrack::getRecentlyTrack($this->user_id,1,$v['video_id']);
             $v['recently_id'] = $recently_id ? $recently_id: 0;