|
@@ -23,6 +23,8 @@ import com.cooleshow.student.contract.ModifyPhoneNumContract;
|
|
|
import com.cooleshow.student.databinding.ActivityModifyPhonenumBinding;
|
|
|
import com.cooleshow.student.presenter.mine.ModifyPhoneNumPresenter;
|
|
|
import com.cooleshow.usercenter.bean.SetDetailBean;
|
|
|
+import com.cooleshow.usercenter.constants.UserConstants;
|
|
|
+import com.cooleshow.usercenter.helper.UserHelper;
|
|
|
|
|
|
|
|
|
import org.json.JSONException;
|
|
@@ -120,9 +122,11 @@ public class ModifyPhoneNumActivity extends BaseMVPActivity<ActivityModifyPhonen
|
|
|
|
|
|
@Override
|
|
|
public void updatePhoneSuccess(Object object) {
|
|
|
- Intent intent = new Intent();
|
|
|
- intent.putExtra("newPhoneNum", viewBinding.etPhoneNum.getText().toString().trim());
|
|
|
- setResult(RESULT_OK, intent);
|
|
|
+ ToastUtil.getInstance().showShort("修改成功");
|
|
|
+ UserHelper.saveUserToken("");
|
|
|
+ ARouter.getInstance().build(RouterPath.UserCenter.PATH_VERIFY_LOGIN)
|
|
|
+ .withString(UserConstants.PHONE_NUM_KEY, UserHelper.getUserPhone())
|
|
|
+ .navigation();
|
|
|
finish();
|
|
|
}
|
|
|
|
|
@@ -143,7 +147,7 @@ public class ModifyPhoneNumActivity extends BaseMVPActivity<ActivityModifyPhonen
|
|
|
}
|
|
|
|
|
|
private void sendSmsCode(String phone) {
|
|
|
- Map<String,String> jsonObject = new HashMap<>();
|
|
|
+ Map<String, String> jsonObject = new HashMap<>();
|
|
|
jsonObject.put("mobile", phone);
|
|
|
jsonObject.put("type", "PHONE");
|
|
|
presenter.sendSmsCode(jsonObject);
|