wupengfei 2 years ago
parent
commit
684ea58008

+ 3 - 1
.idea/workspace.xml

@@ -3,6 +3,8 @@
   <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/Demand.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Demand.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
@@ -172,7 +174,7 @@
       <workItem from="1666227349089" duration="7795000" />
       <workItem from="1666313182769" duration="19043000" />
       <workItem from="1668041658444" duration="593000" />
-      <workItem from="1668042326649" duration="3424000" />
+      <workItem from="1668042326649" duration="3779000" />
     </task>
     <servers />
   </component>

+ 7 - 1
application/api/controller/Activity.php

@@ -18,7 +18,13 @@ class Activity extends Base
 {
 
     // 需要登录的
-    protected $need_login = ['activityTags','activityCollect','activityTransmit','activityApply','payApplyOrder'];
+    protected $need_login = [
+        'activityTags',
+        'activityCollect',
+        'activityTransmit',
+        'activityApply',
+        'payApplyOrder',
+    ];
     public function initialize()
     {
         parent::initialize();

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

@@ -1036,22 +1036,34 @@ class Article extends Base
      * @return name:create_at type:string default:-- desc:时间
      * @return name:read_num type:int default:-- desc:阅读量
      * @return name:images_arr type:array default:-- desc:图片
+     * @return name:app_name type:string default:-- desc:发布方名称
+     * @return name:app_logo type:string default:-- desc:发布方头像
      */
     public function getTagsArticle()
     {
+        $app_name = sysconf('app_name');
+        $app_logo = sysconf('app_logo');
         $sel_where  = [];
         $title = input('get.title');
         if($title)  $sel_where[]  = ['i.title|i.label','like','%'.$title.'%'];
         $sel_where[]  = ['t.user_id','=',$this->user_id];
         $list = ArticleLike::where($sel_where)
             ->alias('t')
-            ->field('t.id,t.create_at,t.article_id,t.item_id,i.title,i.cover,i.is_vip,images,i.read_num')
+            ->field('t.id,t.create_at,t.article_id,t.item_id,i.title,i.cover,i.is_vip,images,i.read_num,i.user_id')
             ->leftJoin('ArticleItem i','t.item_id = i.id')
             ->order('id desc')
             ->limit($this->off_set,$this->page_num)
             ->select()->toArray();
         foreach ($list as &$v) {
             $v['images_arr'] = $v['images'] ? explode('|',$v['images']):null;
+            if(!$v['user_id']){
+                $v['app_name']  = $app_name;
+                $v['app_logo']  = $app_logo;
+            }else{
+                $user_info = User::where('id',$v['user_id'])->field('name,headimg')->find();
+                $v['app_name']  = $user_info ? $user_info->name : '';
+                $v['app_logo']  = $user_info ? $user_info->headimg : '';
+            }
         }
 
         $this->success('ok',['list'=>$list]);

+ 7 - 0
application/api/controller/Demand.php

@@ -24,11 +24,18 @@ class Demand extends Base
     protected $need_login = [
         'demandComment',
         'demandSecondComment',
+        'demandTags',
         'commentTags',
+        'demandCollect',
         'commitDemand',
         'getMyDemandList',
         'getMyDemandDetail',
         'delMyDemand',
+        'getTagsDemand',
+        'getDemandTrack',
+        'getCollectDemand',
+        'getMyDemandComment',
+        'commentMyDemand',
     ];
     public function initialize()
     {