Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
GMShareSDK
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
GMShareSDK
Commits
20682ed0
Commit
20682ed0
authored
Mar 07, 2020
by
汪洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码要在主线程执行
parent
5b013e70
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
GMShareSDK.m
GMShareSDK/Classes/ShareSDK/GMShareSDK.m
+3
-12
No files found.
GMShareSDK/Classes/ShareSDK/GMShareSDK.m
View file @
20682ed0
...
...
@@ -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
)
{}];
});
});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment