中建乐购 v3.2.3版本的 MD5 值为:3856d0da11f056931d64951d23a4b3b8
以下内容为反编译后的 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 f9476a;
private TextView f9477b;
private TextView f9478c;
private TextView f9479d;
private String f9480e;
private String f9481f;
private String f9482g;
private fu.d f9483h;
@Override
public void ui(int i2, Message message) {
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
this.f9480e = this.mActivity.getIntent().getStringExtra(com.shopex.westore.k.f10238j);
this.f9481f = this.mActivity.getIntent().getStringExtra(com.shopex.westore.k.f10244p);
this.f9482g = 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(dc.c.J);
this.f9477b = (TextView) findViewById(R.id.article_reader_title);
if (stringExtra != null && !TextUtils.isEmpty(stringExtra)) {
this.mActionBar.setTitle(stringExtra);
}
this.f9478c = (TextView) findViewById(R.id.article_reader_date);
this.f9479d = (TextView) findViewById(R.id.article_reader_source);
this.f9476a = (WebView) findViewById(R.id.article_reader_webview);
this.f9476a.setBackgroundColor(-1);
WebSettings settings = this.f9476a.getSettings();
settings.setJavaScriptEnabled(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setBuiltInZoomControls(false);
this.f9476a.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.f9481f)) {
findViewById.setVisibility(0);
this.f9476a.loadDataWithBaseURL(com.shopex.westore.k.M, this.f9481f, "text/html", "utf8", null);
} else if (!TextUtils.isEmpty(this.f9482g)) {
findViewById.setVisibility(0);
this.f9476a.loadUrl(this.f9482g);
} else {
a();
}
this.f9476a.addJavascriptInterface(new b(), "aliasInHtml");
}
private void a() {
if (this.f9483h != null) {
this.f9483h.cancel(true);
}
this.f9483h = new fu.d();
com.shopex.westore.k.a(this.f9483h, new a());
}
final class b {
b() {
}
@JavascriptInterface
public void getHTML(String str) {
if (str.contains("成功付款")) {
com.shopex.westore.k.e(h.this.mActivity, fo.r.f17801a);
h.this.mActivity.finish();
}
}
}
@Override
public void onClick(View view) {
super.onClick(view);
}
public class a implements fu.e {
private a() {
}
@Override
public fu.c task_request() {
h.this.showCancelableLoadingDialog();
return new fu.c("mobileapi.article.get_detail").a("article_id", h.this.f9480e);
}
@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.f9477b.setText(jSONObject.optString(dc.c.J));
JSONObject optJSONObject = jSONObject.optJSONObject("data");
h.this.mActionBar.setTitle(optJSONObject.optJSONObject("indexs").optString(dc.c.J));
h.this.f9476a.loadDataWithBaseURL("", optJSONObject.optJSONObject("bodys").optString("content"), "text/html", "utf-8", "");
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
}