feat: 完成扫码打开不同版本小程序功能
parent
9a44a0957b
commit
e65ab3daf9
|
@ -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"}
|
|
@ -7,7 +7,7 @@ packages:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.6.0"
|
version: "2.5.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -87,7 +87,7 @@ packages:
|
||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "2.28.1"
|
version: "2.29.3"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -106,7 +106,7 @@ packages:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.1"
|
version: "1.8.0"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -141,7 +141,7 @@ packages:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.2.19"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -157,5 +157,5 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.12.0 <3.0.0"
|
dart: ">=2.12.0-0.0 <3.0.0"
|
||||||
flutter: ">=1.10.0"
|
flutter: ">=1.10.0"
|
||||||
|
|
|
@ -11,6 +11,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface MOP_scanOpenApplet : MOPBaseApi
|
@interface MOP_scanOpenApplet : MOPBaseApi
|
||||||
|
|
||||||
|
@property (nonatomic,copy) NSString *info;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -6,12 +6,24 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "MOP_scanOpenApplet.h"
|
#import "MOP_scanOpenApplet.h"
|
||||||
|
#import "MOPTools.h"
|
||||||
#import <FinApplet/FinApplet.h>
|
#import <FinApplet/FinApplet.h>
|
||||||
|
|
||||||
@implementation MOP_scanOpenApplet
|
@implementation MOP_scanOpenApplet
|
||||||
|
|
||||||
- (void)setupApiWithSuccess:(void (^)(NSDictionary<NSString *,id> * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel {
|
- (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
|
@end
|
||||||
|
|
|
@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk.
|
||||||
s.dependency 'Flutter'
|
s.dependency 'Flutter'
|
||||||
s.ios.deployment_target = '9.0'
|
s.ios.deployment_target = '9.0'
|
||||||
|
|
||||||
s.dependency 'FinApplet' , '2.29.1'
|
s.dependency 'FinApplet' , '2.30.0-alpha20210611v01'
|
||||||
s.dependency 'FinAppletExt' , '2.29.1'
|
s.dependency 'FinAppletExt' , '2.30.0-alpha20210611v01'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,8 @@ class Mop {
|
||||||
/// (扫码后)解密-鉴权-打开小程序
|
/// (扫码后)解密-鉴权-打开小程序
|
||||||
///
|
///
|
||||||
Future scanOpenApplet(String info) async {
|
Future scanOpenApplet(String info) async {
|
||||||
return await _channel.invokeMapMethod("scanOpenApplet");
|
Map<String, Object> params = {'info': info};
|
||||||
|
return await _channel.invokeMapMethod("scanOpenApplet", params);
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue