commit
11083a6c5a
|
@ -186,12 +186,17 @@ public class AppletHandlerModule extends BaseApi {
|
||||||
if (image == null) {
|
if (image == null) {
|
||||||
image = "";
|
image = "";
|
||||||
}
|
}
|
||||||
|
String darkImage = (String) map.get("darkImage");
|
||||||
|
if (darkImage == null) {
|
||||||
|
darkImage = "";
|
||||||
|
}
|
||||||
moreMenuItems.add(
|
moreMenuItems.add(
|
||||||
new MoreMenuItem(
|
new MoreMenuItem(
|
||||||
menuId,
|
menuId,
|
||||||
title,
|
title,
|
||||||
image,
|
image,
|
||||||
-1,
|
-1,
|
||||||
|
darkImage,
|
||||||
moreMenuType,
|
moreMenuType,
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.finogeeks.mop.api.mop;
|
||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.finogeeks.lib.applet.client.FinAppClient;
|
import com.finogeeks.lib.applet.client.FinAppClient;
|
||||||
|
@ -102,8 +103,14 @@ public class BaseModule extends BaseApi {
|
||||||
if (fingerprint == null) fingerprint = "";
|
if (fingerprint == null) fingerprint = "";
|
||||||
String encryptType = (String) config.get("cryptType");
|
String encryptType = (String) config.get("cryptType");
|
||||||
Boolean encryptServerData1 = (Boolean) config.get("encryptServerData");
|
Boolean encryptServerData1 = (Boolean) config.get("encryptServerData");
|
||||||
|
Boolean enablePreloadFramework = (Boolean) config.get("enablePreloadFramework");
|
||||||
|
//凡泰助手里,服务器是https://api.finclip.com,默认开启预加载基础库
|
||||||
|
if(!TextUtils.isEmpty(apiServer) && apiServer.equals("https://api.finclip.com")) {
|
||||||
|
enablePreloadFramework = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (encryptServerData1 == null) encryptServerData1 = false;
|
if (encryptServerData1 == null) encryptServerData1 = false;
|
||||||
finStoreConfigs.add(new FinStoreConfig(sdkKey, sdkSecret, apiUrl, apmUrl, "", fingerprint, encryptType, encryptServerData1));
|
finStoreConfigs.add(new FinStoreConfig(sdkKey, sdkSecret, apiUrl, apmUrl, "", fingerprint, encryptType, encryptServerData1, enablePreloadFramework));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.finogeeks.mop.api.mop;
|
||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.finogeeks.lib.applet.client.FinAppClient;
|
import com.finogeeks.lib.applet.client.FinAppClient;
|
||||||
|
@ -63,8 +64,15 @@ public class InitSDKModule extends BaseApi {
|
||||||
}
|
}
|
||||||
String cryptType = (String) store.get("cryptType");
|
String cryptType = (String) store.get("cryptType");
|
||||||
Boolean encryptServerData = (Boolean) store.get("encryptServerData");
|
Boolean encryptServerData = (Boolean) store.get("encryptServerData");
|
||||||
|
Boolean enablePreloadFramework = (Boolean) store.get("enablePreloadFramework");
|
||||||
|
//凡泰助手里,服务器是https://api.finclip.com,默认开启预加载基础库
|
||||||
|
if (!TextUtils.isEmpty(apiServer) && apiServer.equals("https://api.finclip.com")) {
|
||||||
|
enablePreloadFramework = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
storeConfigs.add(new FinStoreConfig(sdkKey, sdkSecret, apiServer, apmServer, "",
|
storeConfigs.add(new FinStoreConfig(sdkKey, sdkSecret, apiServer, apmServer, "",
|
||||||
fingerprint, cryptType, encryptServerData));
|
fingerprint, cryptType, encryptServerData, enablePreloadFramework));
|
||||||
}
|
}
|
||||||
configBuilder.setFinStoreConfigs(storeConfigs);
|
configBuilder.setFinStoreConfigs(storeConfigs);
|
||||||
String userId = (String) configMap.get("userId");
|
String userId = (String) configMap.get("userId");
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
# Uncomment this line to define a global platform for your project
|
# Uncomment this line to define a global platform for your project
|
||||||
platform :ios, '9.0'
|
platform :ios, '9.0'
|
||||||
|
|
||||||
|
source 'ssh://gitlab.finogeeks.club/finclip-ios/DevPods'
|
||||||
|
source 'ssh://gitlab.finogeeks.club/finclip-ios/FinPods'
|
||||||
|
|
||||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
PODS:
|
PODS:
|
||||||
- FinApplet (2.40.9)
|
- FinApplet (2.40.12-dev20230614v02)
|
||||||
- FinAppletExt (2.40.9):
|
- FinAppletExt (2.40.12-dev20230614v02):
|
||||||
- FinApplet (= 2.40.9)
|
- FinApplet (= 2.40.12-dev20230614v02)
|
||||||
- Flutter (1.0.0)
|
- Flutter (1.0.0)
|
||||||
- mop (0.1.1):
|
- mop (0.1.1):
|
||||||
- FinApplet (= 2.40.9)
|
- FinApplet (= 2.40.12-dev20230614v02)
|
||||||
- FinAppletExt (= 2.40.9)
|
- FinAppletExt (= 2.40.12-dev20230614v02)
|
||||||
- Flutter
|
- Flutter
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
|
@ -13,7 +13,7 @@ DEPENDENCIES:
|
||||||
- mop (from `.symlinks/plugins/mop/ios`)
|
- mop (from `.symlinks/plugins/mop/ios`)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
trunk:
|
ssh://gitlab.finogeeks.club/finclip-ios/DevPods:
|
||||||
- FinApplet
|
- FinApplet
|
||||||
- FinAppletExt
|
- FinAppletExt
|
||||||
|
|
||||||
|
@ -24,11 +24,11 @@ EXTERNAL SOURCES:
|
||||||
:path: ".symlinks/plugins/mop/ios"
|
:path: ".symlinks/plugins/mop/ios"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
FinApplet: 9dd3810fb41400c882c8c5d5f528452b0f1f0a63
|
FinApplet: de28575dab4c28c200c02844f4909b04d376def2
|
||||||
FinAppletExt: e9f418e3d11f5cf4ee42b2d64ab405fe747f51fe
|
FinAppletExt: eea5d939667836c744b5eb4afcc81285e248c9f3
|
||||||
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
|
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
|
||||||
mop: 8684b0dad361ce1d9b2d4a98d65a1acb52ce4120
|
mop: d8bad2214a82a3440c154e496d0d49c1144490a4
|
||||||
|
|
||||||
PODFILE CHECKSUM: 2317ba7584871ae8cd67fd0244fbd5e96fd06167
|
PODFILE CHECKSUM: 2da0220ee5ba22a2dfcec42dfe5b17d05f3c3da9
|
||||||
|
|
||||||
COCOAPODS: 1.11.3
|
COCOAPODS: 1.11.3
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "minipro_list_collect@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "minipro_list_collect@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "minipro_list_service@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "minipro_list_service@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -45,6 +45,7 @@ class _MyAppState extends State<MyApp> {
|
||||||
Config config = Config(storeConfigs);
|
Config config = Config(storeConfigs);
|
||||||
config.language = LanguageType.English;
|
config.language = LanguageType.English;
|
||||||
config.baseLoadingViewClass = "LoadingView";
|
config.baseLoadingViewClass = "LoadingView";
|
||||||
|
config.appletDebugMode = BOOLState.BOOLStateTrue;
|
||||||
|
|
||||||
UIConfig uiconfig = UIConfig();
|
UIConfig uiconfig = UIConfig();
|
||||||
uiconfig.isAlwaysShowBackInDefaultNavigationBar = false;
|
uiconfig.isAlwaysShowBackInDefaultNavigationBar = false;
|
||||||
|
@ -59,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(
|
||||||
|
@ -129,14 +131,15 @@ class _MyAppState extends State<MyApp> {
|
||||||
// physics: NeverScrollableScrollPhysics(),
|
// physics: NeverScrollableScrollPhysics(),
|
||||||
children: [
|
children: [
|
||||||
_buildAppletItem(appletId, "打开小程序", () {
|
_buildAppletItem(appletId, "打开小程序", () {
|
||||||
// Mop.instance.openApplet(appletId,
|
|
||||||
// path: 'pages/index/index', query: '');
|
|
||||||
TranstionStyle style = TranstionStyle.TranstionStyleUp;
|
TranstionStyle style = TranstionStyle.TranstionStyleUp;
|
||||||
if (appletId == "5f72e3559a6a7900019b5baa") {
|
if (appletId == "5f72e3559a6a7900019b5baa") {
|
||||||
style = TranstionStyle.TranstionStylePush;
|
style = TranstionStyle.TranstionStylePush;
|
||||||
}
|
}
|
||||||
RemoteAppletRequest request = RemoteAppletRequest(apiServer: 'https://api.finclip.com', appletId: appletId, transitionStyle: style);
|
RemoteAppletRequest request = RemoteAppletRequest(apiServer: 'https://api.finclip.com', appletId: appletId, transitionStyle: style);
|
||||||
Mop.instance.startApplet(request);
|
Mop.instance.startApplet(request);
|
||||||
|
|
||||||
|
// Mop.instance.qrcodeOpenApplet('https://api.finclip.com/api/v1/mop/runtime/applet/-f-MGYzN2Q1YTYzMmI2MWIyZg--');
|
||||||
|
|
||||||
}),
|
}),
|
||||||
_buildAppletItem(appletId, "finishRunningApplet", () {
|
_buildAppletItem(appletId, "finishRunningApplet", () {
|
||||||
Mop.instance.finishRunningApplet(appletId, true);
|
Mop.instance.finishRunningApplet(appletId, true);
|
||||||
|
@ -167,7 +170,7 @@ class _MyAppState extends State<MyApp> {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
_buildAppletWidget("5facb3a52dcbff00017469bd", "画图小程序"),
|
_buildAppletWidget("5facb3a52dcbff00017469bd", "画图小程序"),
|
||||||
_buildAppletWidget("5f72e3559a6a7900019b5baa", "官方小程序"),
|
_buildAppletWidget("5f72e3559a6a7900019b5baa", "官方小程序"),
|
||||||
_buildAppletWidget("5fa215459a6a7900019b5cc3", "我的对账单"),
|
_buildAppletWidget("5f17f457297b540001e06ebb", "测试小程序"),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -184,8 +187,8 @@ class MyAppletHandler extends AppletHandler {
|
||||||
@override
|
@override
|
||||||
bool customCapsuleMoreButtonClick(String appId) {
|
bool customCapsuleMoreButtonClick(String appId) {
|
||||||
print("customCapsuleMoreButtonClick---");
|
print("customCapsuleMoreButtonClick---");
|
||||||
toAppMessageChannel.invokeMethod("showCustomMoreView", {"appId": appId});
|
// toAppMessageChannel.invokeMethod("showCustomMoreView", {"appId": appId});
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -195,14 +198,32 @@ class MyAppletHandler extends AppletHandler {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<List<CustomMenu>> getCustomMenus(String appId) {
|
Future<List<CustomMenu>> getCustomMenus(String appId) {
|
||||||
List<CustomMenu> customMenus = [];
|
CustomMenu menu1 = CustomMenu('WXTest', '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 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('WXShareAPPMoments', 'https://img2.baidu.com/it/u=3113705544,436318069&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500', '微信朋友圈', 'common'),
|
||||||
|
|
||||||
|
// CustomMenu('WXShareAPPFriends', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSpvugSNLs9R7iopz_noeotAelvgzYj-74iCg&usqp=CAU', '微信好朋友', 'common'),
|
||||||
|
// CustomMenu('WXShareAPPMoments', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR7cO4KB4e5-Ugdcq4pIyWunliH7LZRZzguKQ&usqp=CAU', '微信朋友圈', 'common'),
|
||||||
|
];
|
||||||
return Future.value(customMenus);
|
return Future.value(customMenus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> getMobileNumber(Function(dynamic params) param0) {
|
Future<void> getMobileNumber(Function(dynamic params) callback) {
|
||||||
// TODO: implement getMobileNumber
|
// TODO: implement getMobileNumber
|
||||||
throw UnimplementedError();
|
Map<String, dynamic> result = {"phone": '18607180143',"other":'abc123'};
|
||||||
|
print('getMobileNumber:' + result.toString());
|
||||||
|
callback(result);
|
||||||
|
return Future.value(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -115,7 +115,7 @@ packages:
|
||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "2.40.9"
|
version: "2.40.11"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -91,10 +91,16 @@
|
||||||
NSString *imageUrl = data[@"image"];
|
NSString *imageUrl = data[@"image"];
|
||||||
if ([imageUrl hasPrefix:@"http"]) {
|
if ([imageUrl hasPrefix:@"http"]) {
|
||||||
// 需要异步加载,待优化!
|
// 需要异步加载,待优化!
|
||||||
model.menuIconImage = [UIImage fat_getImageWithUrl:imageUrl];
|
model.menuIconUrl = imageUrl;
|
||||||
} 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;
|
||||||
|
@ -180,8 +186,9 @@ static NSString *scheme = @"fatae55433be2f62915";//App对应的scheme
|
||||||
NSDictionary *params = @{@"name":@"getPhoneNumber"};
|
NSDictionary *params = @{@"name":@"getPhoneNumber"};
|
||||||
|
|
||||||
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
|
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
|
||||||
[channel invokeMethod:@"extensionApi:getPhoneNumber" arguments:params result:^(id _Nullable result) {
|
|
||||||
self.bindGetPhoneNumbers = bindGetPhoneNumber;
|
self.bindGetPhoneNumbers = bindGetPhoneNumber;
|
||||||
|
NSLog(@"getPhoneNumberWithAppletInfo");
|
||||||
|
[channel invokeMethod:@"extensionApi:getPhoneNumber" arguments:params result:^(id _Nullable result) {
|
||||||
// !self.bindGetPhoneNumbers?: bindGetPhoneNumber(result);
|
// !self.bindGetPhoneNumbers?: bindGetPhoneNumber(result);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
storeConfig.cryptType = FATApiCryptTypeMD5;
|
storeConfig.cryptType = FATApiCryptTypeMD5;
|
||||||
}
|
}
|
||||||
storeConfig.encryptServerData = [dict[@"encryptServerData"] boolValue];
|
storeConfig.encryptServerData = [dict[@"encryptServerData"] boolValue];
|
||||||
|
storeConfig.enablePreloadFramework = [storeConfig.apiServer isEqualToString:@"https://api.finclip.com"];
|
||||||
[storeArrayM addObject:storeConfig];
|
[storeArrayM addObject:storeConfig];
|
||||||
}
|
}
|
||||||
config = [FATConfig configWithStoreConfigs:storeArrayM];
|
config = [FATConfig configWithStoreConfigs:storeArrayM];
|
||||||
|
|
|
@ -12,6 +12,56 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface MopCustomMenuModel : NSObject <FATAppletMenuProtocol>
|
@interface MopCustomMenuModel : NSObject <FATAppletMenuProtocol>
|
||||||
|
|
||||||
|
/**
|
||||||
|
菜单id
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy) NSString *menuId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
菜单的icon图标
|
||||||
|
我们固定菜单的大小:3倍图:90*90
|
||||||
|
图标中间小logo与图标宽度比是 5:8。
|
||||||
|
注意:菜单图标显示优先级:后台配置icon > APP注入icon
|
||||||
|
*/
|
||||||
|
@property (nonatomic, strong) UIImage *menuIconImage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
菜单的icon图标网络链接地址
|
||||||
|
我们固定菜单的大小:3倍图:90*90
|
||||||
|
图标中间小logo与图标宽度比是 5:8,供参考
|
||||||
|
注意:菜单图标显示优先级:后台配置的icon path > App注入的icon
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy) NSString *menuIconUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
菜单在黑暗模式下的icon图标
|
||||||
|
我们固定菜单的大小:3倍图:90*90
|
||||||
|
图标中间小logo与图标宽度比是 5:8。
|
||||||
|
注意:菜单图标显示优先级:后台配置icon > APP注入icon
|
||||||
|
*/
|
||||||
|
@property (nonatomic, strong) UIImage *menuIconDarkImage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
菜单的暗黑模式icon图标网络链接地址
|
||||||
|
我们固定菜单的大小:3倍图:90*90
|
||||||
|
图标中间小logo与图标宽度比是 5:8,供参考
|
||||||
|
注意:菜单图标显示优先级:后台配置的darkIcon path > App注入的icon
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy) NSString *menuDarkIconUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
菜单的标题
|
||||||
|
注意:菜单标题显示优先级:后台配置标题 > APP注入标题
|
||||||
|
*/
|
||||||
|
@property (nonatomic, copy) NSString *menuTitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
菜单的类型
|
||||||
|
FATAppletMenuStyleCommon:通用的按钮,不需要小程序提供额外信息就可以调用的,比如收藏;
|
||||||
|
FATAppletMenuStyleOnMiniProgram:需要小程序配合实现的按钮,也就是说需要小程序提供额外调用参数的按钮,比如分享到微信
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign) FATAppletMenuStyle menuType;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -9,15 +9,16 @@
|
||||||
|
|
||||||
@implementation MopCustomMenuModel
|
@implementation MopCustomMenuModel
|
||||||
|
|
||||||
@synthesize menuId, menuIconImage, menuTitle, menuType;
|
|
||||||
|
|
||||||
- (id)copyWithZone:(NSZone *)zone
|
- (id)copyWithZone:(NSZone *)zone
|
||||||
{
|
{
|
||||||
MopCustomMenuModel *model = [[MopCustomMenuModel allocWithZone:zone] init];
|
MopCustomMenuModel *model = [[MopCustomMenuModel allocWithZone:zone] init];
|
||||||
model.menuId = self.menuId;
|
model.menuId = self.menuId;
|
||||||
model.menuIconImage = self.menuIconImage;
|
model.menuIconImage = self.menuIconImage;
|
||||||
|
model.menuIconDarkImage = self.menuIconDarkImage;
|
||||||
model.menuTitle = self.menuTitle;
|
model.menuTitle = self.menuTitle;
|
||||||
model.menuType = self.menuType;
|
model.menuType = self.menuType;
|
||||||
|
model.menuIconUrl = self.menuIconUrl;
|
||||||
|
model.menuDarkIconUrl = self.menuDarkIconUrl;
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,12 +127,13 @@ static MopPlugin *_instance;
|
||||||
}
|
}
|
||||||
else if ([@"getPhoneNumberResult" isEqualToString:call.method]) {
|
else if ([@"getPhoneNumberResult" isEqualToString:call.method]) {
|
||||||
if ([MOPAppletDelegate instance].bindGetPhoneNumbers) {
|
if ([MOPAppletDelegate instance].bindGetPhoneNumbers) {
|
||||||
NSDictionary *dic = [[NSDictionary alloc] initWithDictionary:call.arguments];
|
[MOPAppletDelegate instance].bindGetPhoneNumbers(call.arguments);
|
||||||
NSString *jsonString = [dic[@"phone"] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
// NSDictionary *dic = [[NSDictionary alloc] initWithDictionary:call.arguments];
|
||||||
NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
|
// NSString *jsonString = [dic[@"phone"] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||||
NSError *error;
|
// NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
NSDictionary *jsonDic = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&error];
|
// NSError *error;
|
||||||
[MOPAppletDelegate instance].bindGetPhoneNumbers(jsonDic);
|
// NSDictionary *jsonDic = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&error];
|
||||||
|
// [MOPAppletDelegate instance].bindGetPhoneNumbers(jsonDic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -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.9'
|
s.dependency 'FinApplet' , '2.40.12-dev20230614v02'
|
||||||
s.dependency 'FinAppletExt' , '2.40.9'
|
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 {
|
||||||
|
|
12
lib/mop.dart
12
lib/mop.dart
|
@ -34,11 +34,15 @@ class FinStoreConfig {
|
||||||
/// 是否需要接口加密验证(初始化多服务器时使用)默认为不开启,当设置为YES时开启,接口返回加密数据并处理
|
/// 是否需要接口加密验证(初始化多服务器时使用)默认为不开启,当设置为YES时开启,接口返回加密数据并处理
|
||||||
bool encryptServerData;
|
bool encryptServerData;
|
||||||
|
|
||||||
|
/// 是否开启预加载基础库
|
||||||
|
bool enablePreloadFramework;
|
||||||
|
|
||||||
FinStoreConfig(this.sdkKey, this.sdkSecret, this.apiServer,
|
FinStoreConfig(this.sdkKey, this.sdkSecret, this.apiServer,
|
||||||
{this.apmServer,
|
{this.apmServer,
|
||||||
this.cryptType = "MD5",
|
this.cryptType = "MD5",
|
||||||
this.fingerprint,
|
this.fingerprint,
|
||||||
this.encryptServerData = false});
|
this.encryptServerData = false,
|
||||||
|
this.enablePreloadFramework = false});
|
||||||
|
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
return {
|
return {
|
||||||
|
@ -48,7 +52,8 @@ class FinStoreConfig {
|
||||||
"apmServer": apmServer,
|
"apmServer": apmServer,
|
||||||
"cryptType": cryptType,
|
"cryptType": cryptType,
|
||||||
"fingerprint": fingerprint,
|
"fingerprint": fingerprint,
|
||||||
"encryptServerData": encryptServerData
|
"encryptServerData": encryptServerData,
|
||||||
|
"enablePreloadFramework": enablePreloadFramework
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1165,6 +1170,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");
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: mop
|
name: mop
|
||||||
description: A Finogeeks MiniProgram Flutter SDK.
|
description: A Finogeeks MiniProgram Flutter SDK.
|
||||||
version: '2.40.10'
|
version: '2.40.11'
|
||||||
homepage: https://github.com/finogeeks/mop-flutter-sdk
|
homepage: https://github.com/finogeeks/mop-flutter-sdk
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
|
Loading…
Reference in New Issue