1***@qq.com
1***@qq.com
  • 发布:2024-08-15 15:34
  • 更新:2025-02-08 21:58
  • 阅读:566

IOS 利用uniapp的【uni.navigateTo】时报错:【Waiting to navigate to:XXX, do not operate continuously】

分类:uni-app

问题现象:
使用【uni.navigateTo】方法跳转到对用的Webview页面后,Webview页面不进行操作,直接进行返回Uniapp页面的操作后,在重新点击调转Webview页面,会提示【Waiting to navigate to: /pages/xxwebView/xxwebView, do not operate continuously】错误。
重点来了,如果我在Webview页面中打开了一个页面后,再进行返回Uniapp页面的操作后,在重新点击调转Webview页面后就会正常跳转到Webview页面。

2024-08-15 15:34 负责人:无 分享
已邀请:
DCloud_UNI_yuhe

DCloud_UNI_yuhe

你好,这么描述我们可能不是很好复现,您可以把代码逻辑拆解,提供一个可以复现的项目吗?

  • 1***@qq.com (作者)

    谢谢您的回答,问题已经解决了,有可能是IOS的原因吧,直接在onBackPress里面直接调用reLaunch就会发生这个问题,把它当成方法调用后,此问题就解决了。

    onBackPress(options) {

    if (options.from === 'navigateBack') {

    return false;

    }

    this.back();

    return true;

    },

    methods: {

    back() {

    uni.removeStorage({

    key: 'companyCode',

    success: function(res) {

    uni.reLaunch({

    url: '/pages/index/index'

    });

    },

    fail: function(err) {

    console.error('Failed to remove storage:', err);

    uni.reLaunch({

    url: '/pages/index/index'

    });

    }

    }, 3000);

    }

    },

    2024-08-19 09:20

2***@qq.com

2***@qq.com

我是所有uni.navigateTo都报错,都是
Waiting to navigate to: /pages/core/xxxx, do not operate continuously: /pages/core/xxxxx. __ERROR

ero

ero - ero

我的部份机型不可以,低端机型不可,高端的可以,不知道是不是,巧合

用uni.reLaunch也不可以,报一样的错,hbuildx4.45

其它地方的转跳没有问题,只是其中一个地方这样,目前发现

有解吗?

要回复问题请先登录注册