

package com.mayi.fastdevelop.commonpage.login;


import com.mayi.fastdevelop.api.UserAPI;
import com.mayi.fastdevelop.base.BasePresenter;
import com.mayi.fastdevelop.base.BaseView;
import com.mayi.fastdevelop.bean.UserInfo;

/**
 * 登录规范类
 */
public class LoginContract {

    public interface View extends BaseView {
        /**
         * 登录成功
         *
         * @param userInfo 用户信息
         */
        void loginSuccess(UserInfo userInfo);

        /**
         * 登录失败
         *
         * @param msg 失败原因
         */
        void loginFailure(String msg);
    }

    public static abstract class Presenter extends BasePresenter<UserAPI, View> {
        /**
         * 登录
         */
        public abstract void login(String mobile, String password);
    }
}
