九游游戏中心HD v4.6.8.1版本的 MD5 值为:78c397802cc5ffdcc7f5502ede90502e
以下内容为反编译后的 TBShopParam.java 源代码,内容仅作参考
package com.tmall.applink.param;
import android.content.Context;
import android.util.Log;
import com.tmall.applink.exception.TBAppLinkException;
import com.tmall.applink.exception.TBAppLinkExceptionCode;
import com.tmall.applink.util.TBAppLinkStringUtil;
import com.tmall.applink.util.TBAppLinkUtil;
import org.json.JSONException;
import org.json.JSONObject;
public class TBShopParam extends TBNavParam {
private static final String MODEL_NAME = "shop";
private String mShopID;
private TBShopParam() {
}
public TBShopParam(String str) {
this.mParams.put("module", MODEL_NAME);
this.mShopID = str;
}
@Override
public String getJumpUrl(Context context) {
if (!TBAppLinkStringUtil.isNumeric(this.mShopID)) {
throw new TBAppLinkException(TBAppLinkExceptionCode.SHOPID_ILLEGAL);
}
this.mExtraParams.put("shopId", this.mShopID);
return super.getJumpUrl(context);
}
@Override
public String getH5URL() {
if (!TBAppLinkStringUtil.isNumeric(this.mShopID)) {
throw new TBAppLinkException(TBAppLinkExceptionCode.SHOPID_ILLEGAL);
}
return super.getH5URL(String.format("http://shop%s.m.taobao.com", this.mShopID));
}
@Override
public String getURL() {
return String.format("http://shop%s.m.taobao.com", this.mShopID);
}
@Override
public boolean checkParams(JSONObject jSONObject) {
try {
String string = jSONObject.getString("shopId");
if (TBAppLinkStringUtil.isNumeric(string)) {
this.mParams.put("module", MODEL_NAME);
this.mShopID = string;
return true;
}
return false;
} catch (JSONException e) {
Log.d(TBAppLinkUtil.TAG, e.toString());
return false;
}
}
}