Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么图片加载有问题 #17

Closed
StephenWu5 opened this issue Apr 13, 2018 · 5 comments
Closed

为什么图片加载有问题 #17

StephenWu5 opened this issue Apr 13, 2018 · 5 comments

Comments

@StephenWu5
Copy link

Welcome to the vue2.x-douban wiki!

为什么我本地跑起来是这么样子,有的图片请求不到,有的图片请求得到!!

666

能告诉我什么原因吗???

@superman66
Copy link
Owner

superman66 commented Apr 13, 2018

这是豆瓣 api 防盗链机制。所以导致访问图片会返回 403 http code。
你可以将 api 地址改为 https://github.com/superman66/vue2.x-douban/blob/master/src/store/api.js#L7
改成线上的 API 再试试

// 使用代理
const HOST = 'https://node-douban-api.herokuapp.com';

@StephenWu5
Copy link
Author

ok,thanks...

@StephenWu5
Copy link
Author

https://node-douban-api.herokuapp.com 这个服务器是哪位老大搭的?you?

@superman66
Copy link
Owner

恩,我自己搭在 herokuapp 上的。

@StephenWu5
Copy link
Author

好的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants