|
|
@@ -63,6 +63,7 @@ import java.util.Map;
|
|
|
|
|
|
import butterknife.BindView;
|
|
|
import cn.finalteam.rxgalleryfinal.utils.CameraUtil;
|
|
|
+import io.reactivex.android.schedulers.AndroidSchedulers;
|
|
|
import okhttp3.Call;
|
|
|
import org.greenrobot.eventbus.EventBus;
|
|
|
|
|
|
@@ -464,14 +465,28 @@ public class FgtWebX5 extends BaseFgtWebX5 {
|
|
|
|
|
|
@Override
|
|
|
public WebResourceResponse shouldInterceptRequest(WebView webView, String s) {
|
|
|
- if (url.contains("h5.qzone.qq.com")) {
|
|
|
+ if (s.contains("page-error.css")) {
|
|
|
+ CookieManager.getInstance().removeAllCookie();
|
|
|
+ Log.d("!!!!!!s","清理了cookie~~~");
|
|
|
+ AndroidSchedulers.mainThread().scheduleDirect(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ loadJs("window.location.reload()");
|
|
|
+ /*//鱼死网破
|
|
|
+ needWxLogin = true;
|
|
|
+ kfzsJs.loginThirdPartApp("wx");*/
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ /*if (url.contains("h5.qzone.qq.com")) {
|
|
|
Log.d("!!!!!!",s);
|
|
|
if (s.contains("pic-error.png")||s.contains("page-error.css")) {
|
|
|
//鱼死网破
|
|
|
needWxLogin = true;
|
|
|
kfzsJs.loginThirdPartApp("wx");
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
return super.shouldInterceptRequest(webView, s);
|
|
|
}
|
|
|
|
|
|
@@ -542,14 +557,6 @@ public class FgtWebX5 extends BaseFgtWebX5 {
|
|
|
public void onPageFinished(WebView view, String url) {
|
|
|
LogUtil.println("ActWebX5", "onPageFinished " + url);
|
|
|
super.onPageFinished(view, url);
|
|
|
- if (url.contains("h5.qzone.qq.com")) {
|
|
|
- Log.d("!!!!!!",url);
|
|
|
- if (url.contains("pic-error.png")||url.contains("page-error.css")) {
|
|
|
- //鱼死网破
|
|
|
- needWxLogin = true;
|
|
|
- kfzsJs.loginThirdPartApp("wx");
|
|
|
- }
|
|
|
- }
|
|
|
CookieManager cookieManager = CookieManager.getInstance();
|
|
|
cookieManager.flush();
|
|
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|