【问题标题】:Redirection not working when starting the app启动应用程序时重定向不起作用
【发布时间】:2018-07-14 04:50:27
【问题描述】:

如果应用程序启动时已登录,我正在尝试重定向页面。

if (!iSLoggedIn()) {
mainView.router.loadPage({ url: 'index.html', ignoreCache: true, reload: false });}else {
$('#txtUserName').html(localStorage.getItem("fullname"));
    mainView.router.loadPage({ url: 'dashboard.html', ignoreCache: true, reload: true });}

问题是,当我启动应用程序时,我正在重定向页面,但它的行为不正常。重定向后没有事件或函数未触发。但是当我再次从其他页面返回时它可以工作。尝试了很多方法,但没有奏效。 我正在使用framework7。

【问题讨论】:

    标签: jquery html cordova phonegap html-framework-7


    【解决方案1】:

    据我所知,页面代码加载速度并不快。所以我使用了超时一秒钟。现在它工作正常

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-04-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-09
      • 1970-01-01
      相关资源
      最近更新 更多