下拉二楼第一次下拉正常进入下一页,返回后第二次下拉就报错(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 });
}
},
请按照链接提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。