Commit 571683a1 authored by Alex朱枝文's avatar Alex朱枝文

直播分享deeplink相关

parent af338af9
......@@ -530,7 +530,12 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
}
DispatchQueue.global().async {
YHShareManager.shared.createMutilShareShortUrl(type: 1, param: ["LiveID":String(self.liveId)]) { shortUrl, error in
var param: [String: String] = ["LiveID": String(self.liveId)]
if let userId = YHLoginManager.shared.userModel?.id, userId.count > 0 {
param["fromUserId"] = userId
param["sourceType"] = "1"
}
YHShareManager.shared.createMutilShareShortUrl(type: 1, param: param) { shortUrl, error in
if let url = shortUrl {
let tmpT = url.base64Encoded ?? ""//对deepLink使用 base64编码
var oldUrl = liveModel.live_h5_url
......@@ -539,9 +544,7 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
} else {
oldUrl = oldUrl + "?appDeepLink=\(tmpT)"
}
if let userId = YHLoginManager.shared.userModel?.id, userId.count > 0 {
oldUrl += "&sourceType=1&fromUserId=\(userId)"
}
YHShareAlertView.show(image: liveModel.live_image, title: "@" + liveModel.account, subMessage: liveModel.live_title, linkUrl: oldUrl, isLive: true, fromAiSale: true)
return
}
......
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