package com.rdiot.yx485.base

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.rdiot.yx485.util.LocalCache

open class BaseViewModel : ViewModel() {
    var mErrorMessage = MutableLiveData<String>()
    val errorMessage: LiveData<String>
        get() = mErrorMessage

    protected fun getHeaders(): LinkedHashMap<String?, String?> {
        val headers = java.util.LinkedHashMap<String?, String?>()
        headers.put("Authorization", LocalCache.getToken())
        return headers
    }
}