package com.xty.server.vm

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

class ScienceDetailVm:BaseVm() {
    val anyLive by lazy{MutableLiveData<RespBody<Any>>()}

    val detailLiveData by lazy { MutableLiveData<RespBody<ScienceBean>>() }
    fun startSetScore(){
        startHttp {
            var body=apiInterface().saveScore()
            body.getCodeStatus(anyLive,nowData)
        }
    }

    fun getDetailForId(id:String){

        startHttp {
            var body=apiInterface().getScinceDetail(id)
            body.getCodeStatus(detailLiveData,nowData)

        }
    }
}