diff --git a/view/peko/activity/act-ocean/js/index.js b/view/peko/activity/act-ocean/js/index.js index b4e3f20..d80ffae 100644 --- a/view/peko/activity/act-ocean/js/index.js +++ b/view/peko/activity/act-ocean/js/index.js @@ -641,7 +641,7 @@ const sendUserDrawInfo = (itemId, num) => { // 榜單類型,1是鉆石榜,2是歐皇榜 let type = 1 -let pageSize = 10 +let pageSize = 20 // 鉆石榜單 let pageD = 1 @@ -1039,57 +1039,57 @@ $(function () { e.stopPropagation() }) // 監聽滾動 - $('.other-rank').on('scroll', function () { - let scrollTop = $(this).scrollTop();//這是已經卷進去滾動條的的高度 - let scrollHeight = $('.other-rank')[0].scrollHeight;//這個是other-rank包含滾動條的總高度 - let ulHeight = $(this).innerHeight();//這個是other-rank的高度 + // $('.other-rank').on('scroll', function () { + // let scrollTop = $(this).scrollTop();//這是已經卷進去滾動條的的高度 + // let scrollHeight = $('.other-rank')[0].scrollHeight;//這個是other-rank包含滾動條的總高度 + // let ulHeight = $(this).innerHeight();//這個是other-rank的高度 - //這樣距離到底還有一段距離就請求,但是會導致重復請求,所以要加鎖限製 - if (scrollTop + ulHeight + 100 >= scrollHeight) { - if (type === 1) { - if (isLockD) { - isLockD = false - pageD++ - if (pageSize * pageD > 30) { - toastMsg('沒有更多數據啦~') - } else { - if (canRequsetNextPageD) { - getListRank(type, pageD); - } else { - toastMsg('沒有更多數據啦~') - } - } - } else { - if (scrollTop + ulHeight >= scrollHeight) { - if (pageSize * pageD > 30) { - toastMsg('沒有更多數據啦~') - } - } - } + // //這樣距離到底還有一段距離就請求,但是會導致重復請求,所以要加鎖限製 + // if (scrollTop + ulHeight + 100 >= scrollHeight) { + // if (type === 1) { + // if (isLockD) { + // isLockD = false + // pageD++ + // if (pageSize * pageD > 30) { + // toastMsg('沒有更多數據啦~') + // } else { + // if (canRequsetNextPageD) { + // getListRank(type, pageD); + // } else { + // toastMsg('沒有更多數據啦~') + // } + // } + // } else { + // if (scrollTop + ulHeight >= scrollHeight) { + // if (pageSize * pageD > 30) { + // toastMsg('沒有更多數據啦~') + // } + // } + // } - } else { - if (isLockN) { - isLockN = false - pageN++ - if (pageSize * pageN > 30) { - toastMsg('沒有更多數據啦~') - } else { - if (canRequsetNextPageN) { - getListRank(type, pageN); - } else { - toastMsg('沒有更多數據啦') - } - } - } else { - if (scrollTop + ulHeight >= scrollHeight) { - if (pageSize * pageN > 30) { - toastMsg('沒有更多數據啦~') - } - } - } - } - } - }) + // } else { + // if (isLockN) { + // isLockN = false + // pageN++ + // if (pageSize * pageN > 30) { + // toastMsg('沒有更多數據啦~') + // } else { + // if (canRequsetNextPageN) { + // getListRank(type, pageN); + // } else { + // toastMsg('沒有更多數據啦') + // } + // } + // } else { + // if (scrollTop + ulHeight >= scrollHeight) { + // if (pageSize * pageN > 30) { + // toastMsg('沒有更多數據啦~') + // } + // } + // } + // } + // } + // }) // 播放3s動畫 // let player1 = new SVGA.Player('.draw-time');