Commit ae2b8224 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 17fc4c26
......@@ -109,6 +109,25 @@ class RedpkgFragment : LazyLoadBaseFragment(), View.OnClickListener, RedpkgView
// R.mipmap.bg_redpkg_unenable,
// view as ImageView
// )
if (!UserManager.getInstance().alipaySet) {
// 去授权
showToast("发起支付宝授权..")
AlipayAuthManager.authV2(requireActivity(),
object : AlipayAuthManager.AuthListener {
override fun authSuccess() {
showToast("支付宝授权成功")
}
override fun authFail(resultStatus: String) {
showToast("支付宝授权失败 " + resultStatus)
}
})
return
}
currentClickRedpkg = position
redpkgPresenter.rdHongbaoClick()
}
......@@ -302,23 +321,6 @@ class RedpkgFragment : LazyLoadBaseFragment(), View.OnClickListener, RedpkgView
}
override fun rdHongbaoClickSuc(isCash: Boolean, cash: Double, unitId: String) {
if (!UserManager.getInstance().alipaySet) {
// 去授权
showToast("发起支付宝授权..")
AlipayAuthManager.authV2(requireActivity(),
object : AlipayAuthManager.AuthListener {
override fun authSuccess() {
showToast("支付宝授权成功")
}
override fun authFail(resultStatus: String) {
showToast("支付宝授权失败 " + resultStatus)
}
})
return
}
val bundle = Bundle()
bundle.putString(LoadingActivity.TEXT, "正在为您发放奖励..")
readyGo(LoadingActivity::class.java, bundle)
......
......@@ -313,13 +313,17 @@ class DrawCashFragment : LazyLoadBaseFragment(), DrawCashView, DrawCashAdapter.O
TrackManager.getInstance().addCashoutReq(currentDrawInfo?.unitId)
Handler(Looper.getMainLooper()).postDelayed({
showToast("提现成功")
}, 800)
}, 1000)
}
Constant.CARRIERTYPE_REWARD_COIN -> {
Handler(Looper.getMainLooper()).postDelayed({
onFragmentResume()
}, 1000)
}
Constant.CARRIERTYPE_REWARD_DI -> {
Handler(Looper.getMainLooper()).postDelayed({
onFragmentResume()
}, 1000)
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment