直接上代码: uni.pageScrollTo({ selector: '#top', // 需要返回顶部的元素id或class名称 duration: 300 // 过渡时间(单位为ms) }); 官方文档: