云函数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()})
云函数中 地址两侧的单引号 是 1 左边的引号。。。