master
wangzhaoyao 2023-01-08 22:08:24 +08:00
parent 42f9966497
commit c3b340b0b1
1 changed files with 4 additions and 5 deletions

View File

@ -94,8 +94,8 @@ static MopPlugin *_instance;
result(dict); result(dict);
} }
else if ([@"showShareAppletDialog" isEqualToString:call.method]) { else if ([@"showShareAppletDialog" isEqualToString:call.method]) {
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
UIImage *image = [MOPTools getCurrentPageImage]; UIImage *image = [[FATClient sharedClient] getDefaultCurrentAppletImage:440.0f];
MopShareView *view = [MopShareView viewWithData:call.arguments]; MopShareView *view = [MopShareView viewWithData:call.arguments];
view.image = image; view.image = image;
[view show]; [view show];
@ -123,12 +123,11 @@ static MopPlugin *_instance;
result([self appInfoDictWithAppId:call.arguments[@"appId"]]); result([self appInfoDictWithAppId:call.arguments[@"appId"]]);
} }
else if ([@"getScreenshot" isEqualToString:call.method]) { else if ([@"getScreenshot" isEqualToString:call.method]) {
UIViewController *currentVC = [MOPTools topViewController]; // UIViewController *currentVC = [MOPTools topViewController];
// [currentVC.view fatHideToastActivity]; // [currentVC.view fatHideToastActivity];
// [currentVC.view fatHideAllToasts]; // [currentVC.view fatHideAllToasts];
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// UIImage *image = [[FATClient sharedClient] getDefaultCurrentAppletImage:0.0f]; UIImage *image = [[FATClient sharedClient] getDefaultCurrentAppletImage:0.0f];
UIImage *image = [MOPTools getCurrentPageImage];
NSString *filePtah = [[FATClient sharedClient] saveFile:UIImagePNGRepresentation(image) fileName:[NSString stringWithFormat:@"%@",call.arguments[@"appId"]]]; NSString *filePtah = [[FATClient sharedClient] saveFile:UIImagePNGRepresentation(image) fileName:[NSString stringWithFormat:@"%@",call.arguments[@"appId"]]];
filePtah = [[FATClient sharedClient] fat_absolutePathWithPath:filePtah]; filePtah = [[FATClient sharedClient] fat_absolutePathWithPath:filePtah];
result(filePtah); result(filePtah);