فهرست منبع

修改参数名称

wenweiwei 3 سال پیش
والد
کامیت
a9fc48b478
2فایلهای تغییر یافته به همراه6 افزوده شده و 6 حذف شده
  1. 3 3
      BFAnalyzeKit/Classes/BFBaseEventTrack.swift
  2. 3 3
      BFAnalyzeKit/Classes/BFEventTrackAdaptor.swift

+ 3 - 3
BFAnalyzeKit/Classes/BFBaseEventTrack.swift

@@ -125,7 +125,7 @@ public class BFBaseEventTrack: NSObject {
     /// - Returns: <#description#>
     public class func bf_videoReportUpload(url: String, videoId: String?, headVideoId: String?, playId: String?, recommendId: String?, recommendLogVO: String?, flowPool: String?, abInfoData: String?, measureType: Int?, measureId: Int?, targetUid: Int = 0, businessType: String?, objectType: String?, pageSource: String?, eventData: [String: Any]? = nil, extParams: [String: Any]? = nil, commonParams: [String: Any]? = nil) {
         DispatchQueue.global().async {
-            var params: [String: Any] = ["videoId": videoId ?? "", "pageSource": pageSource ?? "", "playId": playId ?? "", "targetUid": targetUid]
+            var params: [String: Any] = ["videoId": Int64(videoId ?? "") ?? 0, "pageSource": pageSource ?? "", "playId": playId ?? "", "targetUid": targetUid]
             if measureType != nil {
                 params["measureType"] = measureType
             }
@@ -159,10 +159,10 @@ public class BFBaseEventTrack: NSObject {
             // extParams
             var tempExtParams: [String: Any] = extParams ?? [:]
             if headVideoId != nil, (headVideoId?.count ?? 0) > 0 {
-                tempExtParams["headVideoId"] = (headVideoId ?? "0")
+                tempExtParams["headVideoId"] = Int64(headVideoId ?? "0") ?? 0
             }
             if videoId != nil, (videoId?.count ?? 0) > 0 {
-                tempExtParams["videoId"] = videoId ?? ""
+                tempExtParams["videoId"] = Int64(videoId ?? "") ?? 0
             }
             if tempEventData.keys.count > 0 {
                 params["eventData"] = bf_dictionaryToJsonString(tempEventData)

+ 3 - 3
BFAnalyzeKit/Classes/BFEventTrackAdaptor.swift

@@ -62,10 +62,10 @@ public class BFEventTrackAdaptor: NSObject {
                 tempExtParams["parentVideoId"] = parentVideoId ?? ""
             }
             if !tempExtParams.keys.contains("clickedVideoId") {
-                tempExtParams["videoId"] = "\(videoData?.id ?? 0)"
+                tempExtParams["videoId"] = Int64("\(videoData?.id ?? 0)") ?? 0
             }
             if headVideoId != nil, (headVideoId?.count ?? 0) > 0 {
-                tempExtParams["headVideoId"] = (headVideoId ?? "0")
+                tempExtParams["headVideoId"] = Int64(headVideoId ?? "0") ?? 0
             }
             if objectType == .ot_reproduce_clickButton || objectType == .ot_reproduce_collectionBar || objectType == .ot_reproduce_collectionClicButton || objectType == .ot_reproduce_sameSourceButton {
                 baseReportUpload(businessType: businessType, objectType: objectType, pageSource: pageSource != nil ? pageSource! : (videoData?.pageSource ?? .sp_category), extParams: tempExtParams, commonParams: commonParams)
@@ -78,7 +78,7 @@ public class BFEventTrackAdaptor: NSObject {
                     if videoIds != nil, !videoIds!.isEmpty {
                         params["videoIds"] = videoIds
                     } else {
-                        params["videoIds"] = "\(videoData?.id ?? 0)"
+                        params["videoIds"] = Int64("\(videoData?.id ?? 0)") ?? 0
                     }
                     params["viewId"] = ("\(Date().timeIntervalSince1970)" + "\(videoData?.id ?? 0)viewId" + "\(arc4random_uniform(1_000_000_000))")
                 case .reportLogType_realPlay: