package com.quansu.heifengwuliu.vmodel

import androidx.lifecycle.MutableLiveData
import com.quansu.heifengwuliu.model.User
import com.quansu.heifengwuliu.repository.HomeRepository
import com.ysnows.base.base.BViewModel

open class HomeVModel : BViewModel<HomeRepository>() {
    val user: MutableLiveData<User> = MutableLiveData<User>(User.get())

    override fun firstReq() {
        super.firstReq()
        repository()
                .getUserInfo()
                .doOnNext {
                    user.value = it
                }
                .subscribe()
    }

}
