From 155db4903b7fb9facff74b867bd48240d0f69df8 Mon Sep 17 00:00:00 2001 From: jizelin Date: Mon, 7 Jun 2021 18:53:00 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=B7=BB=E5=8A=A0scanOpenApplet?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOP_scanOpenApplet.h | 16 ++++++++++++++++ ios/Classes/Api/MOP_scanOpenApplet.m | 17 +++++++++++++++++ lib/mop.dart | 7 +++++++ 3 files changed, 40 insertions(+) create mode 100644 ios/Classes/Api/MOP_scanOpenApplet.h create mode 100644 ios/Classes/Api/MOP_scanOpenApplet.m diff --git a/ios/Classes/Api/MOP_scanOpenApplet.h b/ios/Classes/Api/MOP_scanOpenApplet.h new file mode 100644 index 0000000..d6e423b --- /dev/null +++ b/ios/Classes/Api/MOP_scanOpenApplet.h @@ -0,0 +1,16 @@ +// +// MOP_scanOpenApplet.h +// mop +// +// Created by beetle_92 on 2021/6/7. +// + +#import "MOPBaseApi.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MOP_scanOpenApplet : MOPBaseApi + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Api/MOP_scanOpenApplet.m b/ios/Classes/Api/MOP_scanOpenApplet.m new file mode 100644 index 0000000..86e0631 --- /dev/null +++ b/ios/Classes/Api/MOP_scanOpenApplet.m @@ -0,0 +1,17 @@ +// +// MOP_scanOpenApplet.m +// mop +// +// Created by beetle_92 on 2021/6/7. +// + +#import "MOP_scanOpenApplet.h" +#import + +@implementation MOP_scanOpenApplet + +- (void)setupApiWithSuccess:(void (^)(NSDictionary * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel { + NSLog(@"MOP_scanOpenApplet"); +} + +@end diff --git a/lib/mop.dart b/lib/mop.dart index 643a7f6..fd8aa9e 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -157,6 +157,13 @@ class Mop { .then((value) => value["data"]); } + /// + /// (扫码后)解密-鉴权-打开小程序 + /// + Future scanOpenApplet(String info) async { + return await _channel.invokeMapMethod("scanOpenApplet"); + } + /// /// register handler to provide custom info or behaviour /// 注册小程序事件处理