| | |
| | | R.color.slab_green_over |
| | | ) |
| | | Handler(Looper.getMainLooper()).post { |
| | | if (isPlay) |
| | | { |
| | | if (isPlay) { |
| | | return@post |
| | | } |
| | | isPlay = true |
| | | MyApplication.getTTsManager().setVideoText("乘客已支付"+orderBean?.data?.orderMoney.toString()+"元") |
| | | MyApplication.getTTsManager() |
| | | .setVideoText("乘客已支付" + orderBean?.data?.orderMoney.toString() + "元") |
| | | time = timeOver(20000) { |
| | | tv_title_slab.text = "已完成($it)" |
| | | if (it == 0) { |
| | |
| | | R.color.slab_green_over |
| | | ) |
| | | Handler(Looper.getMainLooper()).post { |
| | | if (isPlay) |
| | | { |
| | | if (isPlay) { |
| | | return@post |
| | | } |
| | | isPlay = true |
| | | MyApplication.getTTsManager().setVideoText("乘客已支付"+ orderBean.data?.orderMoney.toString()+"元") |
| | | MyApplication.getTTsManager() |
| | | .setVideoText("乘客已支付" + orderBean.data?.orderMoney.toString() + "元") |
| | | time = timeOver(20000) { |
| | | tv_title_slab.text = "已完成($it)" |
| | | if (it == 0) { |
| | |
| | | tv_to_main.clickDelay { |
| | | onBackPressed() |
| | | } |
| | | |
| | | tv_complete.clickDelay { |
| | | callComplete() { |
| | | tv_complete.gone() |
| | | tv_pay_result_money.textColor( |
| | | this@SlabOrderOverActivity, |
| | | R.color.slab_green_over |
| | | ) |
| | | Handler(Looper.getMainLooper()).post { |
| | | if (isPlay) { |
| | | return@post |
| | | } |
| | | isPlay = true |
| | | MyApplication.getTTsManager() |
| | | .setVideoText("乘客已支付" + orderBean.data?.orderMoney.toString() + "元") |
| | | time = timeOver(20000) { |
| | | tv_title_slab.text = "已完成($it)" |
| | | if (it == 0) { |
| | | if (time != null) { |
| | | time!!.cancel() |
| | | } |
| | | try { |
| | | onBackPressed() |
| | | } catch (e: Exception) { |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | private fun callComplete(function: () -> Unit) { |
| | | var map = getMapByAny() |
| | | map["orderId"] = orderId |
| | | map["orderType"] = orderType |
| | | callNet(Api.completeOrder,map,{ |
| | | function() |
| | | }){ |
| | | |
| | | } |
| | | } |
| | | } |