Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail cloud function service error code -504002, error message console.err is not a function; at cloud.callFunction api;
at new t (WAService.js:22)
at o (WAService.js:22)
at Object.i [as returnAsFinalCloudSDKError] (WAService.js:22)
at Function.success (WAService.js:21)
at Object.success (WAService.js:4)
at L.<anonymous> (WAService.js:7)
at L.emit (WAService.js:8)
at Function.<anonymous> (WAService.js:12)
at WAService.js:6
at e (appservice?t=1561359761381:3870)
把代码当中的console.err()改成console.error(),然后根据错误就能够找到问题。
需要在请求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
具体也可以参考课程主页右下角的课程源码。
我刚刚也一直是这个问题,然后修改了app.js中的env字段为自己云开发环境ID就好了