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
f9b07a3c
Commit
f9b07a3c
authored
Jul 31, 2024
by
DavidHuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uat接口调节完成
parent
268cb7be
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
36 deletions
+88
-36
YHMyViewController.swift
...alaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
+59
-13
YHUatHelperViewModel.swift
...lasses/Modules/UatModule(灰度功能)/YHUatHelperViewModel.swift
+10
-13
YHAppVersionManager.swift
...s/Modules/VersionUpload(版本更新)/M/YHAppVersionManager.swift
+6
-0
YHNetRequest.swift
galaxy/galaxy/Classes/Tools/NetWork/YHNetRequest.swift
+13
-10
No files found.
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
View file @
f9b07a3c
...
...
@@ -76,18 +76,20 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
return
imgView
}()
lazy
var
items
:
[
PersonalModuleItem
]
=
{
var
arrData
=
[
PersonalModuleItem
(
icon
:
"mine_item_card"
,
title
:
"我的名片"
.
local
,
type
:
.
myCard
),
PersonalModuleItem
(
icon
:
"mine_item_msg"
,
title
:
"我的消息"
.
local
,
type
:
.
myMessage
),
PersonalModuleItem
(
icon
:
"mine_item_scoreCenter"
,
title
:
"积分中心"
.
local
,
type
:
.
scoreCenter
),
PersonalModuleItem
(
icon
:
"mine_item_code"
,
title
:
"我的测评码"
.
local
,
type
:
.
myTestCode
),
PersonalModuleItem
(
icon
:
"mine_item_appoint"
,
title
:
"关于银河湾"
.
local
,
type
:
.
appointGalaxyBay
),
PersonalModuleItem
(
icon
:
"mine_item_activity"
,
title
:
"我的活动"
.
local
,
type
:
.
myActivity
),
PersonalModuleItem
(
icon
:
"mine_item_about_us"
,
title
:
"关于我们"
.
local
,
type
:
.
aboutUs
)
]
return
arrData
}()
// var items: [PersonalModuleItem] = {
// var arrData = [
// PersonalModuleItem(icon: "mine_item_card", title: "我的名片".local, type:.myCard),
// PersonalModuleItem(icon: "mine_item_msg", title: "我的消息".local, type:.myMessage),
// PersonalModuleItem(icon: "mine_item_scoreCenter", title: "积分中心".local, type:.scoreCenter),
// PersonalModuleItem(icon: "mine_item_code", title: "我的测评码".local, type:.myTestCode),
// PersonalModuleItem(icon: "mine_item_appoint", title: "关于银河湾".local, type:.appointGalaxyBay),
// PersonalModuleItem(icon: "mine_item_activity", title: "我的活动".local, type:.myActivity),
// PersonalModuleItem(icon: "mine_item_about_us", title: "关于我们".local, type:. aboutUs)
// ]
// return arrData
// }()
var
items
:
[
PersonalModuleItem
]
=
[]
lazy
var
headerView
:
YHUserInfoHeaderView
=
{
let
view
=
YHUserInfoHeaderView
.
createView
()
...
...
@@ -151,10 +153,13 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
loadItems
()
requestLikeCollectionCount
()
getTotalUnreadMsgCount
()
checkSettingRedPoint
()
self
.
headerView
.
updateAvatar
()
headerView
.
updateAvatar
()
requstUserBasicInfo
()
}
...
...
@@ -253,6 +258,47 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
self
.
tableView
.
reloadData
()
}
}
//uat 添加items
func
loadItems
()
{
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
YHUatModules
(
rawValue
:
1
))
{
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_card"
,
title
:
"我的名片"
.
local
,
type
:
.
myCard
)
items
.
append
(
item
)
}
do
{
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_msg"
,
title
:
"我的消息"
.
local
,
type
:
.
myMessage
)
items
.
append
(
item
)
}
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
YHUatModules
(
rawValue
:
2
))
{
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_scoreCenter"
,
title
:
"积分中心"
.
local
,
type
:
.
scoreCenter
)
items
.
append
(
item
)
}
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
YHUatModules
(
rawValue
:
2
))
{
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_code"
,
title
:
"我的测评码"
.
local
,
type
:
.
myTestCode
)
items
.
append
(
item
)
}
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
YHUatModules
(
rawValue
:
4
))
{
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_appoint"
,
title
:
"关于银河湾"
.
local
,
type
:
.
appointGalaxyBay
)
items
.
append
(
item
)
}
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
YHUatModules
(
rawValue
:
5
))
{
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_activity"
,
title
:
"我的活动"
.
local
,
type
:
.
myActivity
)
items
.
append
(
item
)
}
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
YHUatModules
(
rawValue
:
5
))
{
let
item
=
PersonalModuleItem
(
icon
:
"mine_item_about_us"
,
title
:
"关于我们"
.
local
,
type
:
.
aboutUs
)
items
.
append
(
item
)
}
tableView
.
reloadData
()
}
}
extension
YHMyViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
...
...
galaxy/galaxy/Classes/Modules/UatModule(灰度功能)/YHUatHelperViewModel.swift
View file @
f9b07a3c
...
...
@@ -48,20 +48,17 @@ extension YHUatHelperViewModel {
//请求灰度功能列表配置
func
getUatList
(
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"module_numbers[0]"
:
"1"
,
"module_numbers[1]"
:
"2"
,
"module_numbers[2]"
:
"3"
,
"module_numbers[3]"
:
"4"
,
"module_numbers[4]"
:
"5"
,
"module_numbers[5]"
:
"6"
,
"module_numbers[6]"
:
"7"
,
"module_numbers[7]"
:
"8"
,
"module_numbers[8]"
:
"9"
,
]
let
params
:
[
String
]
=
[
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
]
var
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Uat
.
uatListApi
for
(
index
,
item
)
in
params
.
enumerated
()
{
if
index
==
0
{
strUrl
=
strUrl
+
"?module_numbers="
+
item
}
else
{
strUrl
=
strUrl
+
"&module_numbers="
+
item
}
}
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Uat
.
uatListApi
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
let
dic
=
json
.
data
...
...
galaxy/galaxy/Classes/Modules/VersionUpload(版本更新)/M/YHAppVersionManager.swift
View file @
f9b07a3c
...
...
@@ -33,6 +33,7 @@ class YHAppVersionManager {
func
needShowRedPointOfSuggestVersionUpdate
()
->
Bool
{
var
isShowRedPoint
=
false
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
YHUatModules
(
rawValue
:
9
))
{
// 判断版本更新逻辑
if
let
configModel
=
YHConfigManager
.
shared
.
reqVM
.
configModel
,
configModel
.
suggest_updating
==
true
{
if
configModel
.
max_version
!=
UIDevice
.
appVersion
()
{
...
...
@@ -47,12 +48,16 @@ class YHAppVersionManager {
}
}
}
}
return
isShowRedPoint
}
// 是否需要显示建议版本更新弹窗
func
needShowAlertViewOfSuggestVersionUpdate
()
->
Bool
{
var
isShow
=
false
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
YHUatModules
(
rawValue
:
9
))
{
if
let
configModel
=
YHConfigManager
.
shared
.
reqVM
.
configModel
,
configModel
.
suggest_updating
==
true
{
if
let
alertLatestVersion
=
UserDefaults
.
standard
.
object
(
forKey
:
YhConstant
.
kShowAlertOfSuggestLatestVersion
)
as?
String
{
if
!
configModel
.
max_version
.
isEmpty
,
configModel
.
max_version
!=
alertLatestVersion
{
...
...
@@ -62,6 +67,7 @@ class YHAppVersionManager {
isShow
=
true
}
}
}
return
isShow
}
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHNetRequest.swift
View file @
f9b07a3c
...
...
@@ -333,6 +333,8 @@ class YHNetRequest: NSObject {
#if DEBUG
printLog
(
"服务器返回数据是:
\(
obj
)
"
)
#endif
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
YHUatModules
(
rawValue
:
8
))
{
if
obj
.
code
==
YHErrorCode
.
forceUpdate
.
rawValue
{
// 强制版本升级
DispatchQueue
.
main
.
async
{
YHAppVersionForceUpdateView
.
alertView
()
.
show
()
...
...
@@ -345,6 +347,7 @@ class YHNetRequest: NSObject {
}
return
}
}
if
obj
.
code
==
YHErrorCode
.
tokenInvalidError
.
rawValue
{
DispatchQueue
.
main
.
async
{
...
...
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