scopeNetLife

fun ViewModel.scopeNetLife(dispatcher: CoroutineDispatcher = Dispatchers.Main, block: suspend CoroutineScope.() -> Unit): NetCoroutineScope

ViewModel被销毁时取消协程作用域以及其中的网络请求 具备网络错误全局处理功能, 其内部的网络请求会跟随其作用域的生命周期