package com.zj365.dc.vm

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

class DeviceChoiceVm:BaseVm() {

    val deviceTypeListLiveData by lazy { MutableLiveData<RespBody<MutableList<DeviceBean>>> ()}

    fun getDeviceType(){
        startHttp {
            var json = JSONObject()
            val response = apiInterface().getDeviceTypeList(retrofits.getRequestBody(json.toString()))
            response.getCodeStatus(deviceTypeListLiveData, nowData)
        }
    }

}