请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

请求豆瓣api报403错误

onLoad: function (options) {
    wx.request({
        url: 'https://api.douban.com/v2/movie/top250',
        data: {},
        method: 'GET',
        header: {
            'Content-type': 'json'
        },
        success: function (res) {
            console.log(res);
        }
    });
},

错误内容如下:

//img1.sycdn.imooc.com//szimg/5a8e6dc40001ede613910178.jpg

错误出自7-12,换成http: //http://t.yushu.im后也出错 ,错误如下:

https://img1.sycdn.imooc.com//szimg/5a8e6e79000117aa13650085.jpg

正在回答

1回答

7七月 2018-02-22 15:35:46

你这不还是请求的豆瓣么,你看url,起码要把 https://api.douban.com换成yushu吧。我再7-1里说的是把基地址替换掉。

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信