Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
9ada1808
提交
9ada1808
authored
5月 19, 2023
作者:
JarvanMo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix runnable
上级
7c97d2d9
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
6 行增加
和
11 行删除
+6
-11
FluwxPlugin.kt
android/src/main/kotlin/com/jarvan/fluwx/FluwxPlugin.kt
+5
-6
FluwxPlugin.m
ios/Classes/FluwxPlugin.m
+1
-5
没有找到文件。
android/src/main/kotlin/com/jarvan/fluwx/FluwxPlugin.kt
浏览文件 @
9ada1808
...
@@ -2,14 +2,12 @@ package com.jarvan.fluwx
...
@@ -2,14 +2,12 @@ package com.jarvan.fluwx
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.content.Intent
import
androidx.annotation.NonNull
import
com.jarvan.fluwx.handlers.FluwxAuthHandler
import
com.jarvan.fluwx.handlers.FluwxAuthHandler
import
com.jarvan.fluwx.handlers.FluwxRequestHandler
import
com.jarvan.fluwx.handlers.FluwxRequestHandler
import
com.jarvan.fluwx.handlers.FluwxShareHandler
import
com.jarvan.fluwx.handlers.FluwxShareHandler
import
com.jarvan.fluwx.handlers.FluwxShareHandlerEmbedding
import
com.jarvan.fluwx.handlers.FluwxShareHandlerEmbedding
import
com.jarvan.fluwx.handlers.PermissionHandler
import
com.jarvan.fluwx.handlers.PermissionHandler
import
com.jarvan.fluwx.handlers.WXAPiHandler
import
com.jarvan.fluwx.handlers.WXAPiHandler
import
com.jarvan.fluwx.utils.KEY_FLUWX_REQUEST_INFO_EXT_MSG
import
com.jarvan.fluwx.utils.WXApiUtils
import
com.jarvan.fluwx.utils.WXApiUtils
import
com.jarvan.fluwx.utils.readWeChatCallbackIntent
import
com.jarvan.fluwx.utils.readWeChatCallbackIntent
import
com.tencent.mm.opensdk.modelbase.BaseReq
import
com.tencent.mm.opensdk.modelbase.BaseReq
...
@@ -362,8 +360,8 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
...
@@ -362,8 +360,8 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
req
?.
let
{
req
?.
let
{
if
(
FluwxConfigurations
.
interruptWeChatRequestByFluwx
)
{
if
(
FluwxConfigurations
.
interruptWeChatRequestByFluwx
)
{
when
(
req
)
{
when
(
req
)
{
is
ShowMessageFromWX
.
Req
->
handle
WX
ShowMessageFromWX
(
req
)
is
ShowMessageFromWX
.
Req
->
handleShowMessageFromWX
(
req
)
is
LaunchFromWX
.
Req
->
handle
WX
LaunchFromWX
(
req
)
is
LaunchFromWX
.
Req
->
handleLaunchFromWX
(
req
)
else
->
{}
else
->
{}
}
}
}
else
{
}
else
{
...
@@ -374,7 +372,7 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
...
@@ -374,7 +372,7 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
}
}
private
fun
handle
WX
ShowMessageFromWX
(
req
:
ShowMessageFromWX
.
Req
)
{
private
fun
handleShowMessageFromWX
(
req
:
ShowMessageFromWX
.
Req
)
{
val
result
=
mapOf
(
val
result
=
mapOf
(
"extMsg"
to
req
.
message
.
messageExt
,
"extMsg"
to
req
.
message
.
messageExt
,
"messageAction"
to
req
.
message
.
messageAction
,
"messageAction"
to
req
.
message
.
messageAction
,
...
@@ -387,13 +385,14 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
...
@@ -387,13 +385,14 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
fluwxChannel
?.
invokeMethod
(
"onWXShowMessageFromWX"
,
result
)
fluwxChannel
?.
invokeMethod
(
"onWXShowMessageFromWX"
,
result
)
}
}
private
fun
handle
WX
LaunchFromWX
(
req
:
LaunchFromWX
.
Req
)
{
private
fun
handleLaunchFromWX
(
req
:
LaunchFromWX
.
Req
)
{
val
result
=
mapOf
(
val
result
=
mapOf
(
"extMsg"
to
req
.
messageExt
,
"extMsg"
to
req
.
messageExt
,
"messageAction"
to
req
.
messageAction
,
"messageAction"
to
req
.
messageAction
,
"lang"
to
req
.
lang
,
"lang"
to
req
.
lang
,
"country"
to
req
.
country
,
"country"
to
req
.
country
,
)
)
extMsg
=
req
.
message
.
messageExt
fluwxChannel
?.
invokeMethod
(
"onWXLaunchFromWX"
,
result
)
fluwxChannel
?.
invokeMethod
(
"onWXLaunchFromWX"
,
result
)
}
}
...
...
ios/Classes/FluwxPlugin.m
浏览文件 @
9ada1808
...
@@ -58,10 +58,6 @@ const NSString *lang = @"lang";
...
@@ -58,10 +58,6 @@ const NSString *lang = @"lang";
const
NSString
*
country
=
@"country"
;
const
NSString
*
country
=
@"country"
;
const
NSString
*
description
=
@"description"
;
const
NSString
*
description
=
@"description"
;
FluwxWXReqRunnable
_initialWXReqRunnable
;
BOOL
handleOpenURLByFluwx
=
YES
;
BOOL
handleOpenURLByFluwx
=
YES
;
NSObject
<
FlutterPluginRegistrar
>
*
_fluwxRegistrar
;
NSObject
<
FlutterPluginRegistrar
>
*
_fluwxRegistrar
;
...
@@ -1036,7 +1032,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
...
@@ -1036,7 +1032,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
[
_channel
invokeMethod
:
@"onWXShowMessageFromWX"
arguments
:
result
];
[
_channel
invokeMethod
:
@"onWXShowMessageFromWX"
arguments
:
result
];
}
else
{
}
else
{
__weak
typeof
(
self
)
weakSelf
=
self
;
__weak
typeof
(
self
)
weakSelf
=
self
;
_
initialWXReq
Runnable
=
^
()
{
_
attemptToResumeMsgFromWx
Runnable
=
^
()
{
__strong
typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
__strong
typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
[
strongSelf
->
_channel
invokeMethod
:
@"onWXShowMessageFromWX"
arguments
:
result
];
[
strongSelf
->
_channel
invokeMethod
:
@"onWXShowMessageFromWX"
arguments
:
result
];
};
};
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论