Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
37c75264
提交
37c75264
authored
11月 22, 2020
作者:
JarvanMo
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of github.com:OpenFlutter/fluwx into dev
# Conflicts: # CHANGELOG.md # pubspec.yaml
上级
e210c9de
7b74b14a
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
30 行增加
和
6 行删除
+30
-6
CHANGELOG.md
CHANGELOG.md
+4
-0
build.gradle
android/build.gradle
+1
-1
FluwxShareHandler.kt
...ain/kotlin/com/jarvan/fluwx/handlers/FluwxShareHandler.kt
+1
-4
build.gradle
example/android/app/build.gradle
+1
-0
FluwxAuthHandler.h
ios/Classes/FluwxAuthHandler.h
+2
-0
FluwxAuthHandler.m
ios/Classes/FluwxAuthHandler.m
+10
-0
FluwxPlugin.m
ios/Classes/FluwxPlugin.m
+3
-0
fluwx_iml.dart
lib/src/fluwx_iml.dart
+7
-0
pubspec.yaml
pubspec.yaml
+1
-1
没有找到文件。
CHANGELOG.md
浏览文件 @
37c75264
## 2.4.0
*
支持compressThumbnail
*
升级OkHttp
## 2.3.1
*
修复Android 11无法分享图片的问题
...
...
android/build.gradle
浏览文件 @
37c75264
...
...
@@ -47,6 +47,6 @@ dependencies {
implementation
'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.8'
implementation
'androidx.appcompat:appcompat:1.2.0'
implementation
'top.zibin:Luban:1.1.8'
implementation
'com.squareup.okhttp3:okhttp:4.
8
.0'
implementation
'com.squareup.okhttp3:okhttp:4.
9
.0'
testImplementation
'junit:junit:4.12'
}
android/src/main/kotlin/com/jarvan/fluwx/handlers/FluwxShareHandler.kt
浏览文件 @
37c75264
...
...
@@ -134,7 +134,7 @@ internal interface FluwxShareHandler : CoroutineScope {
sourceByteArray
.
isEmpty
()
->
{
WXImageObject
()
}
sourceByteArray
.
size
>
500
*
1024
->
{
else
->
{
WXImageObject
().
apply
{
if
(
supportFileProvider
&&
targetHigherThanN
)
{
setImagePath
(
getFileContentUri
(
sourceByteArray
.
toCacheFile
(
context
,
sourceImage
.
suffix
)))
...
...
@@ -147,9 +147,6 @@ internal interface FluwxShareHandler : CoroutineScope {
}
}
}
else
->
{
WXImageObject
(
sourceByteArray
)
}
}
val
msg
=
WXMediaMessage
()
msg
.
mediaObject
=
imageObject
...
...
example/android/app/build.gradle
浏览文件 @
37c75264
...
...
@@ -8,6 +8,7 @@ if (localPropertiesFile.exists()) {
def
flutterRoot
=
localProperties
.
getProperty
(
'flutter.sdk'
)
if
(
flutterRoot
==
null
)
{
throw
new
GradleException
(
"Flutter SDK not found. Define location with flutter.sdk in the local.properties file."
)
}
...
...
ios/Classes/FluwxAuthHandler.h
浏览文件 @
37c75264
...
...
@@ -18,4 +18,6 @@
-
(
void
)
authByQRCode
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
;
-
(
void
)
stopAuthByQRCode
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
;
-
(
void
)
handAuthByPhoneLogin
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
;
@end
ios/Classes/FluwxAuthHandler.m
浏览文件 @
37c75264
...
...
@@ -21,6 +21,16 @@ FlutterMethodChannel *_fluwxMethodChannel = nil;
return
self
;
}
-
(
void
)
handleAuthByPhoneLogin
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
{
UIViewController
*
vc
=
UIApplication
.
sharedApplication
.
keyWindow
.
rootViewController
;
SendAuthReq
*
authReq
=
[[
SendAuthReq
alloc
]
init
];
authReq
.
scope
=
call
.
arguments
[
@"scope"
];
authReq
.
state
=
(
call
.
arguments
[
@"state"
]
==
(
id
)
[
NSNull
null
])
?
nil
:
call
.
arguments
[
@"state"
];
[
WXApi
sendAuthReq
:
authReq
viewController
:
vc
delegate
:
[
FluwxResponseHandler
defaultManager
]
completion
:^
(
BOOL
success
)
{
result
(
@
(
success
));
}];
}
-
(
void
)
handleAuth
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
{
NSString
*
openId
=
call
.
arguments
[
@"openId"
];
...
...
ios/Classes/FluwxPlugin.m
浏览文件 @
37c75264
...
...
@@ -54,6 +54,8 @@ BOOL handleOpenURLByFluwx = YES;
[
self
handleSubscribeWithCall
:
call
result
:
result
];
}
else
if
([
@"autoDeduct"
isEqualToString
:
call
.
method
])
{
[
self
handleAutoDeductWithCall
:
call
result
:
result
];
}
else
if
([
@"authByPhoneLogin"
isEqualToString
:
call
.
method
]){
[
_fluwxAuthHandler
handleAuthByPhoneLogin
:
call
result
:
result
];
}
else
if
([
call
.
method
hasPrefix
:
@"share"
])
{
[
_fluwxShareHandler
handleShare
:
call
result
:
result
];
}
else
{
...
...
@@ -178,6 +180,7 @@ BOOL handleOpenURLByFluwx = YES;
}];
}
-
(
BOOL
)
application
:(
UIApplication
*
)
application
openURL
:(
NSURL
*
)
url
sourceApplication
:(
NSString
*
)
sourceApplication
annotation
:(
id
)
annotation
{
return
[
WXApi
handleOpenURL
:
url
delegate
:[
FluwxResponseHandler
defaultManager
]];
}
...
...
lib/src/fluwx_iml.dart
浏览文件 @
37c75264
...
...
@@ -240,3 +240,10 @@ Future _methodHandler(MethodCall methodCall) {
_weChatResponseEventHandlerController
.
add
(
response
);
return
Future
.
value
();
}
///IOS only
Future
<
bool
>
authWeChatByPhoneLogin
(
{
@required
String
scope
,
String
state
})
async
{
return
await
_channel
.
invokeMethod
(
"authByPhoneLogin"
,
{
"scope"
:
scope
,
"state"
:
state
});
}
pubspec.yaml
浏览文件 @
37c75264
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.
3.1
version
:
2.
4.0
homepage
:
https://github.com/JarvanMo/fluwx
environment
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论