慕娘7259955
2019-05-30 14:08
options:
{ uri: 'http://api.douban.com/v2/movie/in_theaters?start=undefined\n &count=undefined',
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false },
这是云控制台的信息,路径上我是这么配置的,
`http://api.douban.com/v2/movie/in_theaters?start=${event.start}
&count=${event.count}`
但是日志中start和count都是没有定义,而且两个参数之间多了\n占位符,这是什么原因?
由于最近API有变化,需要在请求API的url后面跟一个apikey参数:
电影列表API:http://api.douban.com/v2/movie/in_theaters?apikey=0df993c66c0c636e29ecbb5344252a4a&start=0&count=10
电影详情API:http://api.douban.com/v2/movie/subject/${event.movieid}?apikey=0df993c66c0c636e29ecbb5344252a4a
另外,你的代码中,API的URL中间不要敲回车,你这个问题应该是中间敲了回车导致的。
轻松入门微信小程序与云开发
64634 学习 · 1742 问题
相似问题