8.7
liugl
2020-08-07 a926b50fb8fd8995cdb5c10ec07dafcff888183b
app/src/main/java/com/okgoincar/slab/SlabOrderOverActivity.kt
@@ -15,6 +15,7 @@
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() {
@@ -42,7 +43,7 @@
    override fun onPause() {
        super.onPause()
        if (time != null){
            time!!.onFinish()
            time!!.cancel()
        }
    }
@@ -111,6 +112,7 @@
                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
@@ -148,10 +150,16 @@
                    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){
                                    if (time != null){
                                        time!!.cancel()
                                    }
                                    try {
                                    onBackPressed()
                                    }catch (e:Exception){
                                    }
                                }
                            }
                        }