使用angular js框架写的h5页面,在浏览器中调接口,能正常访问并获得结果
但是放到Android的webview中时,调接口一直失败
看后台日志接口是调到了,但是结果不能正常返回
这个问题困扰了一天,挺影响项目进度的!
不知道有没有人遇到同样的问题
后台使用的tomcat 6.0,angular js打包的h5应用也是放着tomcat下的
大家讲道理2017-04-17 17:48:07
The main problem is the mechanism of Angular js. When Angular js is not loaded properly and many things in Angular js are not initialized, the call fails due to calling the background interface
迷茫2017-04-17 17:48:07
I also encountered this problem today. The solution is
webView.getSettings().setDomStorageEnabled(true);//Enable DOM storage API function. It must be enabled
Hope it is useful to everyone