f90dc2637a8d6468f0e37a29eff80a6a803d75a4.svn-base 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. package eVVM.apk.ui.My.information;
  2. import eVVM.apk.mvp.MvpPresenter;
  3. import eVVM.apk.ui.bean.VerificationCodeBean;
  4. /**
  5. * Created by Android Studio.
  6. * User: zbb
  7. * Date: 2019/6/3
  8. * Describe: InformationPresenter
  9. */
  10. public class InformationPresenter extends MvpPresenter<InformationContract.View> implements InformationContract.Presenter, InformationOnListener {
  11. private InformationModel informationModel;
  12. @Override
  13. public void start() {
  14. informationModel = new InformationModel();
  15. }
  16. @Override
  17. public void information(String telephone, String userName, String code, String password, String email) {
  18. informationModel.setListener(this);
  19. informationModel.information(telephone, userName, code, password, email);
  20. }
  21. @Override
  22. public void getCode(String telephone, int type) {
  23. informationModel.setListener(this);
  24. informationModel.getCode(telephone, type);
  25. }
  26. @Override
  27. public void onSucceed(VerificationCodeBean data) {
  28. getView().informationSuccess(data);
  29. }
  30. @Override
  31. public void onFail(String msg) {
  32. getView().informationError(msg);
  33. }
  34. @Override
  35. public void onCodeSucceed(VerificationCodeBean codeData) {
  36. getView().getCodeSuccess(codeData);
  37. }
  38. @Override
  39. public void onCodeFail(String msg) {
  40. getView().getCodeError(msg);
  41. }
  42. }