How to disable the pull-up and pull-down on the Wechat page on mobile?

it is said on the Internet to use $("body"). On (" touchmove", function (event) {event.preventDefault ();}); but it will make the page unable to scroll; is there any other way? -sharp-sharp-sharp problem description

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Jan.08,2022

Mini Program Development? ?


touchmove determine that the page is also located in the top and tail moving direction, and then event.preventDefault ()
an idea that has not been practiced


if Mini Program can configure "enablePullDownRefresh": true, in the json of the file, if it is global, you can modify
if it is Wechat's official account, you can give body a height:100vh;overflow:hidden; on the page. If you set it to height:auto;overflow:scroll


Mini Program. Json plus "disableScroll": true true is forbidden to bounce
if it is a page, see if css has-webkit-overflow-scrolling:true


then add this sentence to the scrolling element of , such as

$(element).on( 'touchmove' , function (e) {
 e.preventDefault();
}); 

it can be done with two lines of css

.
html{height:100vh;overflow:hidden};
body{height:100%;overflow:auto};
Menu