4399游戏盒 v7.2.1.31版本的 MD5 值为:951717f45e3fda95c8a358caf4ca93e1

以下内容为反编译后的 bc.java 源代码,内容仅作参考


package com.m4399.gamecenter.plugin.main.providers.gamehub;

import android.text.TextUtils;
import com.framework.EnvironmentMode;
import com.framework.config.Config;
import com.framework.config.SysConfigKey;
import com.framework.net.ILoadPageEventListener;
import com.framework.utils.JSONUtils;
import com.m4399.gamecenter.plugin.main.config.GameCenterConfigKey;
import java.util.Map;
import org.json.JSONObject;

public class bc extends com.m4399.gamecenter.plugin.main.providers.f {
    private String mImage;
    private String mUrl;

    @Override
    protected int getApiType() {
        return 5;
    }

    public void setUrl(String str) {
        this.mUrl = str;
    }

    public String getImage() {
        return this.mImage;
    }

    @Override
    public boolean isEmpty() {
        return TextUtils.isEmpty(this.mImage);
    }

    @Override
    public void clearAllData() {
        this.mUrl = null;
        this.mImage = null;
    }

    @Override
    public void loadData(ILoadPageEventListener iLoadPageEventListener) {
        char c;
        String str = (String) Config.getValue(GameCenterConfigKey.URLS_HOST_VIDEO_UPLOAD);
        String str2 = str + "forums/pc/v1.0/youpai.html";
        String str3 = (String) Config.getValue(SysConfigKey.HTTP_ENVIRONMENT);
        int hashCode = str3.hashCode();
        if (hashCode == -1012222381) {
            if (str3.equals(EnvironmentMode.ONLINE)) {
                c = 3;
            }
            c = 65535;
        } else if (hashCode == 3557) {
            if (str3.equals(EnvironmentMode.OT)) {
                c = 2;
            }
            c = 65535;
        } else if (hashCode != 3646) {
            if (hashCode == 3556498 && str3.equals(EnvironmentMode.TESTER)) {
                c = 1;
            }
            c = 65535;
        } else {
            if (str3.equals(EnvironmentMode.T2)) {
                c = 0;
            }
            c = 65535;
        }
        if (c == 0) {
            str2 = "https://dlstest.img4399.com/redirect/yxh_feed_up/t2/forums/android/v1.0/youpai.html";
        } else if (c == 1) {
            str2 = "https://dlstest.img4399.com/redirect/yxh_feed_up/test/forums/android/v1.0/youpai.html";
        } else if (c == 2) {
            str2 = "https://dlstest.img4399.com/redirect/yxh_feed_up/ot/forums/android/v1.0/youpai.html";
        } else if (c == 3) {
            str2 = str + "forums/android/v1.0/youpai.html";
        }
        super.loadData(str2, 1, iLoadPageEventListener);
    }

    @Override
    public void parseResponseData(JSONObject jSONObject) {
        this.mImage = JSONUtils.getString("screenshot", jSONObject);
    }

    @Override
    protected void buildRequestParams(String str, Map map) {
        map.put("url", this.mUrl);
    }
}