2021-06-07 18:53:00 +08:00
|
|
|
|
//
|
|
|
|
|
// MOP_scanOpenApplet.m
|
|
|
|
|
// mop
|
|
|
|
|
//
|
|
|
|
|
// Created by beetle_92 on 2021/6/7.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#import "MOP_scanOpenApplet.h"
|
2021-06-11 18:57:54 +08:00
|
|
|
|
#import "MOPTools.h"
|
2021-06-07 18:53:00 +08:00
|
|
|
|
#import <FinApplet/FinApplet.h>
|
|
|
|
|
|
|
|
|
|
@implementation MOP_scanOpenApplet
|
|
|
|
|
|
|
|
|
|
- (void)setupApiWithSuccess:(void (^)(NSDictionary<NSString *,id> * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel {
|
2021-06-11 18:57:54 +08:00
|
|
|
|
NSLog(@"MOP_scanOpenApplet:%@", self.info);
|
|
|
|
|
FATAppletDecryptRequest *req = [[FATAppletDecryptRequest alloc] init];
|
|
|
|
|
req.info = self.info;
|
2021-06-16 23:47:00 +08:00
|
|
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
|
|
UIViewController *currentVC = [MOPTools topViewController];
|
2021-06-11 18:57:54 +08:00
|
|
|
|
[[FATClient sharedClient] startAppletWithDecryptRequest:req InParentViewController:currentVC completion:^(BOOL result, FATError *error) {
|
|
|
|
|
NSLog(@"打开小程序:%@", error);
|
|
|
|
|
} closeCompletion:^{
|
|
|
|
|
NSLog(@"关闭小程序");
|
|
|
|
|
}];
|
|
|
|
|
});
|
|
|
|
|
|
2021-06-07 18:53:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@end
|