package com.xty.server.vm

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

class MyAppointmentVm: BaseVm() {
    val apponitMentBean by lazy{ MutableLiveData<RespBody<MutableList<AppointmentNewBean>>>()}
    /**
     * 状态，2，待确认3，已确认，4，已拒绝，7，已过期
     */
    fun getAppointment(type:Int=2){
        startHttp {

            var json=JSONObject()
            json.put("orderStatus",type)
            var body =apiInterface().getAppointment(retrofits.getRequestBody(json.toString()))
            body.getCodeStatus(apponitMentBean,nowData)
        }
    }
}