SubWithdraw 提现中 pending 显示
This commit is contained in:
parent
096138fc89
commit
4f624189c8
|
|
@ -192,7 +192,7 @@ class WatchAdActivity : AppViewsEmptyViewModelActivity<ViewBinding>(), OnTabStyl
|
||||||
if (!mIsLoadSuccess) {
|
if (!mIsLoadSuccess) {
|
||||||
handleLoadFailed()
|
handleLoadFailed()
|
||||||
}
|
}
|
||||||
}, 30000)
|
}, 3000)
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,10 @@ class WithDrawSubActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
|
||||||
updateUI()
|
updateUI()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VididinEvents.EVENT_WITHDRAW_ITEM_LIST_CHANGED -> {
|
||||||
|
updateUI()
|
||||||
|
}
|
||||||
|
|
||||||
VididinEvents.EVENT_WITHDRAW_RESULT_UPDATED -> {
|
VididinEvents.EVENT_WITHDRAW_RESULT_UPDATED -> {
|
||||||
try {
|
try {
|
||||||
val record = data.mData as RecordCash
|
val record = data.mData as RecordCash
|
||||||
|
|
@ -159,7 +163,8 @@ class WithDrawSubActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
|
||||||
}, VididinEvents.EVENT_AD_WATCHED_FOR_WITHDRAW_BIG,
|
}, VididinEvents.EVENT_AD_WATCHED_FOR_WITHDRAW_BIG,
|
||||||
VididinEvents.EVENT_WITHDRAW_SUB_ITEM_PROGRESS_UPDATED,
|
VididinEvents.EVENT_WITHDRAW_SUB_ITEM_PROGRESS_UPDATED,
|
||||||
VididinEvents.EVENT_WITHDRAW_SELECTED_SUB_ITEM_CHANGED,
|
VididinEvents.EVENT_WITHDRAW_SELECTED_SUB_ITEM_CHANGED,
|
||||||
VididinEvents.EVENT_WITHDRAW_RESULT_UPDATED )
|
VididinEvents.EVENT_WITHDRAW_RESULT_UPDATED,
|
||||||
|
VididinEvents.EVENT_WITHDRAW_ITEM_LIST_CHANGED)
|
||||||
|
|
||||||
|
|
||||||
mCurItem = WithdrawManager.instance().getItem(mType)
|
mCurItem = WithdrawManager.instance().getItem(mType)
|
||||||
|
|
@ -236,7 +241,7 @@ class WithDrawSubActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
|
||||||
flAction.alpha = 0.6F
|
flAction.alpha = 0.6F
|
||||||
}
|
}
|
||||||
|
|
||||||
WithdrawManager.STATE_HAS_WITHDRAWED -> {
|
WithdrawManager.STATE_WITHDRAW_SUCCESS -> {
|
||||||
actionText = R.string.withdraw_success
|
actionText = R.string.withdraw_success
|
||||||
flAction.isClickable = false
|
flAction.isClickable = false
|
||||||
flAction.alpha = 0.6F
|
flAction.alpha = 0.6F
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,7 @@ class WithdrawManager private constructor() {
|
||||||
const val STATE_NEED_WATCH_AD: Int = 0
|
const val STATE_NEED_WATCH_AD: Int = 0
|
||||||
const val STATE_COULD_WITHDRAW: Int = 1
|
const val STATE_COULD_WITHDRAW: Int = 1
|
||||||
const val STATE_WITHDRAWING: Int = 2
|
const val STATE_WITHDRAWING: Int = 2
|
||||||
const val STATE_HAS_WITHDRAWED: Int = 3
|
const val STATE_WITHDRAW_SUCCESS: Int = 3
|
||||||
const val STATE_WITHDRAW_SUCCESS: Int = 4
|
|
||||||
|
|
||||||
// 提现交易状态 提现状态 0: 未启动 1:提现中,2:提现成功,3:提现失败
|
// 提现交易状态 提现状态 0: 未启动 1:提现中,2:提现成功,3:提现失败
|
||||||
const val TRANSACTION_STATE_UNSTART : Int = 0
|
const val TRANSACTION_STATE_UNSTART : Int = 0
|
||||||
|
|
@ -235,7 +234,7 @@ class WithdrawManager private constructor() {
|
||||||
} else {
|
} else {
|
||||||
var allSubItemFinish = true
|
var allSubItemFinish = true
|
||||||
mWithdrawItemList[itemIndex].subItemList.forEach {
|
mWithdrawItemList[itemIndex].subItemList.forEach {
|
||||||
if (it.withdrawState != STATE_HAS_WITHDRAWED) {
|
if (it.withdrawState != STATE_WITHDRAW_SUCCESS) {
|
||||||
allSubItemFinish = false
|
allSubItemFinish = false
|
||||||
return@forEach
|
return@forEach
|
||||||
}
|
}
|
||||||
|
|
@ -675,7 +674,7 @@ class WithdrawManager private constructor() {
|
||||||
withdrawRecord.hasShowResultDialog = false
|
withdrawRecord.hasShowResultDialog = false
|
||||||
|
|
||||||
RecordsManager.instance().updateCashRecord(withdrawRecord)
|
RecordsManager.instance().updateCashRecord(withdrawRecord)
|
||||||
updateItemState(withdrawRecord.withdrawItemIndex, withdrawRecord.withdrawItemSubIndex, STATE_WITHDRAW_SUCCESS)
|
updateItemState(withdrawRecord.withdrawItemIndex, withdrawRecord.withdrawItemSubIndex, STATE_COULD_WITHDRAW)
|
||||||
|
|
||||||
// 2. 事件通知以便更新UI
|
// 2. 事件通知以便更新UI
|
||||||
notifyWithdrawResult(withdrawRecord)
|
notifyWithdrawResult(withdrawRecord)
|
||||||
|
|
@ -697,7 +696,7 @@ class WithdrawManager private constructor() {
|
||||||
// 1. 更新record 并保存
|
// 1. 更新record 并保存
|
||||||
withdrawRecord.withdrawState = TRANSACTION_STATE_SUCCESS
|
withdrawRecord.withdrawState = TRANSACTION_STATE_SUCCESS
|
||||||
RecordsManager.instance().updateCashRecord(withdrawRecord)
|
RecordsManager.instance().updateCashRecord(withdrawRecord)
|
||||||
updateItemState(withdrawRecord.withdrawItemIndex, withdrawRecord.withdrawItemSubIndex, STATE_HAS_WITHDRAWED)
|
updateItemState(withdrawRecord.withdrawItemIndex, withdrawRecord.withdrawItemSubIndex, STATE_WITHDRAW_SUCCESS)
|
||||||
|
|
||||||
// 2. 更新取现 条目状态
|
// 2. 更新取现 条目状态
|
||||||
if (withdrawRecord.withdrawItemIndex >= 0) {
|
if (withdrawRecord.withdrawItemIndex >= 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue