Commit 20682ed0 authored by 汪洋's avatar 汪洋

代码要在主线程执行

parent 5b013e70
......@@ -430,15 +430,6 @@
}
- (void)wechatMiniProgramWithParameters: (NSDictionary *)parameters scene:(int)scene {
#ifndef APPSTORE
// if ([GMServerDomains.apiHost isEqualToString:@"http://ibackend.igengmei.com"] || [GMServerDomains.apiHost isEqualToString:@"http://backend.igengmei.com"] || [GMServerDomains.apiHost isEqualToString:@""]) {
// [UIAlertController gm_Alert:@"当前环境,APP和小程序未绑定在同一微信开发平台账号,无法分享成功" leftTitle:@"OK" rightTitle:@"OK" leftAlterAction:^{
// } rightAlertAction:^{
// }];
// [AppDelegate.visibleController presentViewController:alert animated:YES completion:nil];
// return;
// }
#endif
dispatch_async(dispatch_get_global_queue(0, 0), ^{
WXMiniProgramObject *wxMiniObject = [WXMiniProgramObject object];
wxMiniObject.webpageUrl = parameters[@"url"];
......@@ -460,10 +451,12 @@
req.message = message;
req.scene = scene;
// 转回到主线程
dispatch_async(dispatch_get_main_queue(), ^{
[WXApi sendReq:req completion:^(BOOL success) {
}];
});
});
}
- (void)wechatImageShareWithParameters: (NSDictionary *)parameters scene:(int)scene{
......@@ -506,9 +499,7 @@
SendMessageToWXReq* req = [self requestWithText:nil OrMediaMessage:message bText:NO InScene:scene];
// 转回到主线程
dispatch_sync(dispatch_get_main_queue(), ^{
[WXApi sendReq:req completion:^(BOOL success) {
}];
[WXApi sendReq:req completion:^(BOOL success) {}];
});
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment