Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
iOSTeam
/
Majiabao
/
TealiveModule
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
29e52b4b
authored
Aug 20, 2023
by
pierce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
9c119de5
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
135 additions
and
78 deletions
Module/GDDataManager/GDDataManager.xcodeproj/project.pbxproj
Module/GDDataManager/GDDataManager/DataCenter/GDDataManager.swift
Module/GDDataManager/GDDataManager/DataCenter/Model/GDAliOSSModel.swift
Module/GDDataManager/GDDataManager/DataCenter/Model/GDLevelModel.swift
Module/GDDataManager/GDDataManager/DataCenter/Model/GDShareTipsModel.swift
Module/GDDataManager/GDDataManager/DataCenter/Network/GDDataManagerAPI.swift
Module/GDDataManager/GDDataManager/DataCenter/Network/GDDataManagerHttpHelper.swift
Module/GDDataManager/GDDataManager/DataCenter/Network/GDDataManagerSocket.swift
Module/GDDataManager/GDDataManager/DataCenter/ResourceCenter/Downloader/GDResourceDownloader.swift
Module/GDToolBox/GDToolBox/Foundation/Socket/GDSocketLauncher.swift
Module/GDToolBox/GDToolBox/GDToolBoxPlugins/Plugins/GDToolBoxLivePlugin.swift
Module/GDToolBox/GDToolBox/GDToolBoxPlugins/Plugins/GDToolBoxUserCenterPlugin.swift
Module/GDToolBox/GDToolBox/Network/GDToolBoxSetupAPI.swift
Module/GDToolBox/GDToolBox/Tool/Data/Date.swift
Module/GDToolBox/GDToolBox/Tool/Data/GDTimeHelper.swift
Module/GDToolBox/GDToolBox/Tool/Data/String.swift
Module/GDToolBox/Other/BridgeHeader.h
Module/HostManager/HostManager/HostManager.swift
Module/Router/Router/Service/Module/GDUserManagerService.swift
Module/GDDataManager/GDDataManager.xcodeproj/project.pbxproj
View file @
29e52b4b
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
BEABC74D29A0CC850043716F
/* GDDataManagerHttpHelper.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BEABC74C29A0CC850043716F
/* GDDataManagerHttpHelper.swift */
;
};
BEABC74D29A0CC850043716F
/* GDDataManagerHttpHelper.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BEABC74C29A0CC850043716F
/* GDDataManagerHttpHelper.swift */
;
};
BEABC76029A0DB210043716F
/* GDDataManagerPlugin.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BEABC75F29A0DB210043716F
/* GDDataManagerPlugin.swift */
;
};
BEABC76029A0DB210043716F
/* GDDataManagerPlugin.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BEABC75F29A0DB210043716F
/* GDDataManagerPlugin.swift */
;
};
BEE945A529A0F16A006632C7
/* GDDataManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
38E95B07294824B900DE03BC
/* GDDataManager.swift */
;
};
BEE945A529A0F16A006632C7
/* GDDataManager.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
38E95B07294824B900DE03BC
/* GDDataManager.swift */
;
};
BEE945A729A36535006632C7
/* GDDataManagerSocket.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BEE945A629A36535006632C7
/* GDDataManagerSocket.swift */
;
};
/* End PBXBuildFile section */
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
/* Begin PBXFileReference section */
...
@@ -88,6 +89,7 @@
...
@@ -88,6 +89,7 @@
BEABC74A29A0CB0E0043716F
/* GDDataManagerProvider.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GDDataManagerProvider.swift
;
sourceTree
=
"<group>"
;
};
BEABC74A29A0CB0E0043716F
/* GDDataManagerProvider.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GDDataManagerProvider.swift
;
sourceTree
=
"<group>"
;
};
BEABC74C29A0CC850043716F
/* GDDataManagerHttpHelper.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GDDataManagerHttpHelper.swift
;
sourceTree
=
"<group>"
;
};
BEABC74C29A0CC850043716F
/* GDDataManagerHttpHelper.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GDDataManagerHttpHelper.swift
;
sourceTree
=
"<group>"
;
};
BEABC75F29A0DB210043716F
/* GDDataManagerPlugin.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GDDataManagerPlugin.swift
;
sourceTree
=
"<group>"
;
};
BEABC75F29A0DB210043716F
/* GDDataManagerPlugin.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GDDataManagerPlugin.swift
;
sourceTree
=
"<group>"
;
};
BEE945A629A36535006632C7
/* GDDataManagerSocket.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
GDDataManagerSocket.swift
;
sourceTree
=
"<group>"
;
};
E09E192CDCD2C79356954BE8
/* Pods_GDDataManager.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
includeInIndex
=
0
;
path
=
Pods_GDDataManager.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
E09E192CDCD2C79356954BE8
/* Pods_GDDataManager.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
includeInIndex
=
0
;
path
=
Pods_GDDataManager.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
/* End PBXFileReference section */
/* End PBXFileReference section */
...
@@ -205,6 +207,7 @@
...
@@ -205,6 +207,7 @@
BEABC710299F72470043716F
/* GDDataManagerAPI.swift */
,
BEABC710299F72470043716F
/* GDDataManagerAPI.swift */
,
BEABC74A29A0CB0E0043716F
/* GDDataManagerProvider.swift */
,
BEABC74A29A0CB0E0043716F
/* GDDataManagerProvider.swift */
,
BEABC74C29A0CC850043716F
/* GDDataManagerHttpHelper.swift */
,
BEABC74C29A0CC850043716F
/* GDDataManagerHttpHelper.swift */
,
BEE945A629A36535006632C7
/* GDDataManagerSocket.swift */
,
);
);
path
=
Network
;
path
=
Network
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -389,6 +392,7 @@
...
@@ -389,6 +392,7 @@
BEABC74929A080E50043716F
/* GDBroadcastModel.swift in Sources */
,
BEABC74929A080E50043716F
/* GDBroadcastModel.swift in Sources */
,
BEABC73D29A080E50043716F
/* GDLevelModel.swift in Sources */
,
BEABC73D29A080E50043716F
/* GDLevelModel.swift in Sources */
,
38E95B28294829DB00DE03BC
/* GDAudienceInviteCenter.swift in Sources */
,
38E95B28294829DB00DE03BC
/* GDAudienceInviteCenter.swift in Sources */
,
BEE945A729A36535006632C7
/* GDDataManagerSocket.swift in Sources */
,
38E95B27294829DB00DE03BC
/* GDAudienceInvitedModel.swift in Sources */
,
38E95B27294829DB00DE03BC
/* GDAudienceInvitedModel.swift in Sources */
,
BEABC73B29A080E50043716F
/* GDDailySignRewardModel.swift in Sources */
,
BEABC73B29A080E50043716F
/* GDDailySignRewardModel.swift in Sources */
,
BEABC727299F854A0043716F
/* GDResourceCenter.swift in Sources */
,
BEABC727299F854A0043716F
/* GDResourceCenter.swift in Sources */
,
...
...
Module/GDDataManager/GDDataManager/DataCenter/GDDataManager.swift
View file @
29e52b4b
...
@@ -185,7 +185,7 @@ public class GDDataManager: BaseViewModel {
...
@@ -185,7 +185,7 @@ public class GDDataManager: BaseViewModel {
}
}
/// 初始化数据
/// 初始化数据
override
func
setupViewModel
()
{
public
override
func
setupViewModel
()
{
super
.
setupViewModel
()
super
.
setupViewModel
()
loadLocalDefaultData
()
loadLocalDefaultData
()
...
@@ -212,7 +212,7 @@ public class GDDataManager: BaseViewModel {
...
@@ -212,7 +212,7 @@ public class GDDataManager: BaseViewModel {
newWearNum
.
subscribe
(
onNext
:
{
newWearNum
in
newWearNum
.
subscribe
(
onNext
:
{
newWearNum
in
if
var
dict
=
GDUserDefault
.
read
(
GDUserDefault
.
Data
.
newWearNum
)
as?
[
String
:
String
]
{
if
var
dict
=
GDUserDefault
.
read
(
GDUserDefault
.
Data
.
newWearNum
)
as?
[
String
:
String
]
{
if
let
uid
=
UserCenter
.
shared
.
user
.
value
.
uid
{
if
let
uid
=
GDRouter
.
UserRouter
?
.
uid
{
if
uid
.
count
>
0
{
if
uid
.
count
>
0
{
dict
[
uid
]
=
"
\(
newWearNum
)
"
dict
[
uid
]
=
"
\(
newWearNum
)
"
GDUserDefault
.
write
(
dict
,
key
:
GDUserDefault
.
Data
.
newWearNum
)
GDUserDefault
.
write
(
dict
,
key
:
GDUserDefault
.
Data
.
newWearNum
)
...
@@ -220,7 +220,7 @@ public class GDDataManager: BaseViewModel {
...
@@ -220,7 +220,7 @@ public class GDDataManager: BaseViewModel {
}
}
}
else
{
}
else
{
if
let
uid
=
UserCenter
.
shared
.
user
.
value
.
uid
{
if
let
uid
=
GDRouter
.
UserRouter
?
.
uid
{
if
uid
.
count
>
0
{
if
uid
.
count
>
0
{
GDUserDefault
.
write
([
uid
:
"
\(
newWearNum
)
"
],
key
:
GDUserDefault
.
Data
.
newWearNum
)
GDUserDefault
.
write
([
uid
:
"
\(
newWearNum
)
"
],
key
:
GDUserDefault
.
Data
.
newWearNum
)
}
}
...
@@ -283,15 +283,15 @@ public class GDDataManager: BaseViewModel {
...
@@ -283,15 +283,15 @@ public class GDDataManager: BaseViewModel {
self
.
motorNewMid
.
subscribe
(
onNext
:
{
dict
in
self
.
motorNewMid
.
subscribe
(
onNext
:
{
dict
in
GDUserDefault
.
write
(
dict
,
key
:
GDUserDefault
.
Data
.
newMotorId
+
UserCenter
.
shared
.
uid
)
GDUserDefault
.
write
(
dict
,
key
:
GDUserDefault
.
Data
.
newMotorId
+
(
GDRouter
.
UserRouter
?
.
uid
??
""
)
)
})
.
disposed
(
by
:
disposeBag
)
})
.
disposed
(
by
:
disposeBag
)
self
.
titleNewId
.
subscribe
(
onNext
:
{
dict
in
self
.
titleNewId
.
subscribe
(
onNext
:
{
dict
in
GDUserDefault
.
write
(
dict
,
key
:
GDUserDefault
.
Data
.
newTitleId
+
UserCenter
.
shared
.
uid
)
GDUserDefault
.
write
(
dict
,
key
:
GDUserDefault
.
Data
.
newTitleId
+
(
GDRouter
.
UserRouter
?
.
uid
??
""
)
)
})
.
disposed
(
by
:
disposeBag
)
})
.
disposed
(
by
:
disposeBag
)
self
.
fansGroupNewId
.
subscribe
(
onNext
:
{
dict
in
self
.
fansGroupNewId
.
subscribe
(
onNext
:
{
dict
in
GDUserDefault
.
write
(
dict
,
key
:
GDUserDefault
.
Data
.
newFansGroupTeam
+
UserCenter
.
shared
.
uid
)
GDUserDefault
.
write
(
dict
,
key
:
GDUserDefault
.
Data
.
newFansGroupTeam
+
(
GDRouter
.
UserRouter
?
.
uid
??
""
)
)
})
.
disposed
(
by
:
disposeBag
)
})
.
disposed
(
by
:
disposeBag
)
self
.
hadUserOpenLiveRoomGiftPanel
.
distinctUntilChanged
()
.
subscribe
(
onNext
:
{
hadOpen
in
self
.
hadUserOpenLiveRoomGiftPanel
.
distinctUntilChanged
()
.
subscribe
(
onNext
:
{
hadOpen
in
...
@@ -312,28 +312,28 @@ public class GDDataManager: BaseViewModel {
...
@@ -312,28 +312,28 @@ public class GDDataManager: BaseViewModel {
/// 配置数据中心,每次登陆和更换用户需要调用
/// 配置数据中心,每次登陆和更换用户需要调用
func
setup
()
{
func
setup
()
{
if
let
newWearNum
=
(
GDUserDefault
.
read
(
GDUserDefault
.
Data
.
newWearNum
)
as?
[
String
:
String
])?[
UserCenter
.
shared
.
uid
]
{
if
let
newWearNum
=
(
GDUserDefault
.
read
(
GDUserDefault
.
Data
.
newWearNum
)
as?
[
String
:
String
])?[
GDRouter
.
UserRouter
?
.
uid
??
""
]
{
self
.
newWearNum
.
accept
(
newWearNum
.
intValue
)
self
.
newWearNum
.
accept
(
newWearNum
.
intValue
)
}
}
if
let
newMotorDict
=
GDUserDefault
.
read
(
GDUserDefault
.
Data
.
newMotorId
+
UserCenter
.
shared
.
uid
)
as?
[
String
:
Bool
]
{
if
let
newMotorDict
=
GDUserDefault
.
read
(
GDUserDefault
.
Data
.
newMotorId
+
(
GDRouter
.
UserRouter
?
.
uid
??
""
)
)
as?
[
String
:
Bool
]
{
self
.
motorNewMid
.
accept
(
newMotorDict
)
self
.
motorNewMid
.
accept
(
newMotorDict
)
}
}
if
let
newTitleDict
=
GDUserDefault
.
read
(
GDUserDefault
.
Data
.
newTitleId
+
UserCenter
.
shared
.
uid
)
as?
[
String
:
Bool
]
{
if
let
newTitleDict
=
GDUserDefault
.
read
(
GDUserDefault
.
Data
.
newTitleId
+
(
GDRouter
.
UserRouter
?
.
uid
??
""
)
)
as?
[
String
:
Bool
]
{
self
.
titleNewId
.
accept
(
newTitleDict
)
self
.
titleNewId
.
accept
(
newTitleDict
)
}
}
if
let
newFansGroupDict
=
GDUserDefault
.
read
(
GDUserDefault
.
Data
.
newFansGroupTeam
+
UserCenter
.
shared
.
uid
)
as?
[
String
:
Bool
]
{
if
let
newFansGroupDict
=
GDUserDefault
.
read
(
GDUserDefault
.
Data
.
newFansGroupTeam
+
(
GDRouter
.
UserRouter
?
.
uid
??
""
)
)
as?
[
String
:
Bool
]
{
self
.
fansGroupNewId
.
accept
(
newFansGroupDict
)
self
.
fansGroupNewId
.
accept
(
newFansGroupDict
)
}
}
}
}
override
func
setupSocketListener
()
{
public
override
func
setupSocketListener
()
{
super
.
setupSocketListener
()
super
.
setupSocketListener
()
GDSocket
Publisher
.
Data
.
newWearRecieve
.
subscribe
(
onNext
:
{[
weak
self
]
(
json
)
in
GDSocket
Center
.
publisher
.
listenTo
(
GDDataManagerSocketCID
.
newWearRecieve
.
intValue
)
.
mapToJSON
()
.
subscribe
(
onNext
:
{[
weak
self
]
(
json
)
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
...
@@ -384,7 +384,7 @@ public class GDDataManager: BaseViewModel {
...
@@ -384,7 +384,7 @@ public class GDDataManager: BaseViewModel {
return
count
return
count
})
.
bind
(
to
:
newWearNum
)
.
disposed
(
by
:
disposeBag
)
})
.
bind
(
to
:
newWearNum
)
.
disposed
(
by
:
disposeBag
)
GDSocket
Publisher
.
Data
.
verify
.
subscribe
(
onNext
:
{[
weak
self
]
json
in
GDSocket
Center
.
publisher
.
listenTo
(
GDDataManagerSocketCID
.
verify
.
intValue
)
.
mapToJSON
()
.
subscribe
(
onNext
:
{[
weak
self
]
json
in
let
childmode
=
json
[
"childmode"
]
.
intValue
let
childmode
=
json
[
"childmode"
]
.
intValue
if
childmode
==
2
{
if
childmode
==
2
{
UserCenter
.
shared
.
teenagerCenter
.
isTeenageModeOn
.
accept
(
true
)
UserCenter
.
shared
.
teenagerCenter
.
isTeenageModeOn
.
accept
(
true
)
...
@@ -398,7 +398,7 @@ public class GDDataManager: BaseViewModel {
...
@@ -398,7 +398,7 @@ public class GDDataManager: BaseViewModel {
})
.
disposed
(
by
:
disposeBag
)
})
.
disposed
(
by
:
disposeBag
)
// 接收可领取任务数变化
// 接收可领取任务数变化
GDSocket
Publisher
.
Data
.
rewardCountChange
.
subscribe
(
onNext
:
{[
weak
self
]
json
in
GDSocket
Center
.
publisher
.
listenTo
(
GDDataManagerSocketCID
.
rewardCountChange
.
intValue
)
.
mapToJSON
()
.
subscribe
(
onNext
:
{[
weak
self
]
json
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
rewardCount
.
accept
(
json
[
"count"
]
.
intValue
)
self
.
rewardCount
.
accept
(
json
[
"count"
]
.
intValue
)
})
.
disposed
(
by
:
disposeBag
)
})
.
disposed
(
by
:
disposeBag
)
...
@@ -421,7 +421,7 @@ extension GDDataManager {
...
@@ -421,7 +421,7 @@ extension GDDataManager {
self
?
.
splashModel
.
accept
(
model
)
self
?
.
splashModel
.
accept
(
model
)
}
on
Error
:
{
(
error
)
in
}
on
Failure
:
{
(
error
)
in
GDlog
.
error
(
error
)
GDlog
.
error
(
error
)
}
.
disposed
(
by
:
self
.
disposeBag
)
}
.
disposed
(
by
:
self
.
disposeBag
)
...
@@ -518,7 +518,7 @@ extension GDDataManager {
...
@@ -518,7 +518,7 @@ extension GDDataManager {
func
updateRechargeData
()
{
func
updateRechargeData
()
{
// 充值点需要更新
// 充值点需要更新
GDRechargeRequestModel
.
readDataFrom
(
.
server
)
.
subscribe
(
onSuccess
:
{[
weak
self
]
(
model
)
in
GDRechargeRequestModel
.
readDataFrom
(
.
server
)
.
subscribe
subscribe
(
onSuccess
:
{[
weak
self
]
(
model
)
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
// 保存MD5数据
// 保存MD5数据
self
.
md5Model
.
rechargeMd5
=
model
.
md5
self
.
md5Model
.
rechargeMd5
=
model
.
md5
...
@@ -669,21 +669,21 @@ extension GDDataManager {
...
@@ -669,21 +669,21 @@ extension GDDataManager {
guard
UserCenter
.
shared
.
isVisitor
.
value
==
false
else
{
return
}
guard
UserCenter
.
shared
.
isVisitor
.
value
==
false
else
{
return
}
let
lastDate
=
GDUserDefault
.
read
(
GDUserDefault
.
Data
.
newUserCheckDate
+
(
UserCenter
.
shared
.
user
.
value
.
uid
??
""
))
as?
String
let
lastDate
=
GDUserDefault
.
read
(
GDUserDefault
.
Data
.
newUserCheckDate
+
(
GDRouter
.
UserRouter
?
.
uid
??
""
))
as?
String
provider
.
getNewUserReward
()
.
subscribe
{
(
model
)
in
provider
.
getNewUserReward
()
.
subscribe
{
(
model
)
in
// 本地数据处理
// 本地数据处理
if
needCount
{
if
needCount
{
if
lastDate
==
todayString
()
{
if
lastDate
==
todayString
()
{
// 今天已经请求过
// 今天已经请求过
let
times
=
(
GDUserDefault
.
read
(
GDUserDefault
.
Data
.
newUserCheckTimes
+
UserCenter
.
shared
.
uid
)
as?
Int
)
??
0
let
times
=
(
GDUserDefault
.
read
(
GDUserDefault
.
Data
.
newUserCheckTimes
+
GDRouter
.
UserRouter
?
.
uid
??
""
)
as?
Int
)
??
0
GDUserDefault
.
write
(
times
+
1
,
key
:
GDUserDefault
.
Data
.
newUserCheckTimes
+
UserCenter
.
shared
.
uid
)
GDUserDefault
.
write
(
times
+
1
,
key
:
GDUserDefault
.
Data
.
newUserCheckTimes
+
GDRouter
.
UserRouter
?
.
uid
??
""
)
}
else
{
}
else
{
// 今天未请求过
// 今天未请求过
GDUserDefault
.
write
(
1
,
key
:
GDUserDefault
.
Data
.
newUserCheckTimes
+
UserCenter
.
shared
.
uid
)
GDUserDefault
.
write
(
1
,
key
:
GDUserDefault
.
Data
.
newUserCheckTimes
+
GDRouter
.
UserRouter
?
.
uid
??
""
)
}
}
GDUserDefault
.
write
(
todayString
(),
key
:
GDUserDefault
.
Data
.
newUserCheckDate
+
UserCenter
.
shared
.
uid
)
GDUserDefault
.
write
(
todayString
(),
key
:
GDUserDefault
.
Data
.
newUserCheckDate
+
GDRouter
.
UserRouter
?
.
uid
??
""
)
}
}
// 服务器数据处理
// 服务器数据处理
...
@@ -697,7 +697,7 @@ extension GDDataManager {
...
@@ -697,7 +697,7 @@ extension GDDataManager {
// 不是新人
// 不是新人
}
else
{
}
else
{
if
lastDate
?
.
count
==
0
{
if
lastDate
?
.
count
==
0
{
GDUserDefault
.
write
(
todayString
(),
key
:
GDUserDefault
.
Data
.
newUserCheckDate
+
UserCenter
.
shared
.
uid
)
GDUserDefault
.
write
(
todayString
(),
key
:
GDUserDefault
.
Data
.
newUserCheckDate
+
GDRouter
.
UserRouter
?
.
uid
??
""
)
}
}
}
}
...
@@ -771,7 +771,7 @@ public extension GDDataManager {
...
@@ -771,7 +771,7 @@ public extension GDDataManager {
/// 便捷取等级数据
/// 便捷取等级数据
/// - Parameter level: 等级
/// - Parameter level: 等级
/// - Returns: 等级model,如果等级无效,则返回空Model
/// - Returns: 等级model,如果等级无效,则返回空Model
public
static
func
level
(
_
level
:
String
)
->
GDLevelModel
?
{
static
func
level
(
_
level
:
String
)
->
GDLevelModel
?
{
return
GDDataManager
.
shared
.
levelDict
[
level
]
return
GDDataManager
.
shared
.
levelDict
[
level
]
}
}
}
}
Module/GDDataManager/GDDataManager/DataCenter/Model/GDAliOSSModel.swift
View file @
29e52b4b
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
import
UIKit
import
UIKit
import
GDToolBox
import
GDToolBox
import
Router
class
GDAliOSSModel
:
BaseModel
,
NetworkModelType
{
class
GDAliOSSModel
:
BaseModel
,
NetworkModelType
{
...
@@ -37,7 +38,7 @@ class GDAliOSSModel: BaseModel, NetworkModelType {
...
@@ -37,7 +38,7 @@ class GDAliOSSModel: BaseModel, NetworkModelType {
// MARK: Method
// MARK: Method
func
upload
(
with
data
:
Data
,
type
:
String
,
success
:
((
String
)
->
Void
)?,
failure
:
((
String
,
Int
)
->
Void
)?)
{
func
upload
(
with
data
:
Data
,
type
:
String
,
success
:
((
String
)
->
Void
)?,
failure
:
((
String
,
Int
)
->
Void
)?)
{
guard
isValidString
(
UserCenter
.
shared
.
uid
)
else
{
guard
isValidString
(
GDRouter
.
UserRouter
?
.
uid
)
else
{
failure
?(
"请登录"
,
-
1
)
failure
?(
"请登录"
,
-
1
)
return
return
}
}
...
@@ -47,7 +48,7 @@ class GDAliOSSModel: BaseModel, NetworkModelType {
...
@@ -47,7 +48,7 @@ class GDAliOSSModel: BaseModel, NetworkModelType {
client
=
OSSClient
(
endpoint
:
endpoint
,
credentialProvider
:
credential
)
client
=
OSSClient
(
endpoint
:
endpoint
,
credentialProvider
:
credential
)
let
uploadPath
=
"/sts-server/
\(
UserCenter
.
shared
.
uid
)
/
\(
Date
()
.
milliStamp
)
/
\(
NSUUID
()
.
uuidString
)
.
\(
type
)
"
let
uploadPath
=
"/sts-server/
\(
GDRouter
.
UserRouter
?
.
uid
??
""
)
/
\(
Date
()
.
milliStamp
)
/
\(
NSUUID
()
.
uuidString
)
.
\(
type
)
"
let
put
=
OSSPutObjectRequest
()
let
put
=
OSSPutObjectRequest
()
put
.
bucketName
=
"yazhai"
put
.
bucketName
=
"yazhai"
...
...
Module/GDDataManager/GDDataManager/DataCenter/Model/GDLevelModel.swift
View file @
29e52b4b
...
@@ -86,15 +86,14 @@ extension GDLevelRequestModel: CachableType {
...
@@ -86,15 +86,14 @@ extension GDLevelRequestModel: CachableType {
/// 从服务器读取数据
/// 从服务器读取数据
/// - Returns:
/// - Returns:
static
func
readFromServer
(
with
paramsDict
:
[
String
:
Any
]?)
->
Single
<
GDLevelRequestModel
>
{
static
func
readFromServer
(
with
paramsDict
:
[
String
:
Any
]?)
->
Single
<
GDLevelRequestModel
>
{
// TODO: 缺失
// 等级数据需要更新
// 等级数据需要更新
return
GDDataManagerHttpHelper
.
shared
.
getLevelData
()
.
map
{
(
model
)
in
// return GDRouter.ApplicationRouter.provider.getLevelData().map { (model) in
// 写入本地
// // 写入本地
model
.
writeLocal
()
// model.writeLocal()
// 预加载图片
// // 预加载图片
ImagePrefetcher
(
urls
:
model
.
levelImageArr
)
.
start
()
// ImagePrefetcher(urls: model.levelImageArr).start()
return
model
// return model
}
// }
}
}
/// 写入本地
/// 写入本地
...
...
Module/GDDataManager/GDDataManager/DataCenter/Model/GDShareTipsModel.swift
View file @
29e52b4b
...
@@ -21,7 +21,7 @@ class GDSocialTipsModel: BaseModel {
...
@@ -21,7 +21,7 @@ class GDSocialTipsModel: BaseModel {
@objc
var
title
:
String
?
@objc
var
title
:
String
?
static
func
transform
(
_
content
:
String
)
->
String
{
static
func
transform
(
_
content
:
String
)
->
String
{
return
content
.
tl
_roomInjectedStr
return
content
.
gd
_roomInjectedStr
}
}
}
}
Module/GDDataManager/GDDataManager/DataCenter/Network/GDDataManagerAPI.swift
View file @
29e52b4b
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
import
Foundation
import
Foundation
import
Moya
import
Moya
import
Router
import
Router
import
GDToolBox
enum
GDDataManagerAPI
{
enum
GDDataManagerAPI
{
...
@@ -24,13 +25,19 @@ enum GDDataManagerAPI {
...
@@ -24,13 +25,19 @@ enum GDDataManagerAPI {
case
getChatGiftData
(
md5
:
String
?)
case
getChatGiftData
(
md5
:
String
?)
// 充值点数据
// 充值点数据
case
rechargeData
(
md5
:
String
?)
case
rechargeData
(
md5
:
String
?)
// 下载资源
case
data
(
path
:
String
,
md5
:
String
?)
// 等级数据
case
levelData
}
}
extension
GDDataManagerAPI
:
TargetType
{
extension
GDDataManagerAPI
:
Download
TargetType
{
var
baseURL
:
URL
{
var
baseURL
:
URL
{
switch
self
{
switch
self
{
case
.
rechargeData
:
case
.
rechargeData
:
return
URL
(
string
:
GDRouter
.
HostRouter
?
.
payUrl
??
""
)
??
URL
(
fileURLWithPath
:
""
)
return
URL
(
string
:
GDRouter
.
HostRouter
?
.
payUrl
??
""
)
??
URL
(
fileURLWithPath
:
""
)
case
.
data
:
return
URL
(
string
:
GDRouter
.
HostRouter
?
.
imageDownUrl
??
""
)
??
URL
(
fileURLWithPath
:
""
)
default
:
default
:
return
URL
(
string
:
GDRouter
.
HostRouter
?
.
apiAddress
??
""
)
??
URL
(
fileURLWithPath
:
""
)
return
URL
(
string
:
GDRouter
.
HostRouter
?
.
apiAddress
??
""
)
??
URL
(
fileURLWithPath
:
""
)
}
}
...
@@ -51,6 +58,10 @@ extension GDDataManagerAPI: TargetType {
...
@@ -51,6 +58,10 @@ extension GDDataManagerAPI: TargetType {
return
"/setting/updatechatgift.html"
return
"/setting/updatechatgift.html"
case
.
rechargeData
:
case
.
rechargeData
:
return
"/pay/recharge"
return
"/pay/recharge"
case
.
data
(
let
path
,
_
):
return
path
case
.
levelData
:
return
"/setting/level.html"
}
}
}
}
...
@@ -73,6 +84,10 @@ extension GDDataManagerAPI: TargetType {
...
@@ -73,6 +84,10 @@ extension GDDataManagerAPI: TargetType {
if
let
md5
=
md5
{
if
let
md5
=
md5
{
params
[
"md5"
]
=
md5
params
[
"md5"
]
=
md5
}
}
case
.
data
:
break
case
.
levelData
:
break
}
}
return
params
return
params
}
}
...
@@ -83,16 +98,32 @@ extension GDDataManagerAPI: TargetType {
...
@@ -83,16 +98,32 @@ extension GDDataManagerAPI: TargetType {
var
task
:
Task
{
var
task
:
Task
{
switch
self
{
switch
self
{
case
.
data
(
let
path
,
_
):
return
.
downloadDestination
(
downloadDestinationFor
(
path
))
default
:
default
:
return
.
requestParameters
(
parameters
:
parameters
,
encoding
:
parametersEncoding
)
return
.
requestParameters
(
parameters
:
parameters
,
encoding
:
parametersEncoding
)
}
}
}
}
var
method
:
Moya
.
Method
{
var
method
:
Moya
.
Method
{
.
post
switch
self
{
case
.
data
:
return
.
get
default
:
return
.
post
}
}
}
var
headers
:
[
String
:
String
]?
{
var
headers
:
[
String
:
String
]?
{
nil
nil
}
}
var
md5
:
String
?
{
switch
self
{
case
.
data
(
_
,
let
md5
):
return
md5
default
:
return
nil
}
}
}
}
Module/GDDataManager/GDDataManager/DataCenter/Network/GDDataManagerHttpHelper.swift
View file @
29e52b4b
...
@@ -54,6 +54,14 @@ class GDDataManagerHttpHelper: BaseModel {
...
@@ -54,6 +54,14 @@ class GDDataManagerHttpHelper: BaseModel {
/// - Returns:
/// - Returns:
func
downloadDataAt
(
path
:
String
,
md5
:
String
?)
->
Observable
<
GDProgressResponse
>
{
func
downloadDataAt
(
path
:
String
,
md5
:
String
?)
->
Observable
<
GDProgressResponse
>
{
/// 文件不存在,执行下载
/// 文件不存在,执行下载
return
dataProvider
.
downloadWithProgress
(
.
data
(
path
:
path
,
md5
:
md5
),
retryTime
:
3
)
return
dataProvider
.
provider
.
downloadWithProgress
(
GDDataManagerAPI
.
data
(
path
:
path
,
md5
:
md5
),
retryTime
:
3
)
}
/// 获取等级数据
/// - Returns:
func
getLevelData
()
->
Single
<
GDLevelRequestModel
>
{
return
dataProvider
.
request
(
.
levelData
)
.
mapToModel
(
type
:
GDLevelRequestModel
.
self
)
}
}
}
}
Module/GDDataManager/GDDataManager/DataCenter/Network/GDDataManagerSocket.swift
0 → 100644
View file @
29e52b4b
//
// GDDataManagerSocket.swift
// GDDataManager
//
// Created by pierce on 2023/2/20.
//
import
UIKit
struct
GDDataManagerSocketCID
{
/// 通信验证
static
let
verify
=
"1000"
/// 收到新的可穿戴物品
static
let
newWearRecieve
=
"3001"
/// 任务中心可领取任务数量变化
static
let
rewardCountChange
=
"3002"
}
Module/GDDataManager/GDDataManager/DataCenter/ResourceCenter/Downloader/GDResourceDownloader.swift
View file @
29e52b4b
...
@@ -184,7 +184,7 @@ class GDResourceDownloader: BaseViewModel {
...
@@ -184,7 +184,7 @@ class GDResourceDownloader: BaseViewModel {
GDlog
.
debug
(
"->
\(
task
.
resUrl
)
下载完成"
)
GDlog
.
debug
(
"->
\(
task
.
resUrl
)
下载完成"
)
if
task
.
resType
==
.
zip
{
if
task
.
resType
==
.
zip
{
if
var
targetPath
=
GDResourceDownloader
.
pathForFaceGiftEffectTask
(
task
:
task
)
{
if
var
targetPath
=
GDResourceDownloader
.
pathForFaceGiftEffectTask
(
task
:
task
)
{
targetPath
=
DevConfig
.
resourceDownloadPath
.
appending
(
targetPath
)
targetPath
=
DevConfig
.
gd_
resourceDownloadPath
.
appending
(
targetPath
)
let
filePath
=
DevConfig
.
gd_resourceDownloadPath
.
appending
(
task
.
resUrl
)
let
filePath
=
DevConfig
.
gd_resourceDownloadPath
.
appending
(
task
.
resUrl
)
SSZipArchive
.
unzipFile
(
atPath
:
filePath
,
toDestination
:
targetPath
,
progressHandler
:
nil
)
{
(
path
,
success
,
error
)
in
SSZipArchive
.
unzipFile
(
atPath
:
filePath
,
toDestination
:
targetPath
,
progressHandler
:
nil
)
{
(
path
,
success
,
error
)
in
// 解压到指定路径下
// 解压到指定路径下
...
...
Module/GDToolBox/GDToolBox/Foundation/Socket/GDSocketLauncher.swift
View file @
29e52b4b
...
@@ -134,7 +134,7 @@ class GDSocketLauncher: BaseViewModel {
...
@@ -134,7 +134,7 @@ class GDSocketLauncher: BaseViewModel {
// }
// }
//
//
// // 发送数据
// // 发送数据
// GDSocketCenter.shared.sendSocketMessage(uid:
UserCenter.shared.user.value
.uid ?? "", cid: SocketCID.Service.sendMessage, dict: params)
// GDSocketCenter.shared.sendSocketMessage(uid:
GDRouter.UserRouter?
.uid ?? "", cid: SocketCID.Service.sendMessage, dict: params)
// }
// }
// func launchServiceImageMessage(model: GDServiceChatDetailModel, objkey: String, md5: String, toUid: String, completionHandler: SocketLaunchCompletionHandler?) {
// func launchServiceImageMessage(model: GDServiceChatDetailModel, objkey: String, md5: String, toUid: String, completionHandler: SocketLaunchCompletionHandler?) {
...
@@ -156,7 +156,7 @@ class GDSocketLauncher: BaseViewModel {
...
@@ -156,7 +156,7 @@ class GDSocketLauncher: BaseViewModel {
// completionDict[model.msgid] = completion
// completionDict[model.msgid] = completion
// }
// }
//
//
// GDSocketCenter.shared.sendSocketMessage(uid:
UserCenter.shared.user.value
.uid ?? "", cid: SocketCID.Service.sendImageMessage, dict: params)
// GDSocketCenter.shared.sendSocketMessage(uid:
GDRouter.UserRouter?
.uid ?? "", cid: SocketCID.Service.sendImageMessage, dict: params)
// }
// }
/// 发送直播间重连命令
/// 发送直播间重连命令
...
@@ -177,10 +177,10 @@ class GDSocketLauncher: BaseViewModel {
...
@@ -177,10 +177,10 @@ class GDSocketLauncher: BaseViewModel {
// }
// }
//
//
// let params = ["roomid": roomid,
// let params = ["roomid": roomid,
// "uid":
UserCenter.shared.user.value
.uid ?? ""]
// "uid":
GDRouter.UserRouter?
.uid ?? ""]
//
//
// GDSocketCenter.shared
// GDSocketCenter.shared
// .sendSocketMessage(uid:
UserCenter.shared.user.value
.uid ?? "",
// .sendSocketMessage(uid:
GDRouter.UserRouter?
.uid ?? "",
// cid: SocketCID.Live.reconnect,
// cid: SocketCID.Live.reconnect,
// dict: params)
// dict: params)
//
//
...
...
Module/GDToolBox/GDToolBox/GDToolBoxPlugins/Plugins/GDToolBoxLivePlugin.swift
View file @
29e52b4b
...
@@ -9,5 +9,12 @@ import UIKit
...
@@ -9,5 +9,12 @@ import UIKit
open
class
GDToolBoxLivePlugin
:
NSObject
{
open
class
GDToolBoxLivePlugin
:
NSObject
{
/// 当前直播间房间ID
open
var
currentRoomId
:
String
?
{
""
}
/// 当前直播间主播的UID
open
var
currentRoomUid
:
String
?
{
""
}
/// 当前直播间主播的昵称
open
var
currentRoomNickname
:
String
?
{
""
}
open
func
startAnchorPush
()
{}
open
func
startAnchorPush
()
{}
}
}
Module/GDToolBox/GDToolBox/GDToolBoxPlugins/Plugins/GDToolBoxUserCenterPlugin.swift
View file @
29e52b4b
...
@@ -72,6 +72,7 @@ open class GDToolBoxUserCenterPlugin: NSObject {
...
@@ -72,6 +72,7 @@ open class GDToolBoxUserCenterPlugin: NSObject {
open
var
isVisitor
:
Bool
{
false
}
open
var
isVisitor
:
Bool
{
false
}
open
var
isUserLogin
:
Bool
{
false
}
open
var
isUserLogin
:
Bool
{
false
}
open
var
uid
:
String
?
{
""
}
open
var
uid
:
String
?
{
""
}
open
var
nickname
:
String
?
{
""
}
open
var
token
:
String
?
{
""
}
open
var
token
:
String
?
{
""
}
func
gd_userHadBeenKickOffline
()
{}
func
gd_userHadBeenKickOffline
()
{}
...
...
Module/GDToolBox/GDToolBox/Network/GDToolBoxSetupAPI.swift
View file @
29e52b4b
...
@@ -11,15 +11,11 @@ import Moya
...
@@ -11,15 +11,11 @@ import Moya
enum
GDToolBoxSetupAPI
{
enum
GDToolBoxSetupAPI
{
case
getSocketInfo
case
getSocketInfo
case
getVisitorSocketInfo
case
getVisitorSocketInfo
// 下载资源
case
data
(
path
:
String
,
md5
:
String
?)
}
}
extension
GDToolBoxSetupAPI
:
Download
TargetType
{
extension
GDToolBoxSetupAPI
:
TargetType
{
var
baseURL
:
URL
{
var
baseURL
:
URL
{
switch
self
{
switch
self
{
case
.
data
:
return
URL
(
string
:
GDToolBoxPlugins
.
shared
.
apiPlugin
.
imageDownUrl
)
??
URL
(
fileURLWithPath
:
""
)
default
:
default
:
return
URL
(
string
:
GDToolBoxPlugins
.
shared
.
apiPlugin
.
baseApiUrl
)
??
URL
(
fileURLWithPath
:
""
)
return
URL
(
string
:
GDToolBoxPlugins
.
shared
.
apiPlugin
.
baseApiUrl
)
??
URL
(
fileURLWithPath
:
""
)
}
}
...
@@ -27,8 +23,6 @@ extension GDToolBoxSetupAPI: DownloadTargetType {
...
@@ -27,8 +23,6 @@ extension GDToolBoxSetupAPI: DownloadTargetType {
var
path
:
String
{
var
path
:
String
{
switch
self
{
switch
self
{
case
.
data
(
let
path
,
_
):
return
path
case
.
getSocketInfo
:
case
.
getSocketInfo
:
return
"/sync/scoket.html"
return
"/sync/scoket.html"
case
.
getVisitorSocketInfo
:
case
.
getVisitorSocketInfo
:
...
@@ -47,8 +41,6 @@ extension GDToolBoxSetupAPI: DownloadTargetType {
...
@@ -47,8 +41,6 @@ extension GDToolBoxSetupAPI: DownloadTargetType {
var
task
:
Task
{
var
task
:
Task
{
switch
self
{
switch
self
{
case
.
data
(
let
path
,
_
):
return
.
downloadDestination
(
downloadDestinationFor
(
path
))
default
:
default
:
return
.
requestParameters
(
parameters
:
parameters
,
encoding
:
parametersEncoding
)
return
.
requestParameters
(
parameters
:
parameters
,
encoding
:
parametersEncoding
)
}
}
...
@@ -56,8 +48,6 @@ extension GDToolBoxSetupAPI: DownloadTargetType {
...
@@ -56,8 +48,6 @@ extension GDToolBoxSetupAPI: DownloadTargetType {
var
method
:
Moya
.
Method
{
var
method
:
Moya
.
Method
{
switch
self
{
switch
self
{
case
.
data
:
return
.
get
default
:
default
:
return
.
post
return
.
post
}
}
...
@@ -70,8 +60,6 @@ extension GDToolBoxSetupAPI: DownloadTargetType {
...
@@ -70,8 +60,6 @@ extension GDToolBoxSetupAPI: DownloadTargetType {
var
md5
:
String
?
{
var
md5
:
String
?
{
switch
self
{
switch
self
{
case
.
data
(
_
,
let
md5
):
return
md5
default
:
default
:
return
nil
return
nil
}
}
...
...
Module/GDToolBox/GDToolBox/Tool/Data/Date.swift
View file @
29e52b4b
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
import
Foundation
import
Foundation
extension
Date
{
public
extension
Date
{
/// 获取当前 秒级 时间戳 - 10位
/// 获取当前 秒级 时间戳 - 10位
var
timeStamp
:
String
{
var
timeStamp
:
String
{
...
...
Module/GDToolBox/GDToolBox/Tool/Data/GDTimeHelper.swift
View file @
29e52b4b
...
@@ -10,7 +10,7 @@ import Foundation
...
@@ -10,7 +10,7 @@ import Foundation
/// 获取今日日期:2020-07-08
/// 获取今日日期:2020-07-08
/// - Returns:
/// - Returns:
func
todayString
()
->
String
{
public
func
todayString
()
->
String
{
// 格式化
// 格式化
let
formatter
=
DateFormatter
()
let
formatter
=
DateFormatter
()
// 设置格式
// 设置格式
...
...
Module/GDToolBox/GDToolBox/Tool/Data/String.swift
View file @
29e52b4b
...
@@ -97,22 +97,21 @@ public extension String {
...
@@ -97,22 +97,21 @@ public extension String {
return
self
.
lengthOfBytes
(
using
:
encode
)
return
self
.
lengthOfBytes
(
using
:
encode
)
}
}
//TODO:移动到直播模块: added By Pidan
var
gd_roomInjectedStr
:
String
{
var
gd_roomInjectedStr
:
String
{
return
self
return
self
.
replacingOccurrences
(
of
:
"#nickname#"
,
with
:
GD
LiveHelper
.
shared
.
liveVC
?
.
roomInfoModel
.
value
.
n
ickname
??
""
)
.
replacingOccurrences
(
of
:
"#nickname#"
,
with
:
GD
ToolBoxPlugins
.
shared
.
livePlugin
.
currentRoomN
ickname
??
""
)
.
replacingOccurrences
(
of
:
"#uid#"
,
with
:
GD
LiveHelper
.
shared
.
roomid
.
value
??
""
)
.
replacingOccurrences
(
of
:
"#uid#"
,
with
:
GD
ToolBoxPlugins
.
shared
.
livePlugin
.
currentRoomId
??
""
)
.
replacingOccurrences
(
of
:
"#pkg#"
,
with
:
GDAppConfig
.
pkg
)
.
replacingOccurrences
(
of
:
"#pkg#"
,
with
:
GDAppConfig
.
gd_
pkg
)
.
replacingOccurrences
(
of
:
"#app#"
,
with
:
GDAppConfig
.
appName
)
.
replacingOccurrences
(
of
:
"#app#"
,
with
:
GDAppConfig
.
gd_
appName
)
.
replacingOccurrences
(
of
:
"#qrflag#"
,
with
:
"1"
)
.
replacingOccurrences
(
of
:
"#qrflag#"
,
with
:
"1"
)
}
}
var
gd_injectedStr
:
String
{
var
gd_injectedStr
:
String
{
return
self
return
self
.
replacingOccurrences
(
of
:
"#nickname#"
,
with
:
UserCenter
.
shared
.
user
.
value
.
nickname
??
""
)
.
replacingOccurrences
(
of
:
"#nickname#"
,
with
:
GDToolBoxPlugins
.
shared
.
userPlugin
.
nickname
??
""
)
.
replacingOccurrences
(
of
:
"#uid#"
,
with
:
UserCenter
.
shared
.
uid
)
.
replacingOccurrences
(
of
:
"#uid#"
,
with
:
GDToolBoxPlugins
.
shared
.
userPlugin
.
uid
??
""
)
.
replacingOccurrences
(
of
:
"#pkg#"
,
with
:
GDAppConfig
.
pkg
)
.
replacingOccurrences
(
of
:
"#pkg#"
,
with
:
GDAppConfig
.
gd_
pkg
)
.
replacingOccurrences
(
of
:
"#app#"
,
with
:
GDAppConfig
.
appName
)
.
replacingOccurrences
(
of
:
"#app#"
,
with
:
GDAppConfig
.
gd_
appName
)
.
replacingOccurrences
(
of
:
"#qrflag#"
,
with
:
"1"
)
.
replacingOccurrences
(
of
:
"#qrflag#"
,
with
:
"1"
)
}
}
...
...
Module/GDToolBox/Other/BridgeHeader.h
View file @
29e52b4b
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
#import "SocketParse.h"
#import "SocketParse.h"
#import "TalkingData.h"
#import "TalkingData.h"
#import "WXApi.h"
#import "WXApi.h"
#import <TencentOpenAPI/TencentOAuth.h>
//
#import <TencentOpenAPI/TencentOAuth.h>
#import <TencentOpenAPI/QQApiInterface.h>
//
#import <TencentOpenAPI/QQApiInterface.h>
#import "VPImageCropperViewController.h"
#import "VPImageCropperViewController.h"
#import <SecVerify/SVSDKHyVerify.h>
#import <SecVerify/SVSDKHyVerify.h>
#import <MOBFoundation/MobSDK+Privacy.h>
#import <MOBFoundation/MobSDK+Privacy.h>
...
...
Module/HostManager/HostManager/HostManager.swift
View file @
29e52b4b
...
@@ -414,14 +414,13 @@ public class GDHostManager {
...
@@ -414,14 +414,13 @@ public class GDHostManager {
params
[
"device"
]
=
GDDevice
.
deviceName
params
[
"device"
]
=
GDDevice
.
deviceName
// TODO: 缺失
if
isValidString
(
GDRouter
.
UserRouter
?
.
uid
)
{
// if isValidString(UserCenter.shared.user.value.uid) {
params
[
"uid"
]
=
GDRouter
.
UserRouter
?
.
uid
// params["uid"] = UserCenter.shared.user.value.uid
}
// }
//
if
isValidString
(
GDRouter
.
UserRouter
?
.
token
)
{
// if isValidString(UserCenter.shared.user.value.token) {
params
[
"token"
]
=
GDRouter
.
UserRouter
?
.
token
// params["token"] = UserCenter.shared.user.value.token
}
// }
return
params
return
params
}
}
...
...
Module/Router/Router/Service/Module/GDUserManagerService.swift
View file @
29e52b4b
...
@@ -11,6 +11,9 @@ import UIKit
...
@@ -11,6 +11,9 @@ import UIKit
@objc
public
protocol
GDUserManagerService
{
}
@objc
public
protocol
GDUserManagerService
{
}
public
protocol
GDUserManagerSwiftService
:
GDUserManagerService
{
public
protocol
GDUserManagerSwiftService
:
GDUserManagerService
{
/// UID
var
uid
:
String
?
{
get
}
/// token
var
token
:
String
?
{
get
}
}
}
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