提交 6d17d81a authored 作者: JarvanMo's avatar JarvanMo

fix bug

上级 bdf58bb4
......@@ -15,6 +15,7 @@
*/
package com.jarvan.fluwx.handler
import android.util.Log
import com.jarvan.fluwx.constant.WeChatPluginMethods
import com.jarvan.fluwx.constant.WechatPluginKeys
import com.tencent.mm.opensdk.modelbase.BaseResp
......@@ -39,6 +40,8 @@ object FluwxResponseHandler {
fun handleResponse(response: BaseResp) {
Log.e("tag","heeeeee")
when (response) {
is SendAuth.Resp -> handleAuthResponse(response)
is SendMessageToWX.Resp -> handleSendMessageResp(response)
......@@ -57,6 +60,8 @@ object FluwxResponseHandler {
WechatPluginKeys.PLATFORM to WechatPluginKeys.ANDROID
)
response.extMsg?.let {
// "extMsg" to response.extMsg,
result["extMsg"] = response.extMsg
......
......@@ -24,6 +24,7 @@ import com.jarvan.fluwx.handler.WXAPiHandler
import com.tencent.mm.opensdk.modelbase.BaseReq
import com.tencent.mm.opensdk.modelbase.BaseResp
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler
import java.lang.Exception
open class FluwxWXEntryActivity : Activity(), IWXAPIEventHandler {
......@@ -35,15 +36,26 @@ open class FluwxWXEntryActivity : Activity(), IWXAPIEventHandler {
super.onCreate(savedInstanceState)
try {
WXAPiHandler.wxApi?.handleIntent(intent, this)
}catch (e:Exception){
e.printStackTrace()
finish()
}
WXAPiHandler.wxApi?.handleIntent(intent, this)
}
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
setIntent(intent)
WXAPiHandler.wxApi?.handleIntent(intent, this)
try {
WXAPiHandler.wxApi?.handleIntent(intent, this)
}catch (e:Exception){
e.printStackTrace()
finish()
}
}
......@@ -53,7 +65,6 @@ open class FluwxWXEntryActivity : Activity(), IWXAPIEventHandler {
// 第三方应用发送到微信的请求处理后的响应结果,会回调到该方法
override fun onResp(resp: BaseResp) {
FluwxResponseHandler.handleResponse(resp)
finish()
}
......
......@@ -134,7 +134,7 @@ FlutterMethodChannel *fluwxMethodChannel = nil;
if(miniProgramResp.extMsg != nil){
result[@"extMsg"] = miniProgramResp.extMsg;
}
// @"extMsg":miniProgramResp.extMsg == nil?@"":miniProgramResp.extMsg
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论