為什么我每次加載都是20條電影數據啊,count沒有用啊
云函數index.js
//?云函數入口函數exports.main?=?async?(event,?context)?=>?{return?rp('http://api.douban.com/v2/movie/in_theaters?apikey=0df993c66c0c636e29ecbb5344252a4a&start=${event.start}&count=${event.count}').then(res=>{console.log(res)return?res}).catch(err=>{console.log(err)})}
movie.js
wx.cloud.callFunction({name:?"movielist",data:?{start:?this.data.movielist.length,count:?10}}).then(res?=>?{console.log(res)this.setData({movielist:?this.data.movielist.concat(JSON.parse(res.result).subjects)})wx.hideLoading()}).catch(err?=>?{console.log(err)wx.hideLoading()})
2019-12-25
云函數中 地址兩側的單引號 是 1 左邊的引號。。。