Appearance
ensureAgreeSubscribeMessage
▸ ensureAgreeSubscribeMessage(options?): Promise<null | string[]>
调用订阅消息增强版。当有 targetTmplIds 的订阅结果为 reject 时,有重新订阅的弹窗提示,并返回 null 用户在「设置」中关闭「通知管理->接收通知」不抛出错误,此时返回值为 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。