|
@@ -9,15 +9,10 @@ import android.widget.TextView;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.sheep.gamegroup.di.components.DaggerCommitWxCodeMakeMoneyComponent;
|
|
import com.sheep.gamegroup.di.components.DaggerCommitWxCodeMakeMoneyComponent;
|
|
|
-import com.sheep.gamegroup.di.components.DaggerCommitWxMakeMoneyComponent;
|
|
|
|
|
import com.sheep.gamegroup.di.modules.CommitWxCodeMakeMoneyModule;
|
|
import com.sheep.gamegroup.di.modules.CommitWxCodeMakeMoneyModule;
|
|
|
-import com.sheep.gamegroup.di.modules.CommitWxMakeMoneyModule;
|
|
|
|
|
import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
|
-import com.sheep.gamegroup.model.entity.WXOnHookAccount;
|
|
|
|
|
import com.sheep.gamegroup.presenter.CommitWxCodeMakeMoneyContract;
|
|
import com.sheep.gamegroup.presenter.CommitWxCodeMakeMoneyContract;
|
|
|
import com.sheep.gamegroup.presenter.CommitWxCodeMakeMoneyPresenter;
|
|
import com.sheep.gamegroup.presenter.CommitWxCodeMakeMoneyPresenter;
|
|
|
-import com.sheep.gamegroup.presenter.CommitWxMakeMoneyContract;
|
|
|
|
|
-import com.sheep.gamegroup.presenter.CommitWxMakeMoneyPresenter;
|
|
|
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
|
import com.sheep.jiuyan.samllsheep.BuildConfig;
|
|
import com.sheep.jiuyan.samllsheep.BuildConfig;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
@@ -32,9 +27,8 @@ import butterknife.BindView;
|
|
|
import butterknife.ButterKnife;
|
|
import butterknife.ButterKnife;
|
|
|
import butterknife.OnClick;
|
|
import butterknife.OnClick;
|
|
|
|
|
|
|
|
-import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_ABNORMAL_NEXT;
|
|
|
|
|
import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_DEBLOCKED;
|
|
import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_DEBLOCKED;
|
|
|
-import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_UNVERIFIED;
|
|
|
|
|
|
|
+import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_TOMORROW_RESET;
|
|
|
import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_VERIFIED;
|
|
import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_VERIFIED;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -44,6 +38,10 @@ import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_VE
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
public class CommitWxCodeAct extends BaseActivity implements CommitWxCodeMakeMoneyContract.View{
|
|
public class CommitWxCodeAct extends BaseActivity implements CommitWxCodeMakeMoneyContract.View{
|
|
|
|
|
+
|
|
|
|
|
+ public static final int ALTER_INFO = 0;
|
|
|
|
|
+ public static final int HAS_DEBLOCKED = 1;
|
|
|
|
|
+ public static final int ALTER_CODE = 2;
|
|
|
@BindView(R.id.tv_wx_commit)
|
|
@BindView(R.id.tv_wx_commit)
|
|
|
TextView tv_wx_commit;
|
|
TextView tv_wx_commit;
|
|
|
@BindView(R.id.et_wx_account)
|
|
@BindView(R.id.et_wx_account)
|
|
@@ -65,10 +63,10 @@ public class CommitWxCodeAct extends BaseActivity implements CommitWxCodeMakeMon
|
|
|
G.showToast("微信账号不能为空");
|
|
G.showToast("微信账号不能为空");
|
|
|
} else if(et_wx_pwd.getVisibility() == View.VISIBLE && TextUtils.isEmpty(password)){
|
|
} else if(et_wx_pwd.getVisibility() == View.VISIBLE && TextUtils.isEmpty(password)){
|
|
|
switch (type){
|
|
switch (type){
|
|
|
- case STATE_ON_HOOK_VERIFIED:
|
|
|
|
|
|
|
+ case ALTER_CODE:
|
|
|
G.showToast("微信验证码不能为空");
|
|
G.showToast("微信验证码不能为空");
|
|
|
break;
|
|
break;
|
|
|
- case STATE_ON_HOOK_ABNORMAL_NEXT:
|
|
|
|
|
|
|
+ case ALTER_INFO:
|
|
|
G.showToast("微信密码不能为空");
|
|
G.showToast("微信密码不能为空");
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
@@ -76,21 +74,21 @@ public class CommitWxCodeAct extends BaseActivity implements CommitWxCodeMakeMon
|
|
|
showProgress();
|
|
showProgress();
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
switch (type){
|
|
switch (type){
|
|
|
- case STATE_ON_HOOK_VERIFIED:
|
|
|
|
|
|
|
+ case ALTER_CODE:
|
|
|
|
|
+ jsonObject.put("status", STATE_ON_HOOK_VERIFIED);
|
|
|
//用户已经验证,等待脚本验证
|
|
//用户已经验证,等待脚本验证
|
|
|
- jsonObject.put("status", type);
|
|
|
|
|
jsonObject.put("verification_code", password);
|
|
jsonObject.put("verification_code", password);
|
|
|
break;
|
|
break;
|
|
|
- case STATE_ON_HOOK_DEBLOCKED:
|
|
|
|
|
- //用户确认已经解封,设置为等待服务器验证
|
|
|
|
|
- jsonObject.put("status", type);
|
|
|
|
|
- break;
|
|
|
|
|
- case STATE_ON_HOOK_ABNORMAL_NEXT:
|
|
|
|
|
- jsonObject.put("status", type);
|
|
|
|
|
- //因为账号异常(账号密码错误),所以修改账号,修改后将进入初始状态,即未验证
|
|
|
|
|
|
|
+ case ALTER_INFO:
|
|
|
|
|
+ jsonObject.put("status", STATE_ON_HOOK_VERIFIED);
|
|
|
|
|
+ //因为账号异常(账号密码错误),所以修改账号,修改后将等待明天验证
|
|
|
jsonObject.put("account", account);
|
|
jsonObject.put("account", account);
|
|
|
jsonObject.put("password", password);
|
|
jsonObject.put("password", password);
|
|
|
break;
|
|
break;
|
|
|
|
|
+ case HAS_DEBLOCKED:
|
|
|
|
|
+ jsonObject.put("status", STATE_ON_HOOK_DEBLOCKED);
|
|
|
|
|
+ //用户确认已经解封,设置为等待服务器验证
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
presenter.putWebchat(id, jsonObject);
|
|
presenter.putWebchat(id, jsonObject);
|
|
|
} else {
|
|
} else {
|
|
@@ -119,20 +117,20 @@ public class CommitWxCodeAct extends BaseActivity implements CommitWxCodeMakeMon
|
|
|
et_wx_account.setText(account);
|
|
et_wx_account.setText(account);
|
|
|
String title = "提示";
|
|
String title = "提示";
|
|
|
switch (type){
|
|
switch (type){
|
|
|
- case STATE_ON_HOOK_VERIFIED:
|
|
|
|
|
|
|
+ case ALTER_CODE:
|
|
|
et_wx_account.setEnabled(false);
|
|
et_wx_account.setEnabled(false);
|
|
|
et_wx_pwd.setHint("请输入微信验证码");
|
|
et_wx_pwd.setHint("请输入微信验证码");
|
|
|
et_wx_pwd.setInputType(InputType.TYPE_CLASS_NUMBER);
|
|
et_wx_pwd.setInputType(InputType.TYPE_CLASS_NUMBER);
|
|
|
title = "提交验证码";
|
|
title = "提交验证码";
|
|
|
break;
|
|
break;
|
|
|
- case STATE_ON_HOOK_DEBLOCKED:
|
|
|
|
|
|
|
+ case ALTER_INFO:
|
|
|
|
|
+ title = "修改挂机微信信息";
|
|
|
|
|
+ break;
|
|
|
|
|
+ case HAS_DEBLOCKED:
|
|
|
et_wx_account.setEnabled(false);
|
|
et_wx_account.setEnabled(false);
|
|
|
et_wx_pwd.setVisibility(View.GONE);
|
|
et_wx_pwd.setVisibility(View.GONE);
|
|
|
tv_wx_hint.setVisibility(View.VISIBLE);
|
|
tv_wx_hint.setVisibility(View.VISIBLE);
|
|
|
break;
|
|
break;
|
|
|
- case STATE_ON_HOOK_ABNORMAL_NEXT:
|
|
|
|
|
- title = "修改挂机微信信息";
|
|
|
|
|
- break;
|
|
|
|
|
}
|
|
}
|
|
|
TitleBarUtils.getInstance()
|
|
TitleBarUtils.getInstance()
|
|
|
.setTitle(activity, title)
|
|
.setTitle(activity, title)
|