gpt4 book ai didi

ionic-framework - Ionic 3 中无与伦比的深层链接

转载 作者:行者123 更新时间:2023-12-03 17:37:47 25 4
gpt4 key购买 nike

我的应用流程是这样的:

  • 启动应用
  • Spotify 的“允许应用程序访问”页面在浏览器 (Chrome) 中打开,
  • 用户授予应用程序权限并重定向到 https://appurl.com/spotify-callback/ ,
  • 该 URL 是深层链接的,因此我的应用程序现在再次打开,
  • 深层链接插件现在应该匹配 /spotify-callback/并打开名为 SpotifyCallbackPage 的页面应该被打开但我收到错误 console.error: Got a deeplink that didn't match

  • 我的深层链接代码如下所示:

    deeplinks.route({
    '/spotify-callback/': SpotifyCallbackPage
    }).subscribe((match) => {
    // match.$route - the route we matched, which is the matched entry from the arguments to route()
    // match.$args - the args passed in the link
    // match.$link - the full link data
    console.log('Successfully matched route', match);
    }, (nomatch) => {
    // nomatch.$link - the full link data
    console.error('Got a deeplink that didn\'t match');
    console.log(nomatch);
    });

    发送到路由器的 URL 是:
    https://appurl.com/spotify-callback/#access_token=random-access-token-here&token_type=Bearer&expires_in=3600

    完整的错误信息是:
    error opening ws message: {"category":"console","type":"log","data":["On deep 
    link",{"url":"https://appurl.com/spotify-callback/#access_token=random-access-token-here&token_type=Bearer&expires_in=3600","path":"/spotify-callback/","scheme":"https","host":"appurl.com","fragment":"access_token=random-access-token-here&token_type=Bearer&expires_in=3600","extra":{"org.chromium.chrome.browser.eenp":["io.ionic.starter"],"org.chromium.chrome.browser.referrer_id":21,"com.android.browser.application_id":"com.android.chrome"}}]}
    [16:28:02] console.error: Got a deeplink that didn't match

    我在路由器中尝试了不同的 URL 和端点,但没有一个匹配。有人知道我应该尝试匹配什么吗?

    最佳答案

    我不确定您是否已经找到解决此问题的方法。也许您可以尝试更改 route url (spotify-callback) 类似于:
    spotify-callback + window.location.hash

    关于ionic-framework - Ionic 3 中无与伦比的深层链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44246416/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com