1.加载网络图片

master
wangzhaoyao 2023-01-03 23:19:33 +08:00
parent 406964e027
commit 179eeacc95
2 changed files with 10 additions and 3 deletions

View File

@ -74,7 +74,14 @@
MopCustomMenuModel *model = [[MopCustomMenuModel alloc] init]; MopCustomMenuModel *model = [[MopCustomMenuModel alloc] init];
model.menuId = data[@"menuId"]; model.menuId = data[@"menuId"];
model.menuTitle = data[@"title"]; model.menuTitle = data[@"title"];
model.menuIconImage = [UIImage imageNamed:data[@"image"]]; NSString *imageUrl = data[@"image"];
if ([imageUrl hasPrefix:@"http"]) {
//
NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:imageUrl]];
model.menuIconImage = [UIImage imageWithData:data];
} else {
model.menuIconImage = [UIImage imageNamed:imageUrl];
}
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;

View File

@ -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.39.0-alpha20221222v09' s.dependency 'FinApplet' , '2.39.2-alpha20230103v04'
s.dependency 'FinAppletExt' , '2.39.0-alpha20221222v09' s.dependency 'FinAppletExt' , '2.39.2-alpha20230103v04'
end end