|
|
@@ -2,5 +2,17 @@ package com.grkj.iscs.presenter
|
|
|
|
|
|
import com.grkj.iscs.base.BasePresenter
|
|
|
import com.grkj.iscs.iview.IHomeView
|
|
|
+import com.grkj.iscs.model.vo.TicketPageRespVO
|
|
|
+import com.grkj.iscs.util.Executor
|
|
|
+import com.grkj.iscs.util.NetApi
|
|
|
|
|
|
-class HomePresenter : BasePresenter<IHomeView>() {}
|
|
|
+class HomePresenter : BasePresenter<IHomeView>() {
|
|
|
+
|
|
|
+ fun getTicketCount(callBack: (Int?) -> Unit) {
|
|
|
+ NetApi.getTicketPage(0, 10) {
|
|
|
+ Executor.runOnMain {
|
|
|
+ callBack.invoke(it?.total)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|