Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

引入了jquery-weui.js后,ajax直接进入了error函数 #629

Open
junkle opened this issue Oct 26, 2020 · 0 comments
Open

引入了jquery-weui.js后,ajax直接进入了error函数 #629

junkle opened this issue Oct 26, 2020 · 0 comments

Comments

@junkle
Copy link

junkle commented Oct 26, 2020

这是服务端的代码,已经设置了跨域允许,
String sOrigin = request.getHeader("Origin"); if (sOrigin != null) { response.setHeader("Access-Control-Allow-Origin", sOrigin); response.setHeader("Access-Control-Allow-Credentials", "true"); }
在ajax里设置了
xhrFields: {withCredentials: true},
已经测试过没添加jquery-weui.js时,能正常返回数据,但是添加了后就不行了。
控制台无返回,error函数打印的信息为:
status:0 ; readyState:0 ; textStatus:error

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

No branches or pull requests

1 participant