update 自定义菜单
parent
894de700bc
commit
3e22570127
|
@ -1,11 +1,11 @@
|
||||||
PODS:
|
PODS:
|
||||||
- FinApplet (2.40.12-dev20230608v03)
|
- FinApplet (2.40.12-dev20230614v02)
|
||||||
- FinAppletExt (2.40.12-dev20230608v03):
|
- FinAppletExt (2.40.12-dev20230614v02):
|
||||||
- FinApplet (= 2.40.12-dev20230608v03)
|
- FinApplet (= 2.40.12-dev20230614v02)
|
||||||
- Flutter (1.0.0)
|
- Flutter (1.0.0)
|
||||||
- mop (0.1.1):
|
- mop (0.1.1):
|
||||||
- FinApplet (= 2.40.12-dev20230608v03)
|
- FinApplet (= 2.40.12-dev20230614v02)
|
||||||
- FinAppletExt (= 2.40.12-dev20230608v03)
|
- FinAppletExt (= 2.40.12-dev20230614v02)
|
||||||
- Flutter
|
- Flutter
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
|
@ -24,10 +24,10 @@ EXTERNAL SOURCES:
|
||||||
:path: ".symlinks/plugins/mop/ios"
|
:path: ".symlinks/plugins/mop/ios"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
FinApplet: 65349d2bff2aa592743da609a534eff8572681e4
|
FinApplet: de28575dab4c28c200c02844f4909b04d376def2
|
||||||
FinAppletExt: 92f01be77bb89ebf500b68e7f536441f62e02670
|
FinAppletExt: eea5d939667836c744b5eb4afcc81285e248c9f3
|
||||||
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
|
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
|
||||||
mop: 51a9fa6dd85e339898d1d602572cccdc0f491b76
|
mop: d8bad2214a82a3440c154e496d0d49c1144490a4
|
||||||
|
|
||||||
PODFILE CHECKSUM: 2da0220ee5ba22a2dfcec42dfe5b17d05f3c3da9
|
PODFILE CHECKSUM: 2da0220ee5ba22a2dfcec42dfe5b17d05f3c3da9
|
||||||
|
|
||||||
|
|
|
@ -496,6 +496,7 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
DEVELOPMENT_TEAM = 9QCKYFU5M4;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = finclip_example;
|
INFOPLIST_KEY_CFBundleDisplayName = finclip_example;
|
||||||
|
|
|
@ -60,6 +60,7 @@ class _MyAppState extends State<MyApp> {
|
||||||
uiconfig.capsuleConfig = capsuleConfig;
|
uiconfig.capsuleConfig = capsuleConfig;
|
||||||
uiconfig.appletText = "applet";
|
uiconfig.appletText = "applet";
|
||||||
uiconfig.loadingLayoutCls = "com.finogeeks.mop_example.CustomLoadingPage";
|
uiconfig.loadingLayoutCls = "com.finogeeks.mop_example.CustomLoadingPage";
|
||||||
|
uiconfig.autoAdaptDarkMode = true;
|
||||||
|
|
||||||
// if (Platform.isIOS) {
|
// if (Platform.isIOS) {
|
||||||
// final res = await Mop.instance.initialize(
|
// final res = await Mop.instance.initialize(
|
||||||
|
@ -197,11 +198,16 @@ class MyAppletHandler extends AppletHandler {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<List<CustomMenu>> getCustomMenus(String appId) {
|
Future<List<CustomMenu>> getCustomMenus(String appId) {
|
||||||
List<CustomMenu> customMenus = [
|
CustomMenu menu1 = CustomMenu('CustomMenu1', 'https://img1.baidu.com/it/u=2878938773,1765835171&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500', '百度图标', 'common');
|
||||||
CustomMenu('CustomMenu1', 'https://img1.baidu.com/it/u=2878938773,1765835171&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500', '百度图标', 'common'),
|
menu1.darkImage = 'https://img95.699pic.com/xsj/14/46/mh.jpg%21/fw/700/watermark/url/L3hzai93YXRlcl9kZXRhaWwyLnBuZw/align/southeast';
|
||||||
CustomMenu('CustomMenu2', 'minipro_list_collect', '工程图标', 'common'),
|
|
||||||
CustomMenu('MyFriends', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSpvugSNLs9R7iopz_noeotAelvgzYj-74iCg&usqp=CAU', '谷歌图标', 'common'),
|
|
||||||
|
|
||||||
|
CustomMenu menu2 = CustomMenu('CustomMenu2', 'minipro_list_collect', '工程图标', 'common');
|
||||||
|
menu2.darkImage = 'minipro_list_service';
|
||||||
|
|
||||||
|
List<CustomMenu> customMenus = [
|
||||||
|
menu1,
|
||||||
|
menu2,
|
||||||
|
CustomMenu('MyFriends', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSpvugSNLs9R7iopz_noeotAelvgzYj-74iCg&usqp=CAU', '谷歌图标', 'common'),
|
||||||
// CustomMenu('WXShareAPPFriends', 'https://img1.baidu.com/it/u=2878938773,1765835171&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500', '微信好朋友', 'common'),
|
// CustomMenu('WXShareAPPFriends', 'https://img1.baidu.com/it/u=2878938773,1765835171&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500', '微信好朋友', 'common'),
|
||||||
// CustomMenu('WXShareAPPMoments', 'https://img2.baidu.com/it/u=3113705544,436318069&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500', '微信朋友圈', 'common'),
|
// CustomMenu('WXShareAPPMoments', 'https://img2.baidu.com/it/u=3113705544,436318069&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500', '微信朋友圈', 'common'),
|
||||||
|
|
||||||
|
|
|
@ -95,6 +95,12 @@
|
||||||
} else {
|
} else {
|
||||||
model.menuIconImage = [UIImage imageNamed:imageUrl];
|
model.menuIconImage = [UIImage imageNamed:imageUrl];
|
||||||
}
|
}
|
||||||
|
NSString *darkImageUrl = data[@"darkImage"];
|
||||||
|
if ([darkImageUrl hasPrefix:@"http"]) {
|
||||||
|
model.menuDarkIconUrl = darkImageUrl;
|
||||||
|
} else {
|
||||||
|
model.menuIconDarkImage = [UIImage imageNamed:darkImageUrl];
|
||||||
|
}
|
||||||
NSString *typeString = data[@"type"];
|
NSString *typeString = data[@"type"];
|
||||||
if (typeString) {
|
if (typeString) {
|
||||||
FATAppletMenuStyle style = [typeString isEqualToString:@"onMiniProgram"] ? FATAppletMenuStyleOnMiniProgram : FATAppletMenuStyleCommon;
|
FATAppletMenuStyle style = [typeString isEqualToString:@"onMiniProgram"] ? FATAppletMenuStyleOnMiniProgram : FATAppletMenuStyleCommon;
|
||||||
|
|
|
@ -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.40.12-dev20230608v03'
|
s.dependency 'FinApplet' , '2.40.12-dev20230614v02'
|
||||||
s.dependency 'FinAppletExt' , '2.40.12-dev20230608v03'
|
s.dependency 'FinAppletExt' , '2.40.12-dev20230614v02'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
class CustomMenu {
|
class CustomMenu {
|
||||||
String menuId;
|
String menuId;
|
||||||
String image;
|
String image;
|
||||||
|
String? darkImage;
|
||||||
String title;
|
String title;
|
||||||
String type;
|
String type;
|
||||||
|
|
||||||
CustomMenu(this.menuId, this.image, this.title, this.type);
|
CustomMenu(this.menuId, this.image, this.title, this.type);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() =>
|
Map<String, dynamic> toJson() =>
|
||||||
{'menuId': menuId, 'image': image, 'title': title, 'type': type};
|
{'menuId': menuId, 'image': image, 'darkImage': darkImage, 'title': title, 'type': type};
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class AppletHandler {
|
abstract class AppletHandler {
|
||||||
|
|
|
@ -1154,6 +1154,9 @@ class Mop {
|
||||||
map["image"] = element.image;
|
map["image"] = element.image;
|
||||||
map["title"] = element.title;
|
map["title"] = element.title;
|
||||||
map["type"] = element.type;
|
map["type"] = element.type;
|
||||||
|
if (element.darkImage != null) {
|
||||||
|
map["darkImage"] = element.darkImage;
|
||||||
|
}
|
||||||
list.add(map);
|
list.add(map);
|
||||||
});
|
});
|
||||||
debugPrint("registerAppletHandler getCustomMenus list $list");
|
debugPrint("registerAppletHandler getCustomMenus list $list");
|
||||||
|
|
Loading…
Reference in New Issue