收藏
回答

下拉二楼报错(errMsg: "navigateTo:fail timeout")?

下拉二楼第一次下拉正常进入下一页,返回后第二次下拉就报错(errMsg: "navigateTo:fail timeout")

<scroll-view
   id="scrollview"
   type="custom"
   scroll-y
   scroll-with-animation
   show-scrollbar="{{false}}"
   refresher-enabled="{{true}}"
   refresher-threshold="{{80}}"
   refresher-default-style="none"
   refresher-triggered="{{triggered}}"
   refresher-two-level-pinned="{{true}}"
   refresher-two-level-enabled
   refresher-two-level-threshold="{{150}}"
   refresher-two-level-triggered="{{twoLevelTriggered}}"
   bind:refresherpulling="onPulling"
   bind:refresherrefresh="onRefresh"
   bind:refresherrestore="onRestore"
   bind:refresherabort="onAbort"
   bind:refresherstatuschange="onStatusChange"
   worklet:onstartstart="handleScrollStart"
   worklet:onscrollupdate="handleScrollUpdate"
   worklet:onscrollend="handleScrollEnd"></scroll-view>


onStatusChange(e) {
      const { status } = e.detail;
      const refreshStatus = this.buildText(this.getStatusName(status));
      this.setData({ refreshStatus });

      if (status === 7) {
         this.navigateToPrivacy();
      }
   },

   navigateToPrivacy() {
      wx.navigateTo({
         url: "../privacy/privacy",
         events: {
            nextPageRouteDone: this.handleRouteDone.bind(this),
         },
         fail: (err) => {
            console.error("navigateTo failed", err);
         },
      });
   },

   handleRouteDone(data) {
      if (this.scrollContext) {
         this.scrollContext.closeTwoLevel({ duration: 1 });
      }
   },

最后一次编辑于  1天前
回答关注问题邀请回答
收藏

1 个回答

  • 社区技术运营专员-Jahozheng
    社区技术运营专员-Jahozheng
    12小时前

    请按照链接提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

    12小时前
    有用
    回复
登录 后发表内容