重定向到 ember.js 控制器中的外部 url

redirect to external url in ember.js controller

我有这段代码,我想重定向到控制器文件中的其他 url。 它在网络浏览器中运行良好,但在 android、iphone 设备上无法运行。 我正在 browserstack 上测试它们。

return unchartedAjax({
            url: "/api/v1/detect",
            type: 'PUT',
            dataType: 'json'                
          })
          .then(() => {
            const device = this.deviceDetect();
            if (device === 'iOS') {
              window.location.href='https://itunes.apple.com/us/app/app-id.com';
              return;
            }
            else if (device === 'Android') {
              window.location.href='http://play.google.com/store/apps/details?id=url';
              return;
            }

            this.send('reset');
            this.transitionToRoute('drivers.download');
            return;

          })
          .catch((result) => {
            const device = this.deviceDetect();
             if (device === 'iOS') {
              window.location.href='https://itunes.apple.com/us/app/url.com';
              return;
             }
             else if (device === 'Android') {
               window.location.href='http://play.google.com/store/apps/details?id=appId';
               return;
             }

              this.send('reset');
              this.transitionToRoute('drivers.download');
              return;



          })
          .finally(() => {
            this.set('loading', false);
          });

是缓存问题,清除缓存后一切正常