feat: 完成扫码打开不同版本小程序功能

master
jizelin 2021-06-11 18:57:54 +08:00 committed by xiaoyu
parent f5a751cae0
commit cdca7e797d
5 changed files with 23 additions and 8 deletions

View File

@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/haley/Documents/Finogeeks/Gitlab/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/haley/Documents/Finogeeks/Gitlab/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-06-02 15:20:44.412374","version":"2.3.0-1.0.pre.169"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-06-09 21:47:48.185375","version":"2.0.3"}

View File

@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.6.0"
version: "2.5.0"
boolean_selector:
dependency: transitive
description:
@ -87,7 +87,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.28.1"
version: "2.29.3"
path:
dependency: transitive
description:
@ -106,7 +106,7 @@ packages:
name: source_span
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.1"
version: "1.8.0"
stack_trace:
dependency: transitive
description:
@ -141,7 +141,7 @@ packages:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.0"
version: "0.2.19"
typed_data:
dependency: transitive
description:
@ -157,5 +157,5 @@ packages:
source: hosted
version: "2.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.12.0-0.0 <3.0.0"
flutter: ">=1.10.0"

View File

@ -11,6 +11,8 @@ NS_ASSUME_NONNULL_BEGIN
@interface MOP_scanOpenApplet : MOPBaseApi
@property (nonatomic,copy) NSString *info;
@end
NS_ASSUME_NONNULL_END

View File

@ -6,12 +6,24 @@
//
#import "MOP_scanOpenApplet.h"
#import "MOPTools.h"
#import <FinApplet/FinApplet.h>
@implementation MOP_scanOpenApplet
- (void)setupApiWithSuccess:(void (^)(NSDictionary<NSString *,id> * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel {
NSLog(@"MOP_scanOpenApplet");
NSLog(@"MOP_scanOpenApplet%@", self.info);
FATAppletDecryptRequest *req = [[FATAppletDecryptRequest alloc] init];
req.info = self.info;
UIViewController *currentVC = [MOPTools topViewController];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[[FATClient sharedClient] startAppletWithDecryptRequest:req InParentViewController:currentVC completion:^(BOOL result, FATError *error) {
NSLog(@"打开小程序:%@", error);
} closeCompletion:^{
NSLog(@"关闭小程序");
}];
});
}
@end

View File

@ -161,7 +161,8 @@ class Mop {
/// --
///
Future scanOpenApplet(String info) async {
return await _channel.invokeMapMethod("scanOpenApplet");
Map<String, Object> params = {'info': info};
return await _channel.invokeMapMethod("scanOpenApplet", params);
}
///