废话不多说直接上源码
wxml
<view class="container container-fill">
<view class="scroll-fullpage" bindtouchstart="scrollTouchstart" bindtouchmove="scrollTouchmove" bindtouchend="scrollTouchend" style="transform:translateY(-{
{scrollindex*100}}%);margin-top: {
{margintop}}px">
<view class="section section01 {
{scrollindex==0?'active':''}}" style="background: #3399FF;">
<text class="section-maintitle">页面1</text>
<text class="section-subtitle">我的页面”1</text>