|
|
@@ -4,11 +4,13 @@ import android.app.Activity;
|
|
|
import android.support.v7.widget.AppCompatEditText;
|
|
|
import android.text.TextUtils;
|
|
|
import android.view.View;
|
|
|
+import android.widget.EditText;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.sheep.gamegroup.di.components.DaggerBindOrChangeWeixinComponent;
|
|
|
import com.sheep.gamegroup.di.modules.BindOrChangeWeixinModule;
|
|
|
+import com.sheep.gamegroup.event.BindWXResultEvent;
|
|
|
import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
|
import com.sheep.gamegroup.model.entity.UserEntity;
|
|
|
import com.sheep.gamegroup.presenter.BindOrChangeWeixinContract;
|
|
|
@@ -23,6 +25,8 @@ import com.sheep.gamegroup.absBase.BaseActivity;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
|
|
|
|
|
|
+import org.greenrobot.eventbus.EventBus;
|
|
|
+
|
|
|
import javax.inject.Inject;
|
|
|
|
|
|
import butterknife.BindView;
|
|
|
@@ -34,12 +38,12 @@ import butterknife.OnClick;
|
|
|
*/
|
|
|
|
|
|
public class BindOrChangeWeixinAct extends BaseActivity implements BindOrChangeWeixinContract.View {
|
|
|
+
|
|
|
@BindView(R.id.weinxin_et_account)
|
|
|
- AppCompatEditText weinxinEtAccount;
|
|
|
+ EditText weinxinEtAccount;
|
|
|
@BindView(R.id.bindweixin_sure_text)
|
|
|
TextView bindweixinSureText;
|
|
|
|
|
|
- Activity activity;
|
|
|
@Inject
|
|
|
BindOrChangeWeixinPresenter presenter;
|
|
|
|
|
|
@@ -56,7 +60,6 @@ public class BindOrChangeWeixinAct extends BaseActivity implements BindOrChangeW
|
|
|
|
|
|
@Override
|
|
|
public void initView() {
|
|
|
- activity = this;
|
|
|
isBindOrChange = getIntent().getBooleanExtra("type", false);
|
|
|
from = getIntent().getIntExtra("from", ChangeWxOrTelAct.TYPE_NORMAL);
|
|
|
if(isBindOrChange){
|
|
|
@@ -66,8 +69,9 @@ public class BindOrChangeWeixinAct extends BaseActivity implements BindOrChangeW
|
|
|
}
|
|
|
TitleBarUtils
|
|
|
.getInstance()
|
|
|
- .setTitle(activity, isBindOrChangeStr)
|
|
|
- .setTitleFinish(activity);
|
|
|
+ .setShowOrHide(this, true)
|
|
|
+ .setTitle(this, isBindOrChangeStr)
|
|
|
+ .setTitleFinish(this);
|
|
|
DaggerBindOrChangeWeixinComponent.builder()
|
|
|
.netComponent(SheepApp.getInstance().getNetComponent())
|
|
|
.bindOrChangeWeixinModule(new BindOrChangeWeixinModule(this))
|
|
|
@@ -127,6 +131,7 @@ public class BindOrChangeWeixinAct extends BaseActivity implements BindOrChangeW
|
|
|
}
|
|
|
finish();
|
|
|
CommonUtil.getInstance().updateUserInfo(null);
|
|
|
+ EventBus.getDefault().post(new BindWXResultEvent());
|
|
|
}
|
|
|
|
|
|
@Override
|