package com.zj365.mime.vm

import androidx.lifecycle.MutableLiveData
import com.xty.base.vm.BaseVm
import com.xty.network.model.RespBody
import com.xty.network.model.VersionBean
import org.json.JSONObject

class VersionVm: BaseVm() {
    val versionLive by lazy{MutableLiveData<RespBody<MutableList<VersionBean>>>()}
    fun getVersion(){
        startHttp {
            var json=JSONObject()
            json.put("type","0")
            var response=apiInterface().getVersionList(retrofits.getRequestBody(json.toString()))
            response.getCodeStatus(versionLive,nowData)
        }
    }
}