wupengfei 2 سال پیش
والد
کامیت
a2821f2d80

+ 5 - 2
.idea/workspace.xml

@@ -3,7 +3,10 @@
   <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/user/view/user_feedback/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/user/view/user_feedback/index.html" 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/FeedBack.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/FeedBack.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" />
@@ -221,7 +224,7 @@
       <workItem from="1665189429149" duration="5358000" />
       <workItem from="1665206979508" duration="7749000" />
       <workItem from="1665276346161" duration="19728000" />
-      <workItem from="1665362529961" duration="11019000" />
+      <workItem from="1665362529961" duration="12000000" />
     </task>
     <servers />
   </component>

+ 8 - 6
application/api/controller/Article.php

@@ -34,17 +34,19 @@ class Article extends Base
         'getUserArticleDetail',
         'delUserArticle',
         'delComment',
+        'getLearnHistory',
+        'getArticleCollect',
+        'getCommentArticle',
+        'getPurchaseArticle',
+        'getPurchaseArticle',
+        'getReplyArticle',
+        'getReplyComment',
+        'getTagsArticle',
     ];
     public function initialize()
     {
         parent::initialize();
         parent::setUid();
-        foreach ($this->need_login as $c) {
-            if($this->request->action() == strtolower($c)) {
-              //  parent::checkLogin();
-            }
-        }
-
     }
 
     /**

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

@@ -28,7 +28,11 @@ class Datum extends Base
         'userReferDatum',
         'getMyDatumList',
         'getUserDatumDetail',
-        'delUserDatum'];
+        'delUserDatum',
+        'getDownloadDatum',
+        'getLearnHistory',
+        'getDatumCollect',
+    ];
     public function initialize()
     {
         parent::initialize();

+ 47 - 1
application/api/controller/FeedBack.php

@@ -35,11 +35,57 @@ class FeedBack extends Base
             'desc'=>input('desc'),
             'create_at'=>date('Y-m-d H:i:s')
         ];
-        $res =  UserFeedBack::create($insert_data);
+        $res =  UserFeedback::create($insert_data);
         $this->success('反馈成功',$res->id);
     }
 
+    /**
+     * @title 用户反馈列表
+     * @desc  用户反馈列表
+     * @author  qc
+     * @url /api/FeedBack/getFeedbackList
+     * @method GET
+     * @header name:Authorization require:1 desc:Token
+     * @param name:page type:int default:0 desc:页数
+     * @param name:page_num type:int default:20 desc:每页数
+     * @return name:content type:string default:-- desc:反馈内容
+     * @return name:desc type:string default:-- desc:反馈说明
+     * @return name:status type:int default:-- desc:处理进度【0待处理,1处理中,2已完成】
+     * @return name:create_at type:string default:-- desc:反馈时间
+     * @return name:dispose_time type:string default:-- desc:开始处理时间
+     * @return name:over_time type:string default:-- desc:处理完成时间
+     * @return name:reply type:string default:-- desc:后台回复
+     */
+    public function getFeedbackList()
+    {
+        $list  = UserFeedback::where(['user_id'=>$this->user_id])
+            ->limit($this->off_set,$this->page_num)
+            ->select()->toArray();
+        $this->success('ok',['list'=>$list]);
+    }
 
+    /**
+     * @title 用户反馈详情
+     * @desc  用户反馈详情
+     * @author  qc
+     * @url /api/FeedBack/getFeedbackInfo
+     * @method GET
+     * @header name:Authorization require:1 desc:Token
+     * @param name:id type:int default:0 desc:反馈记录id
+     * @return name:content type:string default:-- desc:反馈内容
+     * @return name:desc type:string default:-- desc:反馈说明
+     * @return name:status type:int default:-- desc:处理进度【0待处理,1处理中,2已完成】
+     * @return name:create_at type:string default:-- desc:反馈时间
+     * @return name:dispose_time type:string default:-- desc:开始处理时间
+     * @return name:over_time type:string default:-- desc:处理完成时间
+     * @return name:reply type:string default:-- desc:后台回复
+     */
+    public function getFeedbackInfo()
+    {
+        $id = input('get.id');
+        $detail  = UserFeedback::where(['user_id'=>$this->user_id,'id'=>$id])->find()->toArray();
+        $this->success('ok',['detail'=>$detail]);
+    }
 
 
 

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

@@ -22,8 +22,24 @@ use library\tools\Data;
  */
 class Video extends Base
 {
-
-    protected $need_login = ['userReferVideo','userReferVideoDetail','delUserVideo','videoComment','secondCommend','videoTags','videoTransmit','getMyVideoList','delComment'];// 需要登录的
+ // 需要登录的
+    protected $need_login = [
+        'userReferVideo',
+        'userReferVideoDetail',
+        'delUserVideo',
+        'videoComment',
+        'secondCommend',
+        'videoTags',
+        'videoTransmit',
+        'getMyVideoList',
+        'delComment',
+        'getLearnHistory',
+        'getReplayComment',
+        'getReplyVideo',
+        'getPurchaseVideo',
+        'getVideoCollect',
+        'getTagsVideo',
+    ];
 
     public function initialize()
     {