我调试了问题并成功解决了问题,有一些
服务器端的密钥放置问题
. 我们在服务器端创建了负载,如下所示:
{
"toâ: âxyzâ,
"mutable_content": true,
"notification":
{
"body": âthis is the message body.â,
"title": âtiltle textâ,
"sound": "default",
"badge": 1,
"click_action": "defaultCategory"
},
"data":
{
"type": "Category",
"typeId": "74",
"redirect_title": "",
"image_url": "\/d\/r\/dress_16.jpg",
"notification_id": "1"
}
}
FCM格式化了此负载,并将其以以下格式发送到移动端:
{
gcm.message_id: â0:1527233474081223%98b85c5198b85c51â,
aps: {
alert:Â {
body: "new product notification message2018-05-24 00:00:00";
title: "Product Notification";
};
  badge: 1;
 category: âdefaultCategoryâ;
   mutable-content: 1;
   sound: âdefaultâ;
},
notification_id: 11,
typeId: âXMH677878912-L-Blueâ,
image_url: â/r/u/rustyredsmall.jpgâ,
type: âProductâ,
redirect_title: âMidi Dress-L-Blueâ
}