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

本地登录时还是出现了跨域问题? #41

Open
tangkepeng opened this issue Nov 9, 2018 · 1 comment
Open

本地登录时还是出现了跨域问题? #41

tangkepeng opened this issue Nov 9, 2018 · 1 comment

Comments

@tangkepeng
Copy link

已经按照要求配置了
axios.defaults.baseURL = 'http://127.0.0.1/VueThink/php/index.php/'
window.HOST = 'http://127.0.0.1/VueThink/php/index.php/'
但登录时还是出现跨域问题,是什么原因啊?
Failed to load http://127.0.0.1/VueThink/php/index.php/admin/base/login: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.

@tangkepeng tangkepeng changed the title 本地登录时不是出现了跨域问题? 本地登录时还是出现了跨域问题? Nov 9, 2018
@yonghuming
Copy link

更多的是访问thinkphp的index.php路径没有写对,路径要写到index.php,因为你的thinkphp的入口文件没有部署在服务器的根目录

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