From 40f9ac00ec5e4d6363450d1c8e0b0937cc0b1de4 Mon Sep 17 00:00:00 2001 From: liugl <liugl@sinata.cn> Date: 星期四, 14 一月 2021 10:50:18 +0800 Subject: [PATCH] 1。4:处理预约单导致串单的问题 隐藏预约单 --- app/src/main/java/com/okgoincar/slab/SlabMainFragment.kt | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/okgoincar/slab/SlabMainFragment.kt b/app/src/main/java/com/okgoincar/slab/SlabMainFragment.kt index 0d7d271..4419ee9 100644 --- a/app/src/main/java/com/okgoincar/slab/SlabMainFragment.kt +++ b/app/src/main/java/com/okgoincar/slab/SlabMainFragment.kt @@ -4,7 +4,7 @@ import com.example.emanagercar.ui.base.BaseRecyclerFragment import com.okgoincar.base.MyApplication import com.okgoincar.netUtls.getMapByAny -import com.okgoincar.ui.adapter.SlabMainAdapter +import com.okgoincar.slab.adapter.SlabMainAdapter import com.okgoincar.bean.OrderListBean import com.okgoincar.netUtls.Api import com.okgoincar.netUtls.callNet @@ -13,16 +13,18 @@ class SlabMainFragment : BaseRecyclerFragment<OrderListBean.DataBean>(SlabMainAdapter()) { var state = 1 + var type = 1 var firstCallRecord = false //是否首次在进行中的列表中加入历史记录 (进行中的订单太少客户觉得太空) override fun pathUrl(): String? { - return Api.queryOrderList + return Api.queryOrderList1 } override fun mapObject(): HashMap<String?, Any?>? { var map = getMapByAny() map["state"] = state + map["type"] = type return map } @@ -60,7 +62,7 @@ override fun noShowNothing() { super.noShowNothing() - if (!firstCallRecord) { + if (!firstCallRecord && state == 1 && type == 1) { callRecord() } } @@ -70,7 +72,7 @@ map["state"] = 4 map["size"] = 10 map["pageNum"] = 1 - callNet(Api.queryMyAllOrder, map) { + callNet(Api.queryMyAllOrder1, map) { var data = gson.fromJson<OrderListBean>(it, OrderListBean::class.java) adapter.data.addAll(data.data) adapter.notifyDataSetChanged() -- Gitblit v1.7.1