package cn.muchinfo.rma.netManage.work.manage

import cn.muchinfo.rma.netManage.work.service.ApiService
import cn.muchinfo.rma.view.base.utils.RetrofitClient

/**
 *   @auther : lbl
 *   time   : 2021/1/02
 */
class ApiManage{

    private val mService by lazy { RetrofitClient.getInstance().create(ApiService::class.java) }

    suspend fun getBannerData() = mService.getBanner()

    companion object{
        @Volatile
        private var apiManage: ApiManage? = null

        fun getInstance() = apiManage ?: synchronized(this) {
            apiManage ?: ApiManage().also { apiManage = it }
        }

    }

}