Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
4857505b
提交
4857505b
authored
1月 12, 2021
作者:
JarvanMo
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of
https://github.com/OpenFlutter/fluwx
into dev
# Conflicts: # doc/QA_CN.md
上级
52ca746a
df108699
全部展开
显示空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
76 行增加
和
7 行删除
+76
-7
.gitignore
.gitignore
+3
-0
CHANGELOG.md
CHANGELOG.md
+3
-0
AndroidManifest.xml
android/src/main/AndroidManifest.xml
+2
-0
FluwxPlugin.kt
android/src/main/kotlin/com/jarvan/fluwx/FluwxPlugin.kt
+2
-0
FluwxRequestHandler.kt
...n/kotlin/com/jarvan/fluwx/handlers/FluwxRequestHandler.kt
+40
-0
FluwxWXEntryActivity.kt
...ain/kotlin/com/jarvan/fluwx/wxapi/FluwxWXEntryActivity.kt
+3
-0
BASIC_KNOWLEDGE.md
doc/BASIC_KNOWLEDGE.md
+2
-2
BASIC_KNOWLEDGE_CN.md
doc/BASIC_KNOWLEDGE_CN.md
+2
-2
QA_CN.md
doc/QA_CN.md
+0
-0
Podfile.lock
example/ios/Podfile.lock
+1
-1
pubspec.lock
example/pubspec.lock
+1
-1
FluwxResponseHandler.m
ios/Classes/FluwxResponseHandler.m
+5
-0
wechat_response.dart
lib/src/response/wechat_response.dart
+11
-0
pubspec.yaml
pubspec.yaml
+1
-1
没有找到文件。
.gitignore
浏览文件 @
4857505b
...
...
@@ -21,3 +21,5 @@ example/android/.settings/org.eclipse.buildship.core.prefs
example/android/app/.classpath
example/android/app/.project
example/android/app/.settings/org.eclipse.buildship.core.prefs
example/Podfile.lock
.last_build_id
\ No newline at end of file
CHANGELOG.md
浏览文件 @
4857505b
## 2.5.0
*
App获取开放标签
<wx-open-launch-app>
中的extinfo数据
## 2.4.2
*
Fix #317
...
...
android/src/main/AndroidManifest.xml
浏览文件 @
4857505b
...
...
@@ -10,6 +10,7 @@
<activity
android:name=
".wxapi.FluwxWXEntryActivity"
android:launchMode=
"singleTask"
android:taskAffinity=
"${applicationId}"
android:theme=
"@style/DisablePreviewTheme"
/>
<activity-alias
...
...
@@ -17,6 +18,7 @@
android:exported=
"true"
android:launchMode=
"singleTop"
android:targetActivity=
"com.jarvan.fluwx.wxapi.FluwxWXEntryActivity"
android:taskAffinity=
"${applicationId}"
android:theme=
"@style/DisablePreviewTheme"
>
<intent-filter>
...
...
android/src/main/kotlin/com/jarvan/fluwx/FluwxPlugin.kt
浏览文件 @
4857505b
...
...
@@ -24,6 +24,7 @@ public class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
val
channel
=
MethodChannel
(
registrar
.
messenger
(),
"com.jarvanmo/fluwx"
)
val
authHandler
=
FluwxAuthHandler
(
channel
)
FluwxResponseHandler
.
setMethodChannel
(
channel
)
FluwxRequestHandler
.
setMethodChannel
(
channel
)
WXAPiHandler
.
setContext
(
registrar
.
activity
().
applicationContext
)
channel
.
setMethodCallHandler
(
FluwxPlugin
().
apply
{
this
.
authHandler
=
authHandler
...
...
@@ -42,6 +43,7 @@ public class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
val
channel
=
MethodChannel
(
flutterPluginBinding
.
binaryMessenger
,
"com.jarvanmo/fluwx"
)
channel
.
setMethodCallHandler
(
this
)
FluwxResponseHandler
.
setMethodChannel
(
channel
)
FluwxRequestHandler
.
setMethodChannel
(
channel
)
authHandler
=
FluwxAuthHandler
(
channel
)
shareHandler
=
FluwxShareHandlerEmbedding
(
flutterPluginBinding
.
flutterAssets
,
flutterPluginBinding
.
applicationContext
)
}
...
...
android/src/main/kotlin/com/jarvan/fluwx/handlers/FluwxRequestHandler.kt
0 → 100644
浏览文件 @
4857505b
/*
* Copyright (C) 2020 The OpenFlutter Organization
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com.jarvan.fluwx.handlers
import
com.tencent.mm.opensdk.modelmsg.ShowMessageFromWX
import
io.flutter.plugin.common.MethodChannel
import
com.tencent.mm.opensdk.modelbase.BaseReq
object
FluwxRequestHandler
{
private
var
channel
:
MethodChannel
?
=
null
fun
setMethodChannel
(
channel
:
MethodChannel
)
{
FluwxRequestHandler
.
channel
=
channel
}
fun
handleRequest
(
req
:
BaseReq
)
{
when
(
req
)
{
is
ShowMessageFromWX
.
Req
->
hanleWXShowMessageFromWX
(
req
)
}
}
private
fun
hanleWXShowMessageFromWX
(
req
:
ShowMessageFromWX
.
Req
)
{
val
result
=
mapOf
(
"extMsg"
to
req
.
message
.
messageExt
,
)
channel
?.
invokeMethod
(
"onWXShowMessageFromWX"
,
result
)
}
}
\ No newline at end of file
android/src/main/kotlin/com/jarvan/fluwx/wxapi/FluwxWXEntryActivity.kt
浏览文件 @
4857505b
...
...
@@ -19,9 +19,11 @@ import android.app.Activity
import
android.content.Intent
import
android.os.Bundle
import
com.jarvan.fluwx.handlers.FluwxResponseHandler
import
com.jarvan.fluwx.handlers.FluwxRequestHandler
import
com.jarvan.fluwx.handlers.WXAPiHandler
import
com.tencent.mm.opensdk.modelbase.BaseReq
import
com.tencent.mm.opensdk.modelbase.BaseResp
import
com.tencent.mm.opensdk.modelmsg.ShowMessageFromWX
import
com.tencent.mm.opensdk.openapi.IWXAPIEventHandler
...
...
@@ -61,6 +63,7 @@ open class FluwxWXEntryActivity : Activity(), IWXAPIEventHandler {
// 稳定复现场景:微信版本为7.0.5,小程序SDK为2.7.7
if
(
baseReq
.
type
==
4
)
{
// com.tencent.mm.opensdk.constants.ConstantsAPI.COMMAND_SHOWMESSAGE_FROM_WX = 4
FluwxRequestHandler
.
handleRequest
(
baseReq
)
startSpecifiedActivity
()
}
}
...
...
doc/BASIC_KNOWLEDGE.md
浏览文件 @
4857505b
...
...
@@ -5,8 +5,8 @@ Actually, almost every result from functions like `shareToWeChat` or `payWithWeC
So if you want get the real result you shall do like this:
```
dart
weChatResponseEventHandler
.
listen
((
res
)
{
if
(
res
is
WeChatPaymentResponse
)
{
fluwx
.
weChatResponseEventHandler
.
listen
((
res
)
{
if
(
res
is
fluwx
.
WeChatPaymentResponse
)
{
// do something here
}
});
...
...
doc/BASIC_KNOWLEDGE_CN.md
浏览文件 @
4857505b
...
...
@@ -6,8 +6,8 @@
为了获取真实的回调,你应该这样做:
```
dart
weChatResponseEventHandler
.
listen
((
res
)
{
if
(
res
is
WeChatPaymentResponse
)
{
fluwx
.
weChatResponseEventHandler
.
listen
((
res
)
{
if
(
res
is
fluwx
.
WeChatPaymentResponse
)
{
// do something here
}
});
...
...
doc/QA_CN.md
浏览文件 @
4857505b
差异被折叠。
点击展开。
example/ios/Podfile.lock
浏览文件 @
4857505b
...
...
@@ -26,4 +26,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 8e679eca47255a8ca8067c4c67aab20e64cb974d
COCOAPODS: 1.
9.1
COCOAPODS: 1.
10.0
example/pubspec.lock
浏览文件 @
4857505b
...
...
@@ -73,7 +73,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.4.
0
"
version: "2.4.
2
"
matcher:
dependency: transitive
description:
...
...
ios/Classes/FluwxResponseHandler.m
浏览文件 @
4857505b
...
...
@@ -212,5 +212,10 @@ FlutterMethodChannel *fluwxMethodChannel = nil;
[
_delegate
managerDidRecvLaunchFromWXReq
:
launchReq
];
}
}
LaunchFromWXReq
*
launchFromWXReq
=
(
LaunchFromWXReq
*
)
req
;
NSDictionary
*
result
=
@{
@"extMsg"
:
launchFromWXReq
.
message
.
messageExt
};
[
fluwxMethodChannel
invokeMethod
:
@"onWXShowMessageFromWX"
arguments
:
result
];
}
@end
lib/src/response/wechat_response.dart
浏览文件 @
4857505b
...
...
@@ -40,6 +40,8 @@ Map<String, _WeChatResponseInvoker> _nameAndResponseMapper = {
WeChatAuthGotQRCodeResponse
.
fromMap
(
argument
),
"onQRCodeScanned"
:
(
Map
argument
)
=>
WeChatQRCodeScannedResponse
.
fromMap
(
argument
),
"onWXShowMessageFromWX"
:
(
Map
argument
)
=>
WeChatShowMessageFromWXRequest
.
fromMap
(
argument
),
};
class
BaseWeChatResponse
{
...
...
@@ -173,6 +175,15 @@ class WeChatQRCodeScannedResponse extends BaseWeChatResponse {
:
super
.
_
(
map
[
_errCode
],
map
[
_errStr
]);
}
// 获取微信打开App时携带的参数
class
WeChatShowMessageFromWXRequest
extends
BaseWeChatResponse
{
final
String
extMsg
;
WeChatShowMessageFromWXRequest
.
fromMap
(
Map
map
)
:
extMsg
=
map
[
"extMsg"
],
super
.
_
(
0
,
''
);
}
///WechatAuth_Err_OK(0),
///WechatAuth_Err_NormalErr(-1),
///WechatAuth_Err_NetworkErr(-2),
...
...
pubspec.yaml
浏览文件 @
4857505b
name
:
fluwx
description
:
The capability of implementing WeChat SDKs in Flutter. With Fluwx, developers can use WeChatSDK easily, such as sharing, payment, lanuch mini program and etc.
version
:
2.
4.2
version
:
2.
5.0
homepage
:
https://github.com/JarvanMo/fluwx
environment
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论