//methods中添加方法
onPullDownRefresh() {
console.log('refresh');
this.timer = setTimeout(() => {
uni.stopPullDownRefresh()
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
},
//pages.json
{
"path": "pages/tabbar/cart/index",
"style": {
"navigationBarTitleText": "购物车",
"enablePullDownRefresh": true
}
},