wupengfei 2 年之前
父节点
当前提交
2e4d677bb8

+ 6 - 4
.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/Forum.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Forum.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" />
@@ -208,7 +210,7 @@
       <workItem from="1671065604459" duration="7662000" />
       <workItem from="1671152221434" duration="19086000" />
       <workItem from="1672793409629" duration="408000" />
-      <workItem from="1672793834653" duration="11129000" />
+      <workItem from="1672793834653" duration="12277000" />
     </task>
     <servers />
   </component>
@@ -330,10 +332,10 @@
     </option>
   </component>
   <component name="WindowStateProjectService">
-    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1670816215887">
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1672811950139">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
-    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1670816215887" />
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1672811950139" />
     <state x="283" y="145" width="1942" height="1088" key="DiffContextDialog" timestamp="1672805700798">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>

+ 38 - 0
application/api/controller/Article.php

@@ -49,6 +49,7 @@ class Article extends Base
         'getReplyArticle',
         'getReplyComment',
         'getTagsArticle',
+        'getBoundList',
     ];
     public function initialize()
     {
@@ -1195,5 +1196,42 @@ class Article extends Base
 
 
 
+    /**
+     * @title 我的绑定【后台图文绑定该会员】
+     * @desc 后台图文绑定该会员
+     * @author qc
+     * @method GET
+     * @url /api/Article/getBoundList
+     * @header name:Authorization require:1 desc:Token
+     * @param  name:title type:string default:-- desc:标题
+     * @param  name:page type:int default:0 desc:页数
+     * @param  name:page_num type:int default:20 desc:每页数
+     * @return name:id type:string default:-- desc:记录id【item_id】
+     * @return name:title type:string default:-- desc:标题
+     * @return name:article_id type:string default:-- desc:图文id
+     * @return name:cover type:string default:-- desc:封面
+     * @return name:create_at type:string default:-- desc:时间
+     * @return name:is_vip type:int default:-- desc:是否是vip[0否1是]
+     * @return name:is_normal type:int default:-- desc:是否是正常记录(0已删除或是已禁用1可以正常跳转详情)
+     */
+    public function getBoundList()
+    {
+        $sel_where  = [];
+        $title = input('get.title');
+        $sel_where[] = ['user_id','=',$this->user_id];
+        $sel_where[] = ['is_deleted','=',0];
+        if($title)  $sel_where[]  = ['title|label','like','%'.$title.'%'];
+        $list = ArticleItem::where($sel_where)
+            ->alias('t')
+            ->field('id,title,cover,read_num,label,is_vip,article_id')
+            ->order('id desc')
+            ->limit($this->off_set,$this->page_num)
+            ->select()->toArray();
+        foreach ($list as &$v) {
+            $v['is_normal'] = CheckPower::checkModulesPower($v['article_id'],$v['id'],$this->request->controller());;
+        }
+        $this->success('ok',['list'=>$list]);
+    }
+
 
 }

+ 41 - 0
application/api/controller/Datum.php

@@ -1,5 +1,6 @@
 <?php
 namespace app\api\controller;
+use app\common\model\ArticleItem;
 use app\common\model\DatumCate;
 use app\common\model\DatumIntro;
 use app\common\model\DatumLike;
@@ -37,6 +38,7 @@ class Datum extends Base
         'getDownloadDatum',
         'getLearnHistory',
         'getDatumCollect',
+        'getBoundList',
     ];
     public function initialize()
     {
@@ -624,5 +626,44 @@ class Datum extends Base
     }
 
 
+    /**
+     * @title 我的绑定【后台资料绑定该会员】
+     * @desc 后台资料绑定该会员
+     * @author qc
+     * @method GET
+     * @url /api/Datum/getBoundList
+     * @header name:Authorization require:1 desc:Token
+     * @param  name:title type:string default:-- desc:标题
+     * @param  name:page type:int default:0 desc:页数
+     * @param  name:page_num type:int default:20 desc:每页数
+     * @return name:id type:string default:-- desc:记录id【url_id】
+     * @return name:title type:string default:-- desc:标题
+     * @return name:datum_id type:string default:-- desc:资料id
+     * @return name:create_at type:string default:-- desc:时间
+     * @return name:url type:string default:-- desc:文件路径
+     * @return name:is_vip type:int default:-- desc:是否是vip[0否1是]
+     * @return name:is_normal type:int default:-- desc:是否是正常记录(0已删除或是已禁用1可以正常跳转详情)
+     */
+    public function getBoundList()
+    {
+        $sel_where  = [];
+        $title = input('get.title');
+        $sel_where[] = ['user_id','=',$this->user_id];
+        $sel_where[] = ['is_deleted','=',0];
+        if($title)  $sel_where[]  = ['title|label','like','%'.$title.'%'];
+        $list = DatumUrl::where($sel_where)
+            ->alias('t')
+            ->field('id,title,is_vip,url,datum_id,create_at,label')
+            ->order('id desc')
+            ->limit($this->off_set,$this->page_num)
+            ->select()->toArray();
+        foreach ($list as &$v) {
+            $v['is_normal'] = CheckPower::checkModulesPower($v['datum_id'],$v['id'],$this->request->controller());
+        }
+        $this->success('ok',['list'=>$list]);
+    }
+
+
+
 
 }

+ 40 - 0
application/api/controller/Video.php

@@ -47,6 +47,7 @@ class Video extends Base
         'getVideoCollect',
         'getTagsVideo',
         'getVideoDetail',
+        'getBoundList',
     ];
 
     public function initialize()
@@ -1291,6 +1292,45 @@ class Video extends Base
 
 
 
+    /**
+     * @title 我的绑定【后台视频绑定该会员】
+     * @desc 后台视频绑定该会员
+     * @author qc
+     * @method GET
+     * @url /api/Video/getBoundList
+     * @header name:Authorization require:1 desc:Token
+     * @param  name:title type:string default:-- desc:标题
+     * @param  name:page type:int default:0 desc:页数
+     * @param  name:page_num type:int default:20 desc:每页数
+     * @return name:id type:string default:-- desc:记录id【url_id】
+     * @return name:title type:string default:-- desc:标题
+     * @return name:video_id type:string default:-- desc:视频id
+     * @return name:duration type:int default:-- desc:时长(单位:秒)
+     * @return name:cover type:string default:-- desc:封面
+     * @return name:create_at type:string default:-- desc:时间
+     * @return name:ali_vid type:string default:-- desc:云点播id
+     * @return name:is_vip type:int default:-- desc:是否是vip[0否1是]
+     * @return name:is_normal type:int default:-- desc:是否是正常记录(0已删除或是已禁用1可以正常跳转详情)
+     */
+    public function getBoundList()
+    {
+        $sel_where  = [];
+        $title = input('get.title');
+        $sel_where[] = ['user_id','=',$this->user_id];
+        $sel_where[] = ['is_deleted','=',0];
+        if($title)  $sel_where[]  = ['title|label','like','%'.$title.'%'];
+        $list = VideoUrl::where($sel_where)
+            ->alias('t')
+            ->field('id,title,cover,label,is_vip,ali_vid,video_id,duration,create_at')
+            ->order('id desc')
+            ->limit($this->off_set,$this->page_num)
+            ->select()->toArray();
+        foreach ($list as &$v) {
+            $v['is_normal'] = CheckPower::checkModulesPower($v['video_id'],$v['id'],$this->request->controller());
+        }
+        $this->success('ok',['list'=>$list]);
+    }
+