2 次代码提交 ca0f75c794 ... 0e49264d36

作者 SHA1 备注 提交日期
  xiaogang 0e49264d36 tencent_im_user_id update 3 年之前
  xiaogang 460ac49d1f tencent_im_user_id update 3 年之前
共有 2 个文件被更改,包括 7 次插入1 次删除
  1. 4 0
      app/Services/DynamicService.php
  2. 3 1
      app/Services/HomeService.php

+ 4 - 0
app/Services/DynamicService.php

xqd
@@ -250,6 +250,10 @@ class DynamicService
             $dynamic['data'][$k]['img_url'] = json_decode($v['img_url'],true);
 
 
+            if(!$v['user']['tencent_im_user_id']){
+                $dynamic['data'][$k]['user']['tencent_im_user_id'] = "";
+            }
+
             //计算距离 如果设置了位置,使用设置位置  否则使用定位位置
             if(!$v['latitude']||!$v['longitude']){
                 //没有设置位置  取用户位置

+ 3 - 1
app/Services/HomeService.php

xqd xqd
@@ -105,7 +105,6 @@ class HomeService
             }
         }
 
-
         return $query;
     }
 
@@ -206,6 +205,9 @@ class HomeService
                 array_unshift($photo,$video_arr);
             }
         }
+        if(!$userinfo->tencent_im_user_id){
+            $userinfo->tencent_im_user_id = "";
+        }
 
         $userinfo->photo = $photo;
         $userinfo->video = array_column($video_info,'url');