package com.zj365.health.vm

import androidx.lifecycle.MutableLiveData
import com.xty.base.vm.BaseVm
import com.xty.network.model.RankBean
import com.xty.network.model.RespBody

class RankListVm:BaseVm() {
    val rankLive by lazy{MutableLiveData<RespBody<RankBean>>()}
    val stepRankLive by lazy{MutableLiveData<RespBody<RankBean>>()}
    fun getRank(type:Int){
        startHttp {
           var respnse= apiInterface().getRankList("$type")
            respnse.getCodeStatus(rankLive,nowData)
        }
    }

    fun getStepRank(type:Int,userId:String){
        startHttp {
            var respnse= apiInterface().getStepRankList(type.toString(),userId)
            respnse.getCodeStatus(stepRankLive,nowData)
        }
    }
}