| | |
| | | |
| | | private fun addSockectCancel() { |
| | | checkOrderStatue() |
| | | MyApplication.addOrderView(object : MyApplication.OrderStatueView { |
| | | override fun orderInfo(data: OrderSimpleData?) { |
| | | data?.let { |
| | | when(it.orderType){ |
| | | 1,2,3 -> { |
| | | if (it.status == 10 || it.status == 12) { |
| | | Handler(Looper.getMainLooper()).post { |
| | | toast("用户已取消订单") |
| | | MyApplication.getTTsManager().setVideoText("用户已取消订单") |
| | | MyApplication.currentOrderType = "" |
| | | MyApplication.currentOrderId = "" |
| | | finish() |
| | | } |
| | | } |
| | | MyApplication.addOrderView(listener) |
| | | } |
| | | private val listener=object : MyApplication.OrderStatueView { |
| | | override fun orderInfo(data: OrderSimpleData?) { |
| | | data?.let { |
| | | when(it.orderType){ |
| | | 1,2,3 -> { |
| | | if (it.status == 10 || it.status == 12) { |
| | | Handler(Looper.getMainLooper()).post { |
| | | toast("用户已取消订单") |
| | | MyApplication.getTTsManager().setVideoText("用户已取消订单") |
| | | MyApplication.currentOrderType = "" |
| | | MyApplication.currentOrderId = "" |
| | | finish() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | } |
| | | var handler: Handler? = null |
| | | fun checkOrderStatue() { |
| | | var map = getMapByAny() |
| | |
| | | handler?.removeCallbacksAndMessages(null) |
| | | } |
| | | closeTimeStart() |
| | | MyApplication.removeOrderView(listener) |
| | | } |
| | | |
| | | |