Browse Source

tencent_im_user_id update

xiaogang 3 năm trước cách đây
mục cha
commit
0e49264d36
2 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 4 0
      app/Services/DynamicService.php
  2. 3 0
      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 - 0
app/Services/HomeService.php

xqd
@@ -205,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');