Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
e9e21b74
提交
e9e21b74
authored
5月 22, 2019
作者:
jieliu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add sign auto-deduct
上级
732dfa1b
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
264 行增加
和
6 行删除
+264
-6
FluwxPlugin.kt
android/src/main/kotlin/com/jarvan/fluwx/FluwxPlugin.kt
+6
-0
WeChatPluginMethods.java
...kotlin/com/jarvan/fluwx/constant/WeChatPluginMethods.java
+2
-0
FluwxAutoDeductHandler.kt
...kotlin/com/jarvan/fluwx/handler/FluwxAutoDeductHandler.kt
+45
-0
Podfile.lock
example/ios/Podfile.lock
+3
-3
project.pbxproj
example/ios/Runner.xcodeproj/project.pbxproj
+2
-2
FluwxPlugin.m
ios/Classes/FluwxPlugin.m
+7
-0
FluwxAutoDeductHandler.m
ios/Classes/handler/FluwxAutoDeductHandler.m
+54
-0
FluwxAutoDeductHandler.h
ios/Classes/public/FluwxAutoDeductHandler.h
+18
-0
WXApiObject.h
ios/Classes/public/WXApiObject.h
+1
-1
README.txt
ios/README.txt
+98
-0
libWeChatSDK.a
ios/libWeChatSDK.a
+0
-0
fluwx_iml.dart
lib/src/fluwx_iml.dart
+28
-0
没有找到文件。
android/src/main/kotlin/com/jarvan/fluwx/FluwxPlugin.kt
浏览文件 @
e9e21b74
...
...
@@ -40,6 +40,7 @@ class FluwxPlugin(private val registrar: Registrar, channel: MethodChannel) : Me
private
val
fluwxPayHandler
=
FluwxPayHandler
()
private
val
fluwxLaunchMiniProgramHandler
=
FluwxLaunchMiniProgramHandler
()
private
val
fluwxSubscribeMsgHandler
=
FluwxSubscribeMsgHandler
()
private
val
fluwxAutodeducthandler
=
FluwxAutoDeductHandler
()
init
{
fluwxShareHandler
.
setRegistrar
(
registrar
)
...
...
@@ -98,6 +99,11 @@ class FluwxPlugin(private val registrar: Registrar, channel: MethodChannel) : Me
return
}
if
(
WeChatPluginMethods
.
AUTO_DEDUCT
==
call
.
method
)
{
fluwxAutodeducthandler
.
signAutoDeduct
(
call
,
result
)
return
}
if
(
call
.
method
.
startsWith
(
"share"
))
{
fluwxShareHandler
.
handle
(
call
,
result
)
}
else
{
...
...
android/src/main/kotlin/com/jarvan/fluwx/constant/WeChatPluginMethods.java
浏览文件 @
e9e21b74
...
...
@@ -26,4 +26,6 @@ public class WeChatPluginMethods {
public
static
final
String
WE_CHAT_PAY_RESPONSE
=
"onPayResponse"
;
public
static
final
String
SUBSCRIBE_MSG
=
"subscribeMsg"
;
public
static
final
String
AUTO_DEDUCT
=
"autoDeduct"
;
}
android/src/main/kotlin/com/jarvan/fluwx/handler/FluwxAutoDeductHandler.kt
0 → 100644
浏览文件 @
e9e21b74
package
com.jarvan.fluwx.handler
import
com.tencent.mm.opensdk.modelbiz.WXOpenBusinessWebview
import
io.flutter.plugin.common.MethodCall
import
io.flutter.plugin.common.MethodChannel
import
java.util.HashMap
class
FluwxAutoDeductHandler
{
fun
signAutoDeduct
(
call
:
MethodCall
,
result
:
MethodChannel
.
Result
)
{
val
appId
:
String
=
call
.
argument
<
String
>(
"appid"
)
?:
""
val
mchId
=
call
.
argument
<
String
>(
"mch_id"
)
?:
""
val
planId
=
call
.
argument
<
String
>(
"plan_id"
)
?:
""
val
contractCode
=
call
.
argument
<
String
>(
"contract_code"
)
?:
""
val
requestSerial
=
call
.
argument
<
String
>(
"request_serial"
)
?:
""
val
contractDisplayAccount
=
call
.
argument
<
String
>(
"contract_display_account"
)
?:
""
val
notifyUrl
=
call
.
argument
<
String
>(
"notify_url"
)
?:
""
val
version
=
call
.
argument
<
String
>(
"version"
)
?:
""
val
sign
=
call
.
argument
<
String
>(
"sign"
)
?:
""
val
timestamp
=
call
.
argument
<
String
>(
"timestamp"
)
?:
""
val
returnApp
=
call
.
argument
<
String
>(
"return_app"
)
?:
""
val
map
=
HashMap
<
String
,
String
>()
map
.
put
(
"appid"
,
appId
)
map
.
put
(
"mch_id"
,
mchId
)
map
.
put
(
"plan_id"
,
planId
)
map
.
put
(
"contract_code"
,
contractCode
)
map
.
put
(
"request_serial"
,
requestSerial
)
map
.
put
(
"contract_display_account"
,
contractDisplayAccount
)
map
.
put
(
"notify_url"
,
notifyUrl
)
map
.
put
(
"version"
,
version
)
map
.
put
(
"sign"
,
sign
)
map
.
put
(
"timestamp"
,
timestamp
)
map
.
put
(
"return_app"
,
returnApp
)
val
req
=
WXOpenBusinessWebview
.
Req
()
req
.
businessType
=
12
req
.
queryInfo
=
map
val
b
=
WXAPiHandler
.
wxApi
?.
sendReq
(
req
)
result
.
success
(
b
)
}
}
\ No newline at end of file
example/ios/Podfile.lock
浏览文件 @
e9e21b74
...
...
@@ -14,9 +14,9 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/fluwx/ios"
SPEC CHECKSUMS:
Flutter:
58dd7d1b27887414a370fcccb9e645c08ffd7a6a
fluwx:
19524c5e4c9c539a646407259139c9c1e4eaf9e5
Flutter:
9d0fac939486c9aba2809b7982dfdbb47a7b0296
fluwx:
9cbb1181ef8fd772f7388714ec9b5dfd3a5d0108
PODFILE CHECKSUM: 348e15598a1c6ea25d3ed63919d5ffb9bd1c2ba6
COCOAPODS: 1.
6.1
COCOAPODS: 1.
5.3
example/ios/Runner.xcodeproj/project.pbxproj
浏览文件 @
e9e21b74
...
...
@@ -279,7 +279,7 @@
files
=
(
);
inputPaths
=
(
"${
PODS_ROOT}
/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh"
,
"${
SRCROOT}/Pods
/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh"
,
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework"
,
);
name
=
"[CP] Embed Pods Frameworks"
;
...
...
@@ -288,7 +288,7 @@
);
runOnlyForDeploymentPostprocessing
=
0
;
shellPath
=
/bin/sh
;
shellScript
=
"\"${
PODS_ROOT}
/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"
;
shellScript
=
"\"${
SRCROOT}/Pods
/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"
;
showEnvVarsInLog
=
0
;
};
/* End PBXShellScriptBuildPhase section */
...
...
ios/Classes/FluwxPlugin.m
浏览文件 @
e9e21b74
...
...
@@ -10,6 +10,7 @@
#import "FluwxShareHandler.h"
#import "FluwxLaunchMiniProgramHandler.h"
#import "FluwxSubscribeMsgHandler.h"
#import "FluwxAutoDeductHandler.h"
@implementation
FluwxPlugin
...
...
@@ -23,6 +24,7 @@ FluwxWXApiHandler *_fluwxWXApiHandler;
FluwxPaymentHandler
*
_fluwxPaymentHandler
;
FluwxLaunchMiniProgramHandler
*
_fluwxLaunchMiniProgramHandler
;
FluwxSubscribeMsgHandler
*
_fluwxSubscribeMsgHandler
;
FluwxAutoDeductHandler
*
_fluwxAutoDeductHandler
;
-
(
void
)
dealloc
{
...
...
@@ -54,6 +56,7 @@ FluwxSubscribeMsgHandler *_fluwxSubscribeMsgHandler;
_fluwxPaymentHandler
=
[[
FluwxPaymentHandler
alloc
]
initWithRegistrar
:
registrar
];
_fluwxLaunchMiniProgramHandler
=
[[
FluwxLaunchMiniProgramHandler
alloc
]
initWithRegistrar
:
registrar
];
_fluwxSubscribeMsgHandler
=
[[
FluwxSubscribeMsgHandler
alloc
]
initWithRegistrar
:
registrar
];
_fluwxAutoDeductHandler
=
[[
FluwxAutoDeductHandler
alloc
]
initWithRegistrar
:
registrar
];
}
return
self
;
...
...
@@ -105,6 +108,10 @@ FluwxSubscribeMsgHandler *_fluwxSubscribeMsgHandler;
[
_fluwxAuthHandler
stopAuthByQRCode
:
call
result
:
result
];
return
;
}
if
([
@"autoDeduct"
isEqualToString
:
call
.
method
]){
[
_fluwxAutoDeductHandler
handleAutoDeductWithCall
:
call
result
:
result
];
return
;
}
if
([
call
.
method
hasPrefix
:
@"share"
])
{
[
_fluwxShareHandler
handleShare
:
call
result
:
result
];
...
...
ios/Classes/handler/FluwxAutoDeductHandler.m
0 → 100644
浏览文件 @
e9e21b74
//
// FluwxAutoDeductHandler.m
// fluwx
//
// Created by realm on 2019/5/22.
//
#import "FluwxAutoDeductHandler.h"
#import <WXApiRequestHandler.h>
@implementation
FluwxAutoDeductHandler
{
NSObject
<
FlutterPluginRegistrar
>
*
_registrar
;
}
-
(
instancetype
)
initWithRegistrar
:
(
NSObject
<
FlutterPluginRegistrar
>
*
)
registrar
{
self
=
[
super
init
];
if
(
self
)
{
_registrar
=
registrar
;
}
return
self
;
}
-
(
void
)
handleAutoDeductWithCall
:
(
FlutterMethodCall
*
)
call
result
:
(
FlutterResult
)
result
{
NSDictionary
*
params
=
call
.
arguments
;
WXOpenBusinessWebViewReq
*
req
=
[[
WXOpenBusinessWebViewReq
alloc
]
init
];
req
.
businessType
=
12
;
req
.
queryInfoDic
=
params
;
BOOL
b
=
[
WXApi
sendReq
:
req
];
result
(
@
(
b
));
}
-
(
NSString
*
)
convertToJsonData
:
(
NSDictionary
*
)
dict
{
NSError
*
error
;
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
dict
options
:
NSJSONWritingPrettyPrinted
error
:&
error
];
NSString
*
jsonString
;
if
(
!
jsonData
)
{
NSLog
(
@"%@"
,
error
);
}
else
{
jsonString
=
[[
NSString
alloc
]
initWithData
:
jsonData
encoding
:
NSUTF8StringEncoding
];
}
NSMutableString
*
mutStr
=
[
NSMutableString
stringWithString
:
jsonString
];
// NSRange range = {0,jsonString.length};
// //去掉字符串中的空格
// [mutStr replaceOccurrencesOfString:@" " withString:@"" options:NSLiteralSearch range:range];
NSRange
range2
=
{
0
,
mutStr
.
length
};
//去掉字符串中的换行符
[
mutStr
replaceOccurrencesOfString
:
@"
\n
"
withString
:
@""
options
:
NSLiteralSearch
range
:
range2
];
return
mutStr
;
@end
ios/Classes/public/FluwxAutoDeductHandler.h
0 → 100644
浏览文件 @
e9e21b74
//
// FluwxAutoDeductHandler.h
// fluwx
//
// Created by realm on 2019/5/22.
//
#import <Foundation/Foundation.h>
#import <Flutter/Flutter.h>
NS_ASSUME_NONNULL_BEGIN
@interface
FluwxAutoDeductHandler
:
NSObject
-
(
instancetype
)
initWithRegistrar
:(
NSObject
<
FlutterPluginRegistrar
>
*
)
registrar
;
-
(
void
)
handleAutoDeductWithCall
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
;
@end
NS_ASSUME_NONNULL_END
ios/Classes/public/WXApiObject.h
浏览文件 @
e9e21b74
...
...
@@ -404,7 +404,7 @@ typedef void(^WXLogBolock)(NSString *log);
*
*
*/
@interface
WXOpenBusinessWebViewReq
:
BaseReq
@interface
WXOpenBusinessWebViewReq
:
BaseReq
/** 网页业务类型
* @attention
...
...
ios/README.txt
0 → 100644
浏览文件 @
e9e21b74
重要!
SDK1.8.4
1. 调整分享图片大小限制
2. 新增openBusinessView接口
SDK1.8.3
1. SDK增加调起微信刷卡支付接口
2. SDK增加小程序订阅消息接口
3. 修复小程序订阅消息接口没有resp的问题
SDK1.8.2
1. SDK增加开发票授权 WXInvoiceAuthInsert
2. SDK增加非税接口 WXNontaxPay
3. SDK增加医保接口 WXPayInsurance
4. 更换MTA库
SDK1.8.1
1. SDK打开小程序支持指定版本(体验,开发,正式版)
2. SDK分享小程序支持指定版本(体验,开发,正式版)
3. SDK支持输出log日志
SDK1.8.0
1. SDK支持打开小程序
2. SDK分享小程序支持shareTicket
SDK1.7.9
1. SDK订阅一次性消息
SDK1.7.8
1 SDK分享小程序支持大图
SDK1.7.7
1 增加SDK分享小程序
2 增加选择发票接口
SDK1.7.6
1. 提高稳定性
1 修复mta崩溃
2 新增接口支持开发者关闭mta数据统计上报
SDK1.7.5
1. 提高稳定性
2. 加快registerApp接口启动速度
SDK1.7.4
1. 更新支持iOS启用 ATS(App Transport Security)
2. 需要在工程中链接CFNetwork.framework
3. 在工程配置中的”Other Linker Flags”中加入”-Objc -all_load”
SDK1.7.3
1. 增强稳定性,适配iOS10
2. 修复小于32K的jpg格式缩略图设置失败的问题
SDK1.7.2
1. 修复因CTTeleponyNetworkInfo引起的崩溃问题
SDK1.7.1
1. 支持兼容ipv6(提升稳定性)
2. xCode Version 7.3.1 (7D1014) 编译
SDK1.7
1. 支持兼容ipv6
2. 修复若干问题增强稳定性
SDK1.6.3
1. xCode7.2 构建的sdk包。
2. 请使用xCode7.2进行编译。
3. 需要在Build Phases中Link Security.framework
4. 修复若干小问题。
SDK1.6.2
1、xCode7.1 构建的sdk包
2、请使用xCode7.1进行编译
SDK1.6.1
1、修复armv7s下,bitcode可能编译不过
2、解决warning
SDK1.6
1、iOS 9系统策略更新,限制了http协议的访问,此外应用需要在“Info.plist”中将要使用的URL Schemes列为白名单,才可正常检查其他应用是否安装。
受此影响,当你的应用在iOS 9中需要使用微信SDK的相关能力(分享、收藏、支付、登录等)时,需要在“Info.plist”里增加如下代码:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
2、开发者需要在工程中链接上 CoreTelephony.framework
3、解决bitcode编译不过问题
SDK1.5
1、废弃safeSendReq:接口,使用sendReq:即可。
2、新增+(BOOL) sendAuthReq:(SendAuthReq*) req viewController : (UIViewController*) viewController delegate:(id<WXApiDelegate>) delegate;
支持未安装微信情况下Auth,具体见WXApi.h接口描述
3、微信开放平台新增了微信模块用户统计功能,便于开发者统计微信功能模块的用户使用和活跃情况。开发者需要在工程中链接上:SystemConfiguration.framework,libz.dylib,libsqlite3.0.dylib。
ios/
Lib/
libWeChatSDK.a
→
ios/libWeChatSDK.a
浏览文件 @
e9e21b74
File moved
lib/src/fluwx_iml.dart
浏览文件 @
e9e21b74
...
...
@@ -301,6 +301,34 @@ Future subscribeMsg({
);
}
Future
autoDeDuct
(
{
@required
String
appId
,
@required
String
mchId
,
@required
String
planId
,
@required
String
contractCode
,
@required
String
requestSerial
,
@required
String
contractDisplayAccount
,
@required
String
notifyUrl
,
@required
String
version
,
@required
String
sign
,
@required
String
timestamp
,
String
returnApp
=
'3'
,
})
async
{
return
await
_channel
.
invokeMethod
(
"autoDeduct"
,
{
'appid'
:
appId
,
'mch_id'
:
mchId
,
'plan_id'
:
planId
,
'contract_code'
:
contractCode
,
'request_serial'
:
requestSerial
,
'contract_display_account'
:
contractDisplayAccount
,
'notify_url'
:
notifyUrl
,
'version'
:
version
,
'sign'
:
sign
,
'timestamp'
:
timestamp
,
'return_app'
:
returnApp
,
});
}
_handleOnAuthByQRCodeFinished
(
MethodCall
methodCall
)
{
int
errCode
=
methodCall
.
arguments
[
"errCode"
];
_authByQRCodeFinishedController
.
add
(
AuthByQRCodeResult
(
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论