這是什么原因? 還有就是api為啥沒有結果
movieList: this.data.movieList.concat(JSON.parse(res.result).subjects) 這行代碼報錯SyntaxError: Unexpected token o in JSON at position 1 ? ?at JSON.parse (
)是什么原因movieList: this.data.movieList.concat(JSON.parse(res.result).subjects) 這行代碼報錯SyntaxError: Unexpected token o in JSON at position 1 ? ?at JSON.parse (
)是什么原因2019-11-15
舉報
2019-11-15
截圖中云函數的返回值還是創建云函數時候的默認值,請重新上傳云函數:
豆瓣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`