柬埔寨通 v6.1.5版本的 MD5 值为:9b68581ac30883219d6a25858a099d6b
以下内容为反编译后的 TicketOpenActivity.java 源代码,内容仅作参考
package net.duohuo.magappx.main.user.tool;
import android.animation.ObjectAnimator;
import android.content.Intent;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.facebook.drawee.view.SimpleDraweeView;
import com.huawei.hms.push.constant.RemoteMessageConst;
import com.jianpuzhaitong.forum.R;
import com.umeng.socialize.common.SocializeConstants;
import net.duohuo.core.ProxyTool;
import net.duohuo.core.annotation.Extra;
import net.duohuo.core.ioc.Ioc;
import net.duohuo.core.net.Net;
import net.duohuo.core.net.Result;
import net.duohuo.core.net.Task;
import net.duohuo.core.util.IUtil;
import net.duohuo.core.util.SafeJsonUtil;
import net.duohuo.magapp.chat.MagappChatCore;
import net.duohuo.magappx.API;
import net.duohuo.magappx.UrlScheme;
import net.duohuo.magappx.common.base.LyeahActivity;
import net.duohuo.magappx.video.videorecord.util.SharedPreferencesUtil;
public class TicketOpenActivity extends LyeahActivity {
@BindView(R.id.box)
LinearLayout box;
@BindView(R.id.des)
TextView desV;
@BindView(R.id.head)
SimpleDraweeView headV;
@Extra(name = "infos")
String infos;
JSONObject jo;
@BindView(R.id.name)
TextView nameV;
@BindView(R.id.subtitle)
TextView subtitleV;
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.activity_open_ticket);
ButterKnife.bind(this);
ProxyTool.inject(this);
ObjectAnimator.ofFloat(this.box, "translationY", IUtil.dip2px(this, 400.0f), 0.0f).setDuration(200L).start();
JSONObject parseObject = JSON.parseObject(this.infos);
this.jo = parseObject;
this.headV.setImageURI(parseObject.getString("user_head"));
this.nameV.setText(this.jo.getString("user_name"));
this.desV.setText(this.jo.getString("des"));
}
@Override
public void finish() {
super.finish();
overridePendingTransition(R.anim.alpha_in, R.anim.alpha_out);
}
@OnClick({R.id.getticket})
public void getTicket() {
Net url = Net.url(API.User.receiveCard);
url.param("id", this.jo.getString("id"));
url.param("send_userid", SafeJsonUtil.getString(this.jo, SocializeConstants.TENCENT_UID).replace(MagappChatCore.user_prefix, ""));
url.param("group_id", SafeJsonUtil.getString(this.jo, "group_id"));
url.get(new Task<Result>() {
@Override
public void onResult(Result result) {
if (result.success()) {
((SharedPreferencesUtil) Ioc.get(SharedPreferencesUtil.class)).setReceiveState(TicketOpenActivity.this.jo.getString(RemoteMessageConst.MSGID), true);
if (Integer.valueOf(result.get("data").toString()).intValue() == 1) {
Intent intent = TicketOpenActivity.this.getIntent();
intent.putExtra("infos", TicketOpenActivity.this.infos);
TicketOpenActivity.this.setResult(-1, intent);
}
}
TicketOpenActivity.this.finish();
UrlScheme.toUrl(TicketOpenActivity.this, "https://app.jpztong.com/mag/user/v1/card/receiveCardView?id=" + TicketOpenActivity.this.jo.getString("id"));
}
});
}
}