loadMore:function(){
wx.cloud.callFunction({
name:"axioscs",
data:{
start:1,
count:5
},
}).then(res=>{
console.log(res)
var data=JSON.parse(res)
this.setData({listdata:data})
}).catch(err=>{
console.log(err)
})
},
onLoad: function (options) {
this.loadMore();
},
const cloud = require('wx-server-sdk')
cloud.init()
const rp = require("request-promise");
exports.main = async (event, context) => {
var url = `http://api.douban.com/v2/movie/in_theaters?apikey=0df993c66c0c636e29ecbb5344252a4a&start=${event.start}&count=${event.count}
`;
return rp(url)
.then(res=>{ return res;})
.catch(err=>{console.log(err)})
}
云函数明显就是没重新部署,你仔细看看返回值,是不是跟新建云函数模板的返回值一样