Skip to main content

云信消息通知同步

nimNotifyMsg

APP初始化时请求自定义通知配置

{
nimCustomNotifyConfig {
accid
url
}
}

返回结果

{
"data": {
"nimCustomNotifyConfig": [
{
"accid": "order_notification",
"url": "https://render-dev.for1688.cn/nim/notify?accid=order_notification"
},
{
"accid": "system_notification",
"url": "https://render-dev.for1688.cn/nim/notify?accid=system_notification"
}
]
}
}
tip
  1. 当会话列表中匹配到配置中的账号时,需要使用离线 webview 打开配置中相应的页面
tip
  1. 当匹配到当前 webview 页面打开配置中的页面,并且收到配置中 accid 的消息是向对应 url 的 webview 页面执行以下方法:

示例代码

window.postMessage({
type: 'onNimCustomNotify',
data: {
msg: {} //接收到的云信 msg 对象
}
},
window.location.origin
)