微信版本:7.0.13,机型:小米手机 红米note8,系统版本miui 11,
wxss
.image{
width: 100%;
height: 100vh;
background-color: rgba(0,0,0,.2);
}
.review{
position: absolute;
left: 60rpx;
right: 0;
top: 10%;
line-height: 60rpx;
text-align: center;
z-index: 900;
}
wxml
<image class="image" mode="scaleToFill" src='../../images/35359631.jpg'></image>
<text class="review">{{currentText}}</text>
json
{
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark"
}
js
onPullDownRefresh () { this.loadMore() wx.stopPullDownRefresh() },
loadMore: function(){ return new Promise((rs, rj)=>{ wx.request({ ..., success(res){ rs(res.data||{}) }, fail(e){ rj(e||{}) } }) }) }, onPullDownRefresh () { var t = this this.loadMore().then(res=>{ // res为请求到的数据 t.setData({ ..... }) }).catch(e=>{ console.error(e) }).finally(()=>{ // 不管错误还是成功最后都会执行wx.stopPullDownRefresh() wx.stopPullDownRefresh() }) },
若认为该回答有用,给回答者点个[ 有用 ],让答案帮助更多的人
"enablePullDownRefresh":true
https://developers.weixin.qq.com/s/U31SVUmv7egE