|
@ -94,6 +94,7 @@ |
|
|
arr: [], |
|
|
arr: [], |
|
|
scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度 |
|
|
scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度 |
|
|
timer: null, // 定时器 |
|
|
timer: null, // 定时器 |
|
|
|
|
|
timerHome: null, // 定时器 |
|
|
forcedLogin: false, |
|
|
forcedLogin: false, |
|
|
count: 1, |
|
|
count: 1, |
|
|
position: [-10, -10], |
|
|
position: [-10, -10], |
|
@ -315,14 +316,14 @@ |
|
|
if (this.arr.length == 0) { |
|
|
if (this.arr.length == 0) { |
|
|
await this.getMenuItemTop(); |
|
|
await this.getMenuItemTop(); |
|
|
} |
|
|
} |
|
|
if (this.timer) return; |
|
|
if (this.timerHome) return; |
|
|
if (!this.menuHeight) { |
|
|
if (!this.menuHeight) { |
|
|
await this.getElRect('menu-scroll-view', 'menuHeight'); |
|
|
await this.getElRect('menu-scroll-view', 'menuHeight'); |
|
|
} |
|
|
} |
|
|
setTimeout(() => { // 节流 |
|
|
setTimeout(() => { // 节流 |
|
|
this.timer = null; |
|
|
this.timerHome = null; |
|
|
// scrollHeight为右边菜单垂直中点位置 |
|
|
// scrollHeight为右边菜单垂直中点位置 |
|
|
let scrollHeight = e.detail.scrollTop + this.menuHeight / 2; |
|
|
let scrollHeight = e.detail.scrollTop + this.menuHeight / 5; |
|
|
for (let i = 0; i < this.arr.length; i++) { |
|
|
for (let i = 0; i < this.arr.length; i++) { |
|
|
let height1 = this.arr[i]; |
|
|
let height1 = this.arr[i]; |
|
|
let height2 = this.arr[i + 1]; |
|
|
let height2 = this.arr[i + 1]; |
|
|