|
@@ -214,7 +214,7 @@ public class PQEventTrackViewModel: NSObject {
|
|
|
// - businessType: <#businessType description#>
|
|
|
// - targetUid: <#targetUid description#>
|
|
|
// - shareId: <#shareId description#>
|
|
|
- public class func shareReportUpload(isShareVideo: Bool = true, screenType: Int = 1, videoId: String, pageSource: PAGESOURCE, recommendId: String?, recommendLogVO: String?,flowPool:String?, abInfoData: String?, measureType: Int?, measureId: Int?, businessType: businessType?, targetUid: Int?, shareId: String = "",playId:String?,extParams: [String: Any]? = nil) {
|
|
|
+ public class func shareReportUpload(isShareVideo: Bool = true, screenType: Int = 1, videoId: String, pageSource: PAGESOURCE, recommendId: String?, recommendLogVO: String?,flowPool:String?, abInfoData: String?, measureType: Int?, measureId: Int?, businessType: businessType?, targetUid: Int?, shareId: String = "",playId:String?, params: [String: Any]? = nil, eventData: [String: Any]? = nil,extParams: [String: Any]? = nil) {
|
|
|
DispatchQueue.global().async {
|
|
|
var url: String = PQENVUtil.shared.longvideoapi
|
|
|
switch screenType {
|
|
@@ -227,47 +227,56 @@ public class PQEventTrackViewModel: NSObject {
|
|
|
default:
|
|
|
break
|
|
|
}
|
|
|
- var params: [String: Any] = ["type": isShareVideo ? "1" : "2", "videoId": videoId, "pageSource": pageSource.rawValue, "playId": playId ?? "", "targetUid": targetUid ?? 0, "shareDepth": "0"]
|
|
|
+ var tempParams: [String: Any] = params ?? [:]
|
|
|
+ tempParams["type"] = isShareVideo ? "1" : "2"
|
|
|
+ tempParams["videoId"] = videoId
|
|
|
+ tempParams["pageSource"] = pageSource.rawValue
|
|
|
+ tempParams["playId"] = playId ?? ""
|
|
|
+ tempParams["targetUid"] = targetUid ?? 0
|
|
|
+ tempParams["shareDepth"] = "0"
|
|
|
if extParams != nil {
|
|
|
- params["extParams"] = dictionaryToJsonString(extParams!)
|
|
|
+ tempParams["extParams"] = dictionaryToJsonString(extParams!)
|
|
|
+ }
|
|
|
+ if eventData != nil {
|
|
|
+ tempParams["eventData"] = dictionaryToJsonString(eventData!)
|
|
|
}
|
|
|
if measureType != nil {
|
|
|
- params["measureType"] = measureType
|
|
|
+ tempParams["measureType"] = measureType
|
|
|
}
|
|
|
if measureId != nil {
|
|
|
- params["measureId"] = measureId
|
|
|
+ tempParams["measureId"] = measureId
|
|
|
}
|
|
|
- params["shareId"] = shareId
|
|
|
- params["rootLaunchShareId"] = shareId
|
|
|
- params["parentShareId"] = shareId
|
|
|
- params["rootShareId"] = shareId
|
|
|
+ tempParams["shareId"] = shareId
|
|
|
+ tempParams["rootLaunchShareId"] = shareId
|
|
|
+ tempParams["parentShareId"] = shareId
|
|
|
+ tempParams["rootShareId"] = shareId
|
|
|
if !BFLoginUserInfo.shared.openId.isEmpty {
|
|
|
- params["shareUi"] = BFLoginUserInfo.shared.openId
|
|
|
+ tempParams["shareUi"] = BFLoginUserInfo.shared.openId
|
|
|
}
|
|
|
if pageSource.rawValue.contains("speedApp-category") {
|
|
|
- params["pageCategoryId"] = 55
|
|
|
+ tempParams["pageCategoryId"] = 55
|
|
|
}
|
|
|
if isShareVideo {
|
|
|
- params["shareObjectId"] = videoId
|
|
|
+ tempParams["shareObjectId"] = videoId
|
|
|
} else {
|
|
|
- params["shareObjectId"] = targetUid
|
|
|
+ tempParams["shareObjectId"] = targetUid
|
|
|
}
|
|
|
if businessType != nil {
|
|
|
- params["businessType"] = businessType?.rawValue
|
|
|
+ tempParams["businessType"] = businessType?.rawValue
|
|
|
}
|
|
|
if recommendId != nil, !(recommendId?.isEmpty ?? true) {
|
|
|
- params["recommendId"] = recommendId
|
|
|
+ tempParams["recommendId"] = recommendId
|
|
|
}
|
|
|
if recommendLogVO != nil, !(recommendLogVO?.isEmpty ?? true) {
|
|
|
- params["recommendLogVO"] = recommendLogVO
|
|
|
+ tempParams["recommendLogVO"] = recommendLogVO
|
|
|
}
|
|
|
if flowPool != nil, (flowPool?.count ?? 0) > 0 {
|
|
|
- params["flowPool"] = flowPool
|
|
|
+ tempParams["flowPool"] = flowPool
|
|
|
}
|
|
|
if abInfoData != nil, !(abInfoData?.isEmpty ?? true) {
|
|
|
- params["abInfoData"] = abInfoData
|
|
|
+ tempParams["abInfoData"] = abInfoData
|
|
|
}
|
|
|
- BFNetRequestAdaptor.postRequestData(url: url, parames: params,commonParams: commonParams()) { response, _, error, _ in
|
|
|
+ BFNetRequestAdaptor.postRequestData(url: url, parames: tempParams,commonParams: commonParams()) { response, _, error, _ in
|
|
|
BFLog(message: "用户点击分享数据上报:\(String(describing: error)),\(response ?? [:])")
|
|
|
}
|
|
|
}
|