gq 7 years ago
parent
commit
c32799a2dc

+ 1 - 0
server/app/Http/Controllers/Admin/Dream/InfoController.php

xqd
@@ -44,6 +44,7 @@ class InfoController extends Controller
         $setting = BaseSettingsModel::where('category','paihang')->first();
         $a = $setting?$setting->key:1;
         $x = $setting?$setting->sort:10;
+        if($x==0) $x = 10;
         foreach ($list as $item) {
 //            $b = $item->parameter;
             $t = 21*24*60; //梦想发布分钟数

+ 1 - 1
server/app/Http/Controllers/Api/V1/IndexController.php

xqd
@@ -114,7 +114,7 @@ class IndexController extends Controller
         $id_arr1 = array_column($arr1,'id');
         $arr2 =DreamInfoModel::orderBy('score','desc')->offset(15)->limit(120)->select('id')->get()->toArray();
         $id_arr2 = array_column($arr2,'id');
-//        首页显示用户条件 1梦想者新动态 2用户直接评论 3用户回复评论
+//        首页显示用户条件 关注的梦想有新的动态 2动态下有新的评论
         $users_care_dream = UserCareDream::where('user_id',$id)->where('interaction_number','>',0)->get()->toArray();
         $user_ids = array_unique(array_column($users_care_dream,'dream_user_id','dream_id'));
         $users = [] ;

+ 3 - 1
server/app/Http/Controllers/Api/V1/InteractionController.php

xqd xqd
@@ -93,7 +93,7 @@ class InteractionController extends Controller
                     $this->jPush($arr['message'],'',$user_id);
                 }
             }
-//            收藏梦想最新动态加一
+//            收藏梦想最新动态加一
             UserCareDream::where('dream_id',$dream_id)->increment('interaction_number',1);
             $dream_user_id = DreamInfoModel::find($dream_id)->user_id;
             UserCareUser::where('other_user_id',$dream_user_id)->update(['dream_id'=>$dream_id,'dream_number'=>'1']);
@@ -209,6 +209,8 @@ class InteractionController extends Controller
 
 
         if ($ok) {
+//            评论动态也会出现在首页用户
+            UserCareDream::where('dream_id',$dream_id)->increment('interaction_number',1);
             return $this->api('');
         }else{
             return $this->error(ErrorCode::OPERATION_FAILED);