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
1089017e
Commit
1089017e
authored
4 years ago
by
艾娇平
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ajp/dev' into 'master'
Ajp/dev See merge request
!10
parents
549e4965
6a0dbe0c
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
32 deletions
+40
-32
GMDiaryShareView.m
GMShareSDK/Classes/Share/GMDiaryShareView.m
+8
-11
GMShareView.m
GMShareSDK/Classes/Share/GMShareView.m
+17
-17
GMShareSDK.m
GMShareSDK/Classes/ShareSDK/GMShareSDK.m
+15
-4
No files found.
GMShareSDK/Classes/Share/GMDiaryShareView.m
View file @
1089017e
...
@@ -12,9 +12,6 @@
...
@@ -12,9 +12,6 @@
#import "GMShareConstant.h"
#import "GMShareConstant.h"
#import <MBProgressHUD/MBProgressHUD.h>
#import <MBProgressHUD/MBProgressHUD.h>
#import <GMPhobos/Phobos.h>
#import <GMPhobos/UIResponder+PhobosPV.h>
#import <GMKit/UIColor+GMTheme.h>
#import <GMKit/UIColor+GMTheme.h>
#import <GMKit/Constant.h>
#import <GMKit/Constant.h>
#import <GMKit/GMFont.h>
#import <GMKit/GMFont.h>
...
@@ -25,7 +22,7 @@
...
@@ -25,7 +22,7 @@
#import <GMKit/UIView+SafeArea.h>
#import <GMKit/UIView+SafeArea.h>
#import <GMKit/GMSafeValue.h>
#import <GMKit/GMSafeValue.h>
#import <GMKit/UIView+Layout.h>
#import <GMKit/UIView+Layout.h>
@import
GMPhobos
;
@interface
GMDiaryShareView
()
@interface
GMDiaryShareView
()
@property
(
nonatomic
,
strong
)
GMView
*
bgView
;
@property
(
nonatomic
,
strong
)
GMView
*
bgView
;
...
@@ -183,13 +180,13 @@
...
@@ -183,13 +180,13 @@
-
(
void
)
phobosClickShareWithType
:(
GMSharePlatform
)
type
{
-
(
void
)
phobosClickShareWithType
:(
GMSharePlatform
)
type
{
if
([
self
.
delegate
isKindOfClass
:[
UIResponder
class
]])
{
if
([
self
.
delegate
isKindOfClass
:[
UIResponder
class
]])
{
UIResponder
*
phobosView
=
(
UIResponder
*
)
self
.
delegate
;
UIResponder
*
phobosView
=
(
UIResponder
*
)
self
.
delegate
;
NSDictionary
*
dic
=
@{
@"page_name"
:
SafeValue
(
phobosView
.
pageName
),
@"business_id"
:
SafeValue
(
phobosView
.
businessId
),
NSMutableDictionary
*
paramsM
=
[
NSMutableDictionary
dictionaryWithDictionary
:[
NSObject
trackerPageParam
:
self
]];
@"url"
:
SafeValue
(
self
.
shareUrl
),
[
paramsM
addEntriesFromDictionary
:@{
@"url"
:
SafeString
(
self
.
shareUrl
),
@"share_channel"
:
_getGMShareChannelByType
(
type
),
@"share_channel"
:
_getGMShareChannelByType
(
type
),
@"task_type"
:
@"diary"
,
@"task_type"
:
@"diary"
,
@"business"
:
@"diary_id"
}
;
@"business"
:
@"diary_id"
}]
;
[
Phobos
track
:
@"page_click_share_channel"
attributes
:
dic
];
[
Phobos
track
:
@"page_click_share_channel"
attributes
:
paramsM
];
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
GMShareSDK/Classes/Share/GMShareView.m
View file @
1089017e
...
@@ -493,13 +493,14 @@ static NSString *shareCellIdentifier = @"shareCellIdentifier";
...
@@ -493,13 +493,14 @@ static NSString *shareCellIdentifier = @"shareCellIdentifier";
// 配合使用主项目中的“synchronizePVData”可以同步埋点通用参数
// 配合使用主项目中的“synchronizePVData”可以同步埋点通用参数
pageName
=
self
.
pageName
;
pageName
=
self
.
pageName
;
}
}
NSDictionary
*
dic
=
@{
@"page_name"
:
SafeString
(
pageName
),
NSMutableDictionary
*
paramsM
=
[
NSMutableDictionary
dictionaryWithDictionary
:[
NSObject
trackerPageParam
:
self
]];
@"business_id"
:
SafeString
(
businessId
),
[
paramsM
addEntriesFromDictionary
:@{
@"page_name"
:
SafeString
(
pageName
),
@"url"
:
SafeString
(
self
.
shareUrl
),
@"business_id"
:
SafeString
(
businessId
),
// @"service_item_id": SafeString(phobosView.serviceItemId),
@"url"
:
SafeString
(
self
.
shareUrl
)}];
if
([
self
.
extraParam
isNonEmpty
])
{
};
[
paramsM
addEntriesFromDictionary
:[
NSDictionary
dictionaryWithJsonString
:
self
.
extraParam
]];
[
Phobos
track
:
@"page_click_share"
attributes
:
dic
];
}
[
Phobos
track
:
@"page_click_share"
attributes
:
paramsM
];
}
}
}
}
...
@@ -523,16 +524,15 @@ static NSString *shareCellIdentifier = @"shareCellIdentifier";
...
@@ -523,16 +524,15 @@ static NSString *shareCellIdentifier = @"shareCellIdentifier";
}
}
NSAssert
([
self
.
shareUrl
isNonEmpty
],
@"shareView.shareUrl 不应该为空"
);
NSAssert
([
self
.
shareUrl
isNonEmpty
],
@"shareView.shareUrl 不应该为空"
);
NSDictionary
*
dic
=
@{
@"page_name"
:
SafeString
(
pageName
),
NSMutableDictionary
*
paramsM
=
[
NSMutableDictionary
dictionaryWithDictionary
:[
NSObject
trackerPageParam
:
self
]];
@"business_id"
:
SafeString
(
businessId
),
[
paramsM
addEntriesFromDictionary
:@{
@"url"
:
SafeString
(
self
.
shareUrl
),
@"url"
:
SafeString
(
self
.
shareUrl
),
@"share_channel"
:
_getGMShareChannelByType
(
type
),
@"share_channel"
:
_getGMShareChannelByType
(
type
),
@"task_type"
:
SafeString
(
self
.
taskType
),
@"task_type"
:
SafeString
(
self
.
taskType
),
@"business"
:
@"channel"
}];
@"business"
:
@"channel"
,
if
([
self
.
extraParam
isNonEmpty
])
{
// @"service_item_id": SafeString(phobosView.serviceItemId),
[
paramsM
addEntriesFromDictionary
:[
NSDictionary
dictionaryWithJsonString
:
self
.
extraParam
]];
}
};
[
Phobos
track
:
@"page_click_share_channel"
attributes
:
paramsM
];
[
Phobos
track
:
@"page_click_share_channel"
attributes
:
dic
];
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
GMShareSDK/Classes/ShareSDK/GMShareSDK.m
View file @
1089017e
...
@@ -234,11 +234,13 @@
...
@@ -234,11 +234,13 @@
-
(
void
)
QQFriendShareWithParameters
:
(
NSDictionary
*
)
parameters
{
-
(
void
)
QQFriendShareWithParameters
:
(
NSDictionary
*
)
parameters
{
UIImage
*
thumbImage
=
parameters
[
ShareImage
]?:[
UIImage
imageNamed
:
@"icon"
];
UIImage
*
thumbImage
=
parameters
[
ShareImage
]?:[
UIImage
imageNamed
:
@"icon"
];
NSURL
*
url
=
parameters
[
ShareUrl
];
// ShareUrl 传入的不一定是NSURL,有可能是NSString
if
(
!
[
url
isKindOfClass
:[
NSURL
class
]])
{
url
=
[
NSURL
URLWithString
:
url
];
}
NSURL
*
url
=
parameters
[
ShareUrl
];
NSString
*
title
=
parameters
[
ShareTitle
];
NSString
*
title
=
parameters
[
ShareTitle
];
NSString
*
description
=
parameters
[
ShareText
];
NSString
*
description
=
parameters
[
ShareText
];
QQApiNewsObject
*
img
=
[
QQApiNewsObject
objectWithURL
:
url
title
:
title
description
:
description
previewImageData
:
UIImagePNGRepresentation
(
thumbImage
)];
QQApiNewsObject
*
img
=
[
QQApiNewsObject
objectWithURL
:
url
title
:
title
description
:
description
previewImageData
:
UIImagePNGRepresentation
(
thumbImage
)];
SendMessageToQQReq
*
req
=
[
SendMessageToQQReq
reqWithContent
:
img
];
SendMessageToQQReq
*
req
=
[
SendMessageToQQReq
reqWithContent
:
img
];
img
.
shareDestType
=
ShareDestTypeQQ
;
img
.
shareDestType
=
ShareDestTypeQQ
;
...
@@ -257,7 +259,10 @@
...
@@ -257,7 +259,10 @@
}
else
{
}
else
{
previewImage
=
images
;
previewImage
=
images
;
}
}
NSURL
*
url
=
parameters
[
ShareUrl
];
NSURL
*
url
=
parameters
[
ShareUrl
];
// ShareUrl 传入的不一定是NSURL,有可能是NSString
if
(
!
[
url
isKindOfClass
:[
NSURL
class
]])
{
url
=
[
NSURL
URLWithString
:
url
];
}
NSString
*
title
=
parameters
[
ShareTitle
];
NSString
*
title
=
parameters
[
ShareTitle
];
NSString
*
description
=
parameters
[
ShareText
];
NSString
*
description
=
parameters
[
ShareText
];
NSData
*
data
=
UIImagePNGRepresentation
(
previewImage
);
NSData
*
data
=
UIImagePNGRepresentation
(
previewImage
);
...
@@ -421,7 +426,13 @@
...
@@ -421,7 +426,13 @@
-
(
void
)
wechatMiniProgramWithParameters
:
(
NSDictionary
*
)
parameters
scene
:
(
int
)
scene
{
-
(
void
)
wechatMiniProgramWithParameters
:
(
NSDictionary
*
)
parameters
scene
:
(
int
)
scene
{
dispatch_async
(
dispatch_get_global_queue
(
0
,
0
),
^
{
dispatch_async
(
dispatch_get_global_queue
(
0
,
0
),
^
{
WXMiniProgramObject
*
wxMiniObject
=
[
WXMiniProgramObject
object
];
WXMiniProgramObject
*
wxMiniObject
=
[
WXMiniProgramObject
object
];
wxMiniObject
.
webpageUrl
=
parameters
[
ShareUrl
];
NSString
*
webpageUrl
=
parameters
[
ShareUrl
];
// ShareUrl 传入的不一定是NSURL,有可能是NSString
if
([
webpageUrl
isKindOfClass
:[
NSURL
class
]])
{
NSURL
*
url
=
(
NSURL
*
)
webpageUrl
;
webpageUrl
=
url
.
absoluteString
;
}
wxMiniObject
.
webpageUrl
=
webpageUrl
;
wxMiniObject
.
userName
=
parameters
[
ShareUserName
];
wxMiniObject
.
userName
=
parameters
[
ShareUserName
];
wxMiniObject
.
path
=
parameters
[
SharePath
];
wxMiniObject
.
path
=
parameters
[
SharePath
];
// 压缩图片(不大于128K)
// 压缩图片(不大于128K)
...
...
This diff is collapsed.
Click to expand it.
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