50度灰 v5.8.2版本的 MD5 值为:9fe3d350fdc75fa1a3ec45509fa0107e
以下内容为反编译后的 BaseViewModel.java 源代码,内容仅作参考
package com.tencent.mm.base;
import android.arch.lifecycle.ViewModel;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import com.lzy.okgo.model.Response;
public abstract class BaseViewModel extends ViewModel {
public static final int f7404a = 99;
public static final int f7405b = 98;
public static final int f7406c = 97;
public static final int f7407d = 96;
class a extends StringCallback {
final int f7408a;
a(final int val$type) {
this.f7408a = val$type;
}
@Override
public void onSuccess(Response<String> response) {
try {
JSONArray parseArray = JSON.parseArray(response.body());
if (parseArray != null && parseArray.size() > 0) {
JSONObject jSONObject = (JSONObject) parseArray.get(0);
int i = this.f7408a;
if (i == 1) {
com.tencent.mm.l.l.n().T(jSONObject.getString("url_short"));
} else if (i == 2) {
com.tencent.mm.l.l.n().G(jSONObject.getString("url_short"));
}
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
public void a(String url, int type) {
if (type == 1) {
com.tencent.mm.l.l.n().T(url);
} else if (type == 2) {
com.tencent.mm.l.l.n().G(url);
}
OkGo.get("http://api.t.sina.com.cn/short_url/shorten.json?source=3271760578&url_long=" + url).execute(new a(type));
}
public abstract void b();
public abstract void c(int clickTag);
public abstract void d(int clickTag);
}