let bodyEl = document.bodylet top = 0function stopBodyScroll (isFixed) {if (isFixed) {top = window.scrollYbodyEl.style.position = 'fixed'bodyEl.style.top = -top + 'px'} else {bodyEl.style.position = ''bodyEl.style.top = ''window.scrollTo(0, top) // 回到原先的top}}
