chuweiqiang 11 月之前
父节点
当前提交
8f4a1e10db
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 1 2
      .idea/workspace.xml
  2. 4 2
      application/api/controller/Datum.php

+ 1 - 2
.idea/workspace.xml

@@ -4,7 +4,6 @@
     <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/Datum.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Datum.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/runtime/log/single.log" beforeDir="false" afterPath="$PROJECT_DIR$/runtime/log/single.log" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -600,7 +599,7 @@
       <workItem from="1714109915098" duration="14739000" />
       <workItem from="1714177835625" duration="26205000" />
       <workItem from="1714351055428" duration="25649000" />
-      <workItem from="1714436787305" duration="22487000" />
+      <workItem from="1714436787305" duration="22662000" />
     </task>
     <servers />
   </component>

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

@@ -374,7 +374,9 @@ class Datum extends Base
         $url_id = input('get.url_id');
         $detail = DatumUrl::where('id',$url_id)->find()->toArray();
         $is_release = UserLearn::checkRelease($this->user_id,2,$detail['datum_id']);
-        if($detail['is_deleted'] == 1 || $detail['status'] == 0 || $is_release == 0) $this->error('该资料已下架');
+        if($is_release == 0){
+            if($detail['is_deleted'] == 1 || $detail['status'] == 0) $this->error('该资料已下架');
+        }
         $detail['series_title'] =DatumIntro::where('id',$detail['datum_id'])->value('title');
         $detail['follow_switch'] = PlatformSwitch::checkSwitch($this->user_id,$detail['datum_id'],4);
         $detail['collect_num']  = UserCollect::where(['coll_type'=>2,'coll_id'=>$detail['datum_id'],'children_id'=>$detail['id']])->count();
@@ -567,7 +569,7 @@ class Datum extends Base
             $res= UserDatum::create($data) ;
         }
 
-       // UserMessage::sendUserMessage($this->user_id,'datum',1,0,0,$id ? $id:$res->id);
+        // UserMessage::sendUserMessage($this->user_id,'datum',1,0,0,$id ? $id:$res->id);
         $this->success('提交成功,请等待审核',['id'=> $id ? :$res->id]);
     }