Commit d0466236 authored by 艾娇平's avatar 艾娇平

校验传入的链接

parent 1413cdc3
......@@ -24,15 +24,15 @@ extern NSString * const ShareVideoUrl;
// 获取分享平台渠道---埋点使用
static inline NSString *_getGMShareChannelByType(GMSharePlatform platformType) {
if (platformType & GMSharePlatformQQFriend) return @"qq";
if (platformType & GMSharePlatformQQSpace) return @"qzone";
if (platformType & GMSharePlatformWechatSession) return @"wechat";
if (platformType & GMSharePlatformWechatTimeline) return @"wechatline";
if (platformType & GMSharePlatformWechatSessionSnapShot) return @"wechat_snapshot";
if (platformType & GMSharePlatformWechatTimelineSnapShot) return @"wechatline_snapshot";
if (platformType & GMSharePlatformWechatMiniProgram) return @"xcx";
if (platformType & GMSharePlatformSinaWeibo) return @"tsina";
if (platformType & GMSharePlatformDouyin) return @"Douyin";
if (platformType & GMSharePlatformCopyLink) return @"copy_url";
if (platformType == GMSharePlatformQQFriend) return @"qq";
if (platformType == GMSharePlatformQQSpace) return @"qzone";
if (platformType == GMSharePlatformWechatSession) return @"wechat";
if (platformType == GMSharePlatformWechatTimeline) return @"wechatline";
if (platformType == GMSharePlatformWechatSessionSnapShot) return @"wechat_snapshot";
if (platformType == GMSharePlatformWechatTimelineSnapShot) return @"wechatline_snapshot";
if (platformType == GMSharePlatformWechatMiniProgram) return @"xcx";
if (platformType == GMSharePlatformSinaWeibo) return @"tsina";
if (platformType == GMSharePlatformDouyin) return @"Douyin";
if (platformType == GMSharePlatformCopyLink) return @"copy_url";
return @"Default";
}
......@@ -476,7 +476,11 @@
NSString *description = parameters[ShareText];
WXWebpageObject *ext = [WXWebpageObject object];
if ([url isKindOfClass:[NSURL class]]) {
ext.webpageUrl = url.absoluteString;
} else {
ext.webpageUrl = url;
}
WXMediaMessage *message = [WXMediaMessage message];
message.title = title;
......
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