webview默认是不开启localstorage的

.setDomStorageEnabled(true);// 打开本地缓存提供JS调用,至关重要

转载 https://blog.csdn.net/xhf_123/article/details/77893645

原文地址:https://www.cnblogs.com/lanshengzhong/p/9402289.html