2021-06-24 20:24:37 +08:00
|
|
|
|
//
|
|
|
|
|
// MOP_parseWXQrCode.m
|
|
|
|
|
// mop
|
|
|
|
|
//
|
|
|
|
|
// Created by EDY on 2021/6/22.
|
|
|
|
|
//
|
|
|
|
|
|
2021-06-24 20:54:02 +08:00
|
|
|
|
#import "MOP_parseAppletInfoFromWXQrCode.h"
|
2021-06-24 20:24:37 +08:00
|
|
|
|
#import "MOPTools.h"
|
|
|
|
|
#import <FinApplet/FinApplet.h>
|
|
|
|
|
|
2021-06-24 20:54:02 +08:00
|
|
|
|
@implementation MOP_parseAppletInfoFromWXQrCode
|
2021-06-24 20:24:37 +08:00
|
|
|
|
|
|
|
|
|
- (void)setupApiWithSuccess:(void (^)(NSDictionary<NSString *,id> * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel {
|
|
|
|
|
NSLog(@"MOP_parseWXQrCode:%@", self.qrCode);
|
2021-06-28 10:17:27 +08:00
|
|
|
|
[[FATClient sharedClient] parseAppletInfoFromWXQrCode:self.qrCode apiServer:self.apiServer completion:^(FATAppletSimpleInfo *appInfo, FATError *aError) {
|
2021-06-24 20:24:37 +08:00
|
|
|
|
if (aError) {
|
|
|
|
|
failure(aError.description);
|
|
|
|
|
}else{
|
2021-06-28 10:17:27 +08:00
|
|
|
|
NSMutableDictionary *dataDic = [[NSMutableDictionary alloc]init];
|
|
|
|
|
if (appInfo && appInfo.appId) {
|
|
|
|
|
[dataDic setObject:appInfo.appId forKey:@"appId"];
|
|
|
|
|
}
|
|
|
|
|
success(dataDic);
|
2021-06-24 20:24:37 +08:00
|
|
|
|
}
|
|
|
|
|
}];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@end
|