如果还有未知结果 交易,轮询check
This commit is contained in:
parent
c0cd9cce33
commit
b09e9718a0
|
|
@ -271,13 +271,15 @@ class WithDrawActivity : AppViewsEmptyViewModelActivity<ViewBinding>(), OnTabSty
|
|||
when (checkResult.status) {
|
||||
// 提现状态 1:提现中,2:提现成功,3:提现失败
|
||||
1 -> {
|
||||
// try again
|
||||
|
||||
}
|
||||
2 -> {
|
||||
showSuccessDialog(cashNum)
|
||||
updateRecord(recordNo, checkResult)
|
||||
}
|
||||
3 -> {
|
||||
errHintRes = R.string.withdraw_normal_fail
|
||||
updateRecord(recordNo, checkResult)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -370,6 +372,12 @@ class WithDrawActivity : AppViewsEmptyViewModelActivity<ViewBinding>(), OnTabSty
|
|||
requestCheck(record.recordNo, record.cashNum)
|
||||
}
|
||||
}
|
||||
|
||||
binding.root.postDelayed(object : Runnable {
|
||||
override fun run() {
|
||||
checkTransactionState()
|
||||
}
|
||||
}, CHECK_DURATION)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -378,6 +386,7 @@ class WithDrawActivity : AppViewsEmptyViewModelActivity<ViewBinding>(), OnTabSty
|
|||
companion object {
|
||||
const val INIT_ACTIVE = 1
|
||||
const val FINAL_STATE_ONGING = 1
|
||||
const val CHECK_DURATION = 10*1000L
|
||||
|
||||
internal fun startActivity(activity: Activity) {
|
||||
activity.startActivity(Intent(activity.applicationContext, WithDrawActivity::class.java))
|
||||
|
|
|
|||
Loading…
Reference in New Issue