feat: 1.新增MopCustomMenuModel;2.修改MOPAppletDelegate.m文件中对menu功能的配置;3.本地依赖。
parent
7aec3afd61
commit
0155f7153d
|
@ -7,6 +7,7 @@
|
|||
|
||||
#import "MOPAppletDelegate.h"
|
||||
#import "MopPlugin.h"
|
||||
#import "MopCustomMenuModel.h"
|
||||
|
||||
@implementation MOPAppletDelegate
|
||||
|
||||
|
@ -46,13 +47,35 @@
|
|||
return userInfo;
|
||||
}
|
||||
|
||||
- (NSArray<id<FATAppletMenuProtocol>> *)customMenusInMoreItemAtPath:(NSString *)path
|
||||
{
|
||||
return nil;
|
||||
- (NSArray<id<FATAppletMenuProtocol>> *)customMenusInApplet:(FATAppletInfo *)appletInfo atPath:(NSString *)path {
|
||||
MopCustomMenuModel *favModel1 = [[MopCustomMenuModel alloc] init];
|
||||
favModel1.menuId = @"WXShareAPPFriends";
|
||||
favModel1.menuTitle = @"微信好友";
|
||||
favModel1.menuIconImage = [UIImage imageNamed:@"mini_menu_chat"];
|
||||
favModel1.menuType = FATAppletMenuStyleOnMiniProgram;
|
||||
|
||||
MopCustomMenuModel *favModel2 = [[MopCustomMenuModel alloc] init];
|
||||
favModel2.menuId = @"ShareSinaWeibo";
|
||||
favModel2.menuTitle = @"新浪微博";
|
||||
favModel2.menuIconImage = [UIImage imageNamed:@"mini_menu_chat"];
|
||||
favModel2.menuType = FATAppletMenuStyleOnMiniProgram;
|
||||
|
||||
MopCustomMenuModel *favModel3 = [[MopCustomMenuModel alloc] init];
|
||||
favModel3.menuId = @"Restart";
|
||||
favModel3.menuTitle = @"重启";
|
||||
favModel3.menuIconImage = [UIImage imageNamed:@"minipro_list_setting"];
|
||||
favModel3.menuType = FATAppletMenuStyleCommon;
|
||||
|
||||
MopCustomMenuModel *favModel4 = [[MopCustomMenuModel alloc] init];
|
||||
favModel4.menuId = @"ShareQQFriends";
|
||||
favModel4.menuTitle = @"QQ好友";
|
||||
favModel4.menuIconImage = [UIImage imageNamed:@"minipro_list_setting"];
|
||||
favModel4.menuType = FATAppletMenuStyleOnMiniProgram;
|
||||
|
||||
return @[favModel1, favModel2, favModel3, favModel4];
|
||||
}
|
||||
|
||||
- (void)customMenu:(id<FATAppletMenuProtocol>)customMenu didClickAtPath:(NSString *)path
|
||||
{
|
||||
- (void)clickCustomItemMenuWithInfo:(NSDictionary *)contentInfo completion:(void (^)(FATExtensionCode code, NSDictionary *result))completion {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
//
|
||||
// MopCustomMenuModel.h
|
||||
// mop
|
||||
//
|
||||
// Created by Lin on 2021/2/26.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <FinApplet/FinApplet.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MopCustomMenuModel : NSObject <FATAppletMenuProtocol>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,24 @@
|
|||
//
|
||||
// MopCustomMenuModel.m
|
||||
// mop
|
||||
//
|
||||
// Created by Lin on 2021/2/26.
|
||||
//
|
||||
|
||||
#import "MopCustomMenuModel.h"
|
||||
|
||||
@implementation MopCustomMenuModel
|
||||
|
||||
@synthesize menuId, menuIconImage, menuTitle, menuType;
|
||||
|
||||
- (id)copyWithZone:(NSZone *)zone
|
||||
{
|
||||
MopCustomMenuModel *model = [[MopCustomMenuModel allocWithZone:zone] init];
|
||||
model.menuId = self.menuId;
|
||||
model.menuIconImage = self.menuIconImage;
|
||||
model.menuTitle = self.menuTitle;
|
||||
model.menuType = self.menuType;
|
||||
return model;
|
||||
}
|
||||
|
||||
@end
|
|
@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk.
|
|||
s.dependency 'Flutter'
|
||||
s.ios.deployment_target = '9.0'
|
||||
|
||||
s.dependency 'FinApplet' , ''
|
||||
s.dependency 'FinAppletExt' , ''
|
||||
s.dependency 'FinApplet' , '2.21.0-alpha20210226v03'
|
||||
s.dependency 'FinAppletExt' , '2.21.0-alpha20210226v03'
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue