feat:完成mycard支付结果回调处理
This commit is contained in:
@@ -355,6 +355,24 @@
|
|||||||
android:name=".ui.webview.CommonWebViewActivity"
|
android:name=".ui.webview.CommonWebViewActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="adjustPan" />
|
android:windowSoftInputMode="adjustPan" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.wallet.PaymentResultActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:launchMode="singleTask"
|
||||||
|
android:theme="@style/transparent_activity"
|
||||||
|
android:windowSoftInputMode="adjustPan">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
|
||||||
|
<data
|
||||||
|
android:host="payment"
|
||||||
|
android:path="/result"
|
||||||
|
android:scheme="pekoapp" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.webview.SimpleWebViewActivity"
|
android:name=".ui.webview.SimpleWebViewActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
|
@@ -0,0 +1,55 @@
|
|||||||
|
package com.yizhuan.erban.ui.wallet
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.chuhai.utils.log.ILog
|
||||||
|
import com.yizhuan.erban.application.XChatApplication
|
||||||
|
import com.yizhuan.erban.other.activity.SplashActivity
|
||||||
|
import com.yizhuan.xchat_android_core.auth.AuthModel
|
||||||
|
import com.yizhuan.xchat_android_core.pay.PayModel
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Max on 2024/1/31 10:50
|
||||||
|
* Desc:
|
||||||
|
**/
|
||||||
|
class PaymentResultActivity : Activity(), ILog {
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
logD("onCreate()")
|
||||||
|
handler(intent)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun handler(intent: Intent?) {
|
||||||
|
val uri = intent?.data
|
||||||
|
logD("handler() uri:${uri}")
|
||||||
|
if (XChatApplication.gStack.activityNum == 1) {
|
||||||
|
logD("handler() open->splash")
|
||||||
|
SplashActivity.start(this)
|
||||||
|
finish()
|
||||||
|
} else {
|
||||||
|
val status = uri?.getQueryParameter("status")?.toIntOrNull()
|
||||||
|
logD("handler() status:$status")
|
||||||
|
if (status == 1) {
|
||||||
|
PayModel.get().getWalletInfo(AuthModel.get().currentUid).subscribe()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNewIntent(intent: Intent?) {
|
||||||
|
super.onNewIntent(intent)
|
||||||
|
logD("onNewIntent()")
|
||||||
|
handler(intent)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
super.onDestroy()
|
||||||
|
logD("onDestroy()")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getLogTag(): String {
|
||||||
|
return super.getLogTag()
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user