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

这个请求的接口是需要特殊配置吗? #9

Open
lusanshao opened this issue Mar 14, 2018 · 6 comments
Open

这个请求的接口是需要特殊配置吗? #9

lusanshao opened this issue Mar 14, 2018 · 6 comments

Comments

@lusanshao
Copy link

我把tui页面的list接口改成下面这个,然后直接504了.
http://www.phonegap100.com/appapi.php?a=getPortalList&catid=20

报错:
[HPM] Error occurred while trying to proxy request from localhost:3012 to http://www.phonegap100.com/appapi.php? (ECONNRESET) (https://nodejs.org/api/errors.html#errors_common_system_errors)

@aiyuekuang
Copy link
Owner

需要配置webpack里的devServer,具体细节用法你最好系统的学习一下

@lusanshao
Copy link
Author

对,我就是把devServer的地址换成http://www.phonegap100.com/appapi.php?
tui那页参数改成a:'getPortalList',catid:'20',但是会404.
把actions里的get方法改成getData也还是不行,但是默认qq那个接口就可以

@aiyuekuang
Copy link
Owner

这个你可以百度搜一下“webpack-dev-server跨域”找找相关的教程,搞清楚原理,我这里不一定能帮你解释清楚

@lusanshao
Copy link
Author

好的,谢谢

@lusanshao
Copy link
Author

确实是webpack-dev-server设置的地方写错了,已成功,谢谢

@aiyuekuang
Copy link
Owner

恩恩

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