运行js后的重定向

时间:2018-07-09 18:00:55

标签: javascript html push-notification

在执行推送通知的订阅脚本后,如何进行重定向?

<script>
      var OneSignal = window.OneSignal || [];
      OneSignal.push(function() {
        OneSignal.init({
          appId: "*****-*****-*****-*****-*****",
      });
    });
</script>

1 个答案:

答案 0 :(得分:0)

您可以试试吗?

OneSignal.push(["init", {
/* Your other init options here */
welcomeNotification: {
    "title": "My Custom Title",
    "message": "Thanks for subscribing!",
    // "url": "" /* Provide your URL */
}}]);

Source