wupengfei 2 年之前
父節點
當前提交
fa13ecd997
共有 2 個文件被更改,包括 6 次插入6 次删除
  1. 2 2
      .idea/workspace.xml
  2. 4 4
      application/api/controller/Video.php

+ 2 - 2
.idea/workspace.xml

@@ -3,7 +3,7 @@
   <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/nutrition/view/video_comment/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/view/video_comment/index.html" 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" />
@@ -230,7 +230,7 @@
       <workItem from="1675904734949" duration="20832000" />
       <workItem from="1675990026788" duration="13260000" />
       <workItem from="1676077132290" duration="20234000" />
-      <workItem from="1676250114476" duration="4382000" />
+      <workItem from="1676250114476" duration="4780000" />
     </task>
     <servers />
   </component>

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

@@ -638,7 +638,7 @@ class Video extends Base
      */
     public function delUserVideo()
     {
-        UserVideo::where(['user_id'=>$this->user_id,'id'=>input('post.id')])->delete();
+        UserVideo::where(['user_id'=>$this->user_id,'id'=>input('post.id')])->update(['is_deleted'=>1]);
         $this->success('删除成功');
     }
 
@@ -786,16 +786,16 @@ class Video extends Base
     }
 
     /**
-     * @title 删除评论
+     * @title 删除评论&&批量删除
      * @desc 删除评论
      * @author qc
      * @method POST
      * @url /api/Video/delComment
      * @header name:Authorization require:1 desc:Token
-     * @param name:id type:int default:1 desc:评论id
+     * @param name:id type:int default:1 desc:评论id【多个用逗号隔开=>'1,2'】
      */
     public function delComment(){
-        VideoComment::where(['id'=>input('post.id'),'user_id'=>$this->user_id])->update(['is_deleted'=>1]);
+        VideoComment::where(['user_id'=>$this->user_id])->where('id','in',input('post.id'))->update(['is_deleted'=>2]);
         $this->success('删除成功');
     }