中建乐购 v3.2.2版本的 MD5 值为:0553721e6bc6ba8dd67004696a555b81
以下内容为反编译后的 h.java 源代码,内容仅作参考
package com.shopex.westore.activity;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Bundle;
import android.os.Message;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.JavascriptInterface;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.TextView;
import com.zjsjtz.ecstore.R;
import org.json.JSONObject;
public class h extends com.shopex.westore.b {
private WebView f9430a;
private TextView f9431b;
private TextView f9432c;
private TextView f9433d;
private String f9434e;
private String f9435f;
private String f9436g;
private fj.d f9437h;
@Override
public void ui(int i2, Message message) {
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
this.f9434e = this.mActivity.getIntent().getStringExtra(com.shopex.westore.k.f10187j);
this.f9435f = this.mActivity.getIntent().getStringExtra(com.shopex.westore.k.f10193p);
this.f9436g = this.mActivity.getIntent().getStringExtra("com.shopex.westore.EXTRA_URL");
}
@Override
@SuppressLint({"JavascriptInterface"})
public void init(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
this.rootView = layoutInflater.inflate(R.layout.fragment_article_reader, (ViewGroup) null);
String stringExtra = getActivity().getIntent().getStringExtra(cv.c.J);
this.f9431b = (TextView) findViewById(R.id.article_reader_title);
if (stringExtra != null && !TextUtils.isEmpty(stringExtra)) {
this.mActionBar.setTitle(stringExtra);
}
this.f9432c = (TextView) findViewById(R.id.article_reader_date);
this.f9433d = (TextView) findViewById(R.id.article_reader_source);
this.f9430a = (WebView) findViewById(R.id.article_reader_webview);
this.f9430a.setBackgroundColor(-1);
WebSettings settings = this.f9430a.getSettings();
settings.setJavaScriptEnabled(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setBuiltInZoomControls(false);
this.f9430a.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
return super.shouldOverrideUrlLoading(webView, str);
}
@Override
public void onPageFinished(WebView webView, String str) {
super.onPageFinished(webView, str);
webView.loadUrl("javascript:window.aliasInHtml.getHTML(document.body.innerHTML);");
}
});
View findViewById = findViewById(R.id.article_reader_parent);
if (!TextUtils.isEmpty(this.f9435f)) {
findViewById.setVisibility(0);
this.f9430a.loadDataWithBaseURL(com.shopex.westore.k.M, this.f9435f, "text/html", "utf8", null);
} else if (!TextUtils.isEmpty(this.f9436g)) {
findViewById.setVisibility(0);
this.f9430a.loadUrl(this.f9436g);
} else {
a();
}
this.f9430a.addJavascriptInterface(new b(), "aliasInHtml");
}
private void a() {
if (this.f9437h != null) {
this.f9437h.cancel(true);
}
this.f9437h = new fj.d();
com.shopex.westore.k.a(this.f9437h, new a());
}
final class b {
b() {
}
@JavascriptInterface
public void getHTML(String str) {
if (str.contains("成功付款")) {
com.shopex.westore.k.e(h.this.mActivity, fd.r.f17578a);
h.this.mActivity.finish();
}
}
}
@Override
public void onClick(View view) {
super.onClick(view);
}
public class a implements fj.e {
private a() {
}
@Override
public fj.c task_request() {
h.this.showCancelableLoadingDialog();
return new fj.c("mobileapi.article.get_detail").a("article_id", h.this.f9434e);
}
@Override
public void task_response(String str) {
h.this.hideLoadingDialog_mt();
try {
JSONObject jSONObject = new JSONObject(str);
if (com.shopex.westore.k.a((Context) h.this.mActivity, jSONObject)) {
h.this.findViewById(R.id.article_reader_parent).setVisibility(0);
h.this.f9431b.setText(jSONObject.optString(cv.c.J));
JSONObject optJSONObject = jSONObject.optJSONObject("data");
h.this.mActionBar.setTitle(optJSONObject.optJSONObject("indexs").optString(cv.c.J));
h.this.f9430a.loadDataWithBaseURL("", optJSONObject.optJSONObject("bodys").optString("content"), "text/html", "utf-8", "");
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
}