package com.yidianling.user.ui.login.model

import com.ydl.ydlcommon.data.http.BaseResponse
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.http.LoginApiRequestUtil
import com.yidianling.user.http.request.PhoneLoginPwdParam
import com.yidianling.user.http.request.PhoneResetPwdParam
import com.yidianling.user.ui.login.contract.IInputPassWordContract
import io.reactivex.Observable

/**
 * @author jiucheng
 * @描述:
 * @Copyright Copyright (c) 2018
 * @Company 壹点灵
 * @date 2018/12/3
 */
class InputPassWordModelImpl : IInputPassWordContract.Model {
    /**
     * 重新设置密码
     */
    override fun resetPwd(param: PhoneResetPwdParam): Observable<BaseResponse<UserResponseBean>> {
        return LoginApiRequestUtil.resetPwd(param)
    }

    /**
     *  手机号密码登录
     */
    override fun userLoginByPassword(param: PhoneLoginPwdParam): Observable<BaseResponse<UserResponseBean>> {
        return LoginApiRequestUtil.userLoginByPassword(param)
    }
}