小程序加載進度條的實現(xiàn)
2020-09-27|HiShop
導(dǎo)讀:view class=body-view loading hidden={{hidden}} bindchange=loadingChange 加載中... loadingview data: { imgUrls: [ ../../assets/img/001.jpg, ../../assets/img/002.jpg, ../../assets/img/003.jpg ], indi...
<view class="body-view"> <loading hidden="{{hidden}}" bindchange="loadingChange"> 加載中... loading> view>
data: { imgUrls: [ '../../assets/img/001.jpg', '../../assets/img/002.jpg', '../../assets/img/003.jpg' ], indicatorDots: true, autoplay: true, interval: 3000, duration: 1000, movies:[], hidden:false },
/** * 加載電影 */ loadMovie:function(){ var page = this; wx.request({ url: 'https://api.douban.com/v2/movie/in_theaters', header:{ 'Content-Type':"application/json" }, success:function(res){ var subjects = res.data.subjects; processSubjects(subjects); page.setData({ movies: subjects, hidden:true}); } }) },
上一篇:微信小程序怎么開發(fā) 下一篇:微信小游戲開發(fā)配置API接口