Appearance
suggestAgreeSubscribeMessage
▸ suggestAgreeSubscribeMessage(options?
): Promise
<null
| string
[]>
调用订阅消息增强版。当有 targetTmplIds 的订阅结果为 reject 时,有重新订阅的弹窗提示,并返回成功订阅部分的 tmplIds 用户在「设置」中关闭「通知管理->接收通知」不抛出错误,此时返回值为 null 该方法最不常用。通常用想要有重新订阅的弹窗提示但并不强制订阅的场景
参数
Name | Type | Default value | Description |
---|---|---|---|
options | Object | {} | |
options.rejectionFallback | undefined | () => Promise <any > | undefined | 当用户拒绝订阅时调用的回退函数,用来覆盖默认的 showRejectionModal |
options.subscriptionType | undefined | SUBSCRIPTION_TYPE | SUBSCRIPTION_TYPE.ONCE | |
options.targetTmplIds | undefined | string [] | tmplIds | |
options.tmplIds | string [] | undefined |
返回值
Promise
<null
| string
[]>
返回用户成功订阅消息的 tmplIds。