Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
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
mobile-group
galaxy-iOS
Commits
050e447b
Commit
050e447b
authored
Feb 26, 2025
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播分享相关
parent
afc70514
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
2 deletions
+38
-2
AppDelegate.swift
galaxy/galaxy/AppDelegate.swift
+11
-1
YHLivePlayerViewController.swift
.../LivestreamSales(直播销售)/C/YHLivePlayerViewController.swift
+3
-1
YHLiveSalesViewModel.swift
...dules/LivestreamSales(直播销售)/VM/YHLiveSalesViewModel.swift
+22
-0
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+2
-0
No files found.
galaxy/galaxy/AppDelegate.swift
View file @
050e447b
...
@@ -21,6 +21,7 @@ import HyphenateChat
...
@@ -21,6 +21,7 @@ import HyphenateChat
@main
@main
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
,
WXApiDelegate
{
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
,
WXApiDelegate
{
private
lazy
var
liveViewModel
=
YHLiveSalesViewModel
()
var
window
:
UIWindow
?
var
window
:
UIWindow
?
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplication
.
LaunchOptionsKey
:
Any
]?)
->
Bool
{
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplication
.
LaunchOptionsKey
:
Any
]?)
->
Bool
{
...
@@ -69,7 +70,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
...
@@ -69,7 +70,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
YHOSSManager
.
share
.
getOSSID
()
YHOSSManager
.
share
.
getOSSID
()
AGCInstance
.
startUp
()
AGCInstance
.
startUp
()
AGCAppLinking
.
instance
()
.
handle
{
(
link
,
error
)
in
AGCAppLinking
.
instance
()
.
handle
{
[
weak
self
]
(
link
,
error
)
in
guard
let
self
=
self
else
{
return
}
if
let
deepLink
=
link
?
.
deepLink
,
deepLink
.
contains
(
YhConstant
.
DeepLink
.
compareUrl
)
{
if
let
deepLink
=
link
?
.
deepLink
,
deepLink
.
contains
(
YhConstant
.
DeepLink
.
compareUrl
)
{
if
let
url
=
URL
(
string
:
deepLink
)
{
if
let
url
=
URL
(
string
:
deepLink
)
{
let
components
=
URLComponents
(
url
:
url
,
resolvingAgainstBaseURL
:
false
)
let
components
=
URLComponents
(
url
:
url
,
resolvingAgainstBaseURL
:
false
)
...
@@ -92,6 +96,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
...
@@ -92,6 +96,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
}
}
//直播 - 获取它对应的参数
//直播 - 获取它对应的参数
if
let
liveId
=
arrItems
[
"LiveID"
]
as?
String
{
if
let
liveId
=
arrItems
[
"LiveID"
]
as?
String
{
if
let
userId
=
arrItems
[
"fromUserId"
]
as?
String
,
let
sourceType
=
arrItems
[
"sourceType"
]
as?
String
{
self
.
liveViewModel
.
postLiveViewRecords
(
id
:
liveId
.
intValue
(),
userId
:
userId
,
sourceType
:
sourceType
.
intValue
())
{
_
,
_
in
//
}
}
let
playbackInfo
=
YHPlayerManager
.
PlaybackInfo
(
id
:
liveId
.
intValue
(),
isLive
:
true
,
isFromSaleDetail
:
false
)
let
playbackInfo
=
YHPlayerManager
.
PlaybackInfo
(
id
:
liveId
.
intValue
(),
isLive
:
true
,
isFromSaleDetail
:
false
)
YHPlayerManager
.
shared
.
enterLive
(
from
:
nil
,
playbackInfo
:
playbackInfo
)
YHPlayerManager
.
shared
.
enterLive
(
from
:
nil
,
playbackInfo
:
playbackInfo
)
}
}
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/C/YHLivePlayerViewController.swift
View file @
050e447b
...
@@ -539,7 +539,9 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
...
@@ -539,7 +539,9 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
}
else
{
}
else
{
oldUrl
=
oldUrl
+
"?appDeepLink=
\(
tmpT
)
"
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
)
YHShareAlertView
.
show
(
image
:
liveModel
.
live_image
,
title
:
"@"
+
liveModel
.
account
,
subMessage
:
liveModel
.
live_title
,
linkUrl
:
oldUrl
,
isLive
:
true
,
fromAiSale
:
true
)
return
return
}
}
...
...
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/VM/YHLiveSalesViewModel.swift
View file @
050e447b
...
@@ -328,6 +328,28 @@ extension YHLiveSalesViewModel {
...
@@ -328,6 +328,28 @@ extension YHLiveSalesViewModel {
callback
(
nil
,
err
)
callback
(
nil
,
err
)
}
}
}
}
func
postLiveViewRecords
(
id
:
Int
,
userId
:
String
,
sourceType
:
Int
,
callback
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
Void
)
{
let
params
:
[
String
:
Any
]
=
[
"live_id"
:
id
,
"from_user_id"
:
userId
,
"view_port"
:
1
,
"source_type"
:
sourceType
,
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
LiveSales
.
viewRecords
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
json
,
_
in
// 1. json字符串 转 对象
printLog
(
"model 是 ==>
\(
json
)
"
)
if
json
.
code
==
200
{
callback
(
true
,
nil
)
}
else
{
let
err
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
.
isEmpty
?
""
:
json
.
msg
)
callback
(
false
,
err
)
}
}
failBlock
:
{
err
in
callback
(
false
,
err
)
}
}
}
}
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
050e447b
...
@@ -732,6 +732,8 @@ class YHAllApiName {
...
@@ -732,6 +732,8 @@ class YHAllApiName {
static
let
shareLive
=
"super-app/live/share-live"
static
let
shareLive
=
"super-app/live/share-live"
// app直播间状态
// app直播间状态
static
let
liveStatus
=
"super-app/live/live-status"
static
let
liveStatus
=
"super-app/live/live-status"
// 查看浏览记录
static
let
viewRecords
=
"super-app/live/viewing-records"
}
}
struct
AIChat
{
struct
AIChat
{
...
...
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