| | |
| | | import com.okgoincar.netUtls.timeOver |
| | | import com.okgoincar.utils.MyUtils |
| | | import kotlinx.android.synthetic.main.activity_order_over.* |
| | | import java.lang.Exception |
| | | |
| | | class SlabOrderOverActivity : MySlabBaseActivity() { |
| | | |
| | |
| | | override fun onPause() { |
| | | super.onPause() |
| | | if (time != null){ |
| | | time!!.onFinish() |
| | | time!!.cancel() |
| | | } |
| | | } |
| | | |
| | |
| | | MyUtils.getInstans().CallPhone(this, it.data.phone.toString()) |
| | | } |
| | | tv_pay_result_money.text = "¥" + it.data.orderMoney.toString() |
| | | tv_pay_result_small_money.text = "¥" + it.data.tipMoney.toString() |
| | | tv_time.text = it.data.travelTime |
| | | tv_start_address.text = it.data.startAddress |
| | | tv_end_address.text = it.data.endAddress |
| | |
| | | if (it.status == 8||it.status == 7) { |
| | | tv_pay_result_money.textColor(this@SlabOrderOverActivity,R.color.slab_green_over) |
| | | Handler(Looper.getMainLooper()).post { |
| | | time = timeOver (5000){ |
| | | time = timeOver (20000){ |
| | | tv_title_slab.text = "已完成($it)" |
| | | if (it == 0){ |
| | | onBackPressed() |
| | | if (time != null){ |
| | | time!!.cancel() |
| | | } |
| | | try { |
| | | onBackPressed() |
| | | }catch (e:Exception){ |
| | | } |
| | | } |
| | | } |
| | | } |