package com.zj365.health.vm

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

class EarlyAWarringVm: BaseVm() {
    val warringLive by lazy{MutableLiveData<RespBody<WarringBean>>()}
    fun getEarlyWarring(id:String){
        startHttp {
            var json=JSONObject()
            json.put("id",id)
           var response= apiInterface().getEarlyWarring(retrofits.getRequestBody(json.toString()))
         //   response.getCodeStatus(warringLive,nowData)
        }
    }
    fun earlyDesc(id:String){
        startHttp {
            var json=JSONObject()
            json.put("id",id)
           var response= apiInterface().earlyDesc(retrofits.getRequestBody(json.toString()))
          response.getCodeStatus(warringLive,nowData)
        }
    }
}