已经发布二年一直都在使用的小程序,只能显示第一段,后续的段落都不能显示,也没有任何提示的错误,分页显示的功能出错了,没有任何提示。应该就是小程序系统出错了,请检查一下。发现问题的手机是IPHONE12PROMAX,IOS版本26.3,相关的程序如下:
observeAll() {
if (no_observer)
return
let that = this
this._observer = wx.createIntersectionObserver(this, {
observeAll: true,
thresholds: [0, 0.5, 1],
initialRatio: 0,
selectAll: true,
nativeMode: true // 添加此配置项
}).relativeTo('.scroll-view').observe('.ball , .b1all', (res) => {
console.log('26-0 res', res);
console.log('26-1 firstToView,',firstToView);
console.log('26-2',)
console.log('27',res.dataset.row);
if (firstToView) { //第一次进来,显示首个页面 不用滚动,直接退出
firstToView = false
return
}
let row = res.dataset.row
console.log('28', row, rowStart, rowBottom, wordsSentece.length - 1)
if (res.intersectionRatio > 0) {
switch (row) {
case 0: //首行出现,往前挪
moveDown()
break;
case (viewLines - 1):
moveUp()
break;
default:
break
}
}
function moveDown() {
let newStart = rowStart - delta
let newBottom = rowBottom - delta
if (rowStart < 10) {
newStart = 0
newBottom = rowBottom - rowStart
}
rowStart = newStart
rowBottom = newBottom
that.data.TheEnd = ''
that.setDataView()
}
function moveUp() {
let newStart = rowStart + delta
let newBottom = rowBottom + delta
if (newBottom >= (wordsSentece.length - 1)) {
newBottom = wordsSentece.length - 1
newStart = rowStart + (wordsSentece.length - 1) - rowBottom
that.data.TheEnd = '--The End--'
} else
that.data.TheEnd = ''
rowStart = newStart
rowBottom = newBottom
that.setDataView()
}
},
setDataView() {
let that = this
let sentnces = []
let viewwordColor = []
for (let i = rowStart; i <= rowBottom; i++) {
sentnces.push(wordsSentece[i])
viewwordColor.push(wordColor[i])
}
this.setData({
sentnces, // 、、正文 sentnces,每行的前面都添加了行的编号
wordColor: viewwordColor, // 生词的颜色
TheEnd: that.data.TheEnd,
})
},

请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。