| xqd
@@ -146,6 +146,15 @@ class DynamicService
|
|
|
$registrationIds = array_column($push_users,'registrationId');
|
|
|
|
|
|
$user_info = UserInfoModel::query()->where('user_id',$user->id)->first();
|
|
|
+
|
|
|
+ //设置推送的图标
|
|
|
+ if(count($dynamicParam->img_url)>0){
|
|
|
+ $image = ($dynamicParam->img_url)[0];
|
|
|
+ }else{
|
|
|
+ $image = $user_info->avatar;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
JPushService::pushNotify([
|
|
|
//标题
|
|
|
'title' => "@".$user_info->nickname."发布了新动态,来打个招呼吧~",
|
| xqd
@@ -153,6 +162,7 @@ class DynamicService
|
|
|
'content' => $dynamicParam->content,
|
|
|
//设备标识,跟设备相关
|
|
|
'reg_id' => $registrationIds,
|
|
|
+ 'image' => $image,
|
|
|
//扩展字段
|
|
|
'extras' => [
|
|
|
'type' => 'notice',
|