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
61c116fb
Commit
61c116fb
authored
Apr 15, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
7497d4fa
' into xiezhaolin
parents
a00d27a9
7497d4fa
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
90 additions
and
119 deletions
+90
-119
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+0
-4
YHTestViewController.swift
galaxy/galaxy/Classes/Base/C/YHTestViewController.swift
+0
-49
YHSearchInfomationVC.swift
...axy/Classes/Modules/Home(首页)/C/YHSearchInfomationVC.swift
+33
-1
YHHomePageViewModel.swift
...axy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
+5
-6
YHMyViewController.swift
...alaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
+52
-59
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
61c116fb
...
@@ -22,7 +22,6 @@
...
@@ -22,7 +22,6 @@
0435FA812BA186D600024EAE
/* YHMyFileMethodTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0435FA802BA186D600024EAE
/* YHMyFileMethodTableViewCell.swift */
;
};
0435FA812BA186D600024EAE
/* YHMyFileMethodTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0435FA802BA186D600024EAE
/* YHMyFileMethodTableViewCell.swift */
;
};
0435FA832BA2DEB100024EAE
/* YHCardButton.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0435FA822BA2DEB100024EAE
/* YHCardButton.swift */
;
};
0435FA832BA2DEB100024EAE
/* YHCardButton.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0435FA822BA2DEB100024EAE
/* YHCardButton.swift */
;
};
043F0AB22BC781F5006CB887
/* YHMessageSessionCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
043F0AB12BC781F5006CB887
/* YHMessageSessionCell.swift */
;
};
043F0AB22BC781F5006CB887
/* YHMessageSessionCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
043F0AB12BC781F5006CB887
/* YHMessageSessionCell.swift */
;
};
043F0AB42BC7B80F006CB887
/* YHTestViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
043F0AB32BC7B80F006CB887
/* YHTestViewController.swift */
;
};
043F0AB62BC7CE1B006CB887
/* YHInformationFillVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
043F0AB52BC7CE1B006CB887
/* YHInformationFillVC.swift */
;
};
043F0AB62BC7CE1B006CB887
/* YHInformationFillVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
043F0AB52BC7CE1B006CB887
/* YHInformationFillVC.swift */
;
};
043F0AB82BC7CE5C006CB887
/* YHInformationFillCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
043F0AB72BC7CE5C006CB887
/* YHInformationFillCell.swift */
;
};
043F0AB82BC7CE5C006CB887
/* YHInformationFillCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
043F0AB72BC7CE5C006CB887
/* YHInformationFillCell.swift */
;
};
044413F72BC2786200784A14
/* YHHomeWebViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044413F62BC2786200784A14
/* YHHomeWebViewController.swift */
;
};
044413F72BC2786200784A14
/* YHHomeWebViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
044413F62BC2786200784A14
/* YHHomeWebViewController.swift */
;
};
...
@@ -463,7 +462,6 @@
...
@@ -463,7 +462,6 @@
0435FA802BA186D600024EAE
/* YHMyFileMethodTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMyFileMethodTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
0435FA802BA186D600024EAE
/* YHMyFileMethodTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMyFileMethodTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
0435FA822BA2DEB100024EAE
/* YHCardButton.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCardButton.swift
;
sourceTree
=
"<group>"
;
};
0435FA822BA2DEB100024EAE
/* YHCardButton.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCardButton.swift
;
sourceTree
=
"<group>"
;
};
043F0AB12BC781F5006CB887
/* YHMessageSessionCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
YHMessageSessionCell.swift
;
path
=
galaxy/Classes/Base/C/YHMessageSessionCell.swift
;
sourceTree
=
SOURCE_ROOT
;
};
043F0AB12BC781F5006CB887
/* YHMessageSessionCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
YHMessageSessionCell.swift
;
path
=
galaxy/Classes/Base/C/YHMessageSessionCell.swift
;
sourceTree
=
SOURCE_ROOT
;
};
043F0AB32BC7B80F006CB887
/* YHTestViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHTestViewController.swift
;
sourceTree
=
"<group>"
;
};
043F0AB52BC7CE1B006CB887
/* YHInformationFillVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHInformationFillVC.swift
;
sourceTree
=
"<group>"
;
};
043F0AB52BC7CE1B006CB887
/* YHInformationFillVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHInformationFillVC.swift
;
sourceTree
=
"<group>"
;
};
043F0AB72BC7CE5C006CB887
/* YHInformationFillCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
YHInformationFillCell.swift
;
path
=
"galaxy/Classes/Modules/Message(消息)/C/YHInformationFillCell.swift"
;
sourceTree
=
SOURCE_ROOT
;
};
043F0AB72BC7CE5C006CB887
/* YHInformationFillCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
name
=
YHInformationFillCell.swift
;
path
=
"galaxy/Classes/Modules/Message(消息)/C/YHInformationFillCell.swift"
;
sourceTree
=
SOURCE_ROOT
;
};
044413F62BC2786200784A14
/* YHHomeWebViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHomeWebViewController.swift
;
sourceTree
=
"<group>"
;
};
044413F62BC2786200784A14
/* YHHomeWebViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHomeWebViewController.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -2147,7 +2145,6 @@
...
@@ -2147,7 +2145,6 @@
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
A5ACE9202B4564F7002C94D2
/* YHBaseViewController.swift */
,
A5ACE9202B4564F7002C94D2
/* YHBaseViewController.swift */
,
043F0AB32BC7B80F006CB887
/* YHTestViewController.swift */
,
A5ACE9212B4564F7002C94D2
/* YHNavigationController.swift */
,
A5ACE9212B4564F7002C94D2
/* YHNavigationController.swift */
,
A5ACE9222B4564F7002C94D2
/* YHTabBarViewController.swift */
,
A5ACE9222B4564F7002C94D2
/* YHTabBarViewController.swift */
,
A5551FFD2B4C26CE00510980
/* YHBaseViewModel.swift */
,
A5551FFD2B4C26CE00510980
/* YHBaseViewModel.swift */
,
...
@@ -2604,7 +2601,6 @@
...
@@ -2604,7 +2601,6 @@
045EEE842B9F171A0022A143
/* YHPreviewBasiceInformationViewController.swift in Sources */
,
045EEE842B9F171A0022A143
/* YHPreviewBasiceInformationViewController.swift in Sources */
,
A5ACE9282B4564F7002C94D2
/* YHSmsCodeView.swift in Sources */
,
A5ACE9282B4564F7002C94D2
/* YHSmsCodeView.swift in Sources */
,
0468D4262B495A5400CFB916
/* YHPickPhoneAddressViewController.swift in Sources */
,
0468D4262B495A5400CFB916
/* YHPickPhoneAddressViewController.swift in Sources */
,
043F0AB42BC7B80F006CB887
/* YHTestViewController.swift in Sources */
,
048B2A4D2BC7DAE800A93BF0
/* YHMyLikeViewModel.swift in Sources */
,
048B2A4D2BC7DAE800A93BF0
/* YHMyLikeViewModel.swift in Sources */
,
04C693622B723AB8004C1758
/* YHMySettingViewController.swift in Sources */
,
04C693622B723AB8004C1758
/* YHMySettingViewController.swift in Sources */
,
045EEECD2B9F171A0022A143
/* YHScoreDataModel.swift in Sources */
,
045EEECD2B9F171A0022A143
/* YHScoreDataModel.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Base/C/YHTestViewController.swift
deleted
100644 → 0
View file @
a00d27a9
//
// YHTestViewController.swift
// galaxy
//
// Created by edy on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHTestViewController
:
YHBaseViewController
{
lazy
var
nameLabel
:
UILabel
=
{
let
nameLabel
=
UILabel
()
nameLabel
.
textColor
=
UIColor
(
hex
:
0x121A26
)
nameLabel
.
textAlignment
=
.
left
nameLabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
15
)
nameLabel
.
numberOfLines
=
0
return
nameLabel
}()
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
.
white
view
.
addSubview
(
nameLabel
)
nameLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
top
.
equalToSuperview
()
.
offset
(
k_Height_NavigationtBarAndStatuBar
)
make
.
bottom
.
equalToSuperview
()
}
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
JPUSHService
.
registrationIDCompletionHandler
{
resCode
,
registrationID
in
YHHUD
.
hide
()
YHLoginManager
.
shared
.
userModel
?
.
registerId
=
registrationID
??
""
var
info
=
"deviceToken:
\n
"
+
(
YHLoginManager
.
shared
.
userModel
?
.
deviceToken
??
""
)
info
+=
"
\n
registerId:
\n
"
+
(
YHLoginManager
.
shared
.
userModel
?
.
registerId
??
""
)
DispatchQueue
.
main
.
async
{
self
.
nameLabel
.
text
=
info
}
}
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHSearchInfomationVC.swift
View file @
61c116fb
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
//
//
import
UIKit
import
UIKit
import
AVFoundation
import
AVKit
class
YHSearchInfomationVC
:
YHBaseViewController
{
class
YHSearchInfomationVC
:
YHBaseViewController
{
...
@@ -20,6 +22,11 @@ class YHSearchInfomationVC: YHBaseViewController {
...
@@ -20,6 +22,11 @@ class YHSearchInfomationVC: YHBaseViewController {
return
viewModel
return
viewModel
}()
}()
lazy
var
homeViewModel
:
YHHomeWebViewModel
=
{
let
viewModel
=
YHHomeWebViewModel
()
return
viewModel
}()
lazy
var
navBar
:
UIView
=
{
lazy
var
navBar
:
UIView
=
{
let
bar
=
UIView
()
let
bar
=
UIView
()
let
backBtn
=
UIButton
()
let
backBtn
=
UIButton
()
...
@@ -133,6 +140,11 @@ class YHSearchInfomationVC: YHBaseViewController {
...
@@ -133,6 +140,11 @@ class YHSearchInfomationVC: YHBaseViewController {
return
view
return
view
}()
}()
lazy
var
playerViewController
:
AVPlayerViewController
=
{
let
vc
=
AVPlayerViewController
()
return
vc
}()
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
self
.
setupUI
()
self
.
setupUI
()
...
@@ -309,9 +321,29 @@ extension YHSearchInfomationVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -309,9 +321,29 @@ extension YHSearchInfomationVC: UITableViewDelegate, UITableViewDataSource {
if
0
<=
indexPath
.
section
&&
indexPath
.
section
<
items
.
count
{
if
0
<=
indexPath
.
section
&&
indexPath
.
section
<
items
.
count
{
let
model
=
items
[
indexPath
.
section
]
let
model
=
items
[
indexPath
.
section
]
if
model
.
type
==
1
{
// 视频
if
!
model
.
media_url
.
isEmpty
,
let
url
=
URL
(
string
:
model
.
media_url
)
{
let
player
=
AVPlayer
(
url
:
url
)
player
.
isMuted
=
true
playerViewController
.
player
=
player
self
.
present
(
self
.
playerViewController
,
animated
:
true
)
{
self
.
playerViewController
.
player
!.
play
()
// 开始播放视频
}
DispatchQueue
.
main
.
async
{
self
.
homeViewModel
.
getWebDetail
(
model
.
id
)
{
success
,
error
in
}
}
}
return
}
// 非视频类型
let
vc
=
YHHomeWebViewController
()
let
vc
=
YHHomeWebViewController
()
vc
.
url
=
YHConfigManager
.
shared
.
h5Url
+
"?id=
\(
model
.
id
)
"
vc
.
url
=
YHConfigManager
.
shared
.
h5Url
+
"
/articleDetail.html"
+
"
?id=
\(
model
.
id
)
"
vc
.
id
=
model
.
id
vc
.
id
=
model
.
id
print
(
"URL:
\(
vc
.
url
)
"
)
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
View file @
61c116fb
...
@@ -52,7 +52,7 @@ extension YHHomePageViewModel {
...
@@ -52,7 +52,7 @@ extension YHHomePageViewModel {
var
params
:
[
String
:
Any
]
=
[
"page"
:
curPageIndex
,
var
params
:
[
String
:
Any
]
=
[
"page"
:
curPageIndex
,
"page_size"
:
page_Size
]
"page_size"
:
page_Size
]
if
firstPageFlag
{
if
firstPageFlag
{
params
=
[
"page"
:
curPageIndex
,
params
=
[
"page"
:
1
,
"page_size"
:
page_Size
]
"page_size"
:
page_Size
]
}
else
{
}
else
{
params
=
[
"page"
:
curPageIndex
+
1
,
params
=
[
"page"
:
curPageIndex
+
1
,
...
@@ -180,15 +180,13 @@ extension YHHomePageViewModel {
...
@@ -180,15 +180,13 @@ extension YHHomePageViewModel {
"page_size"
:
page_Size
,
"page_size"
:
page_Size
,
"classify_id[0]"
:
classifyID
]
"classify_id[0]"
:
classifyID
]
if
firstPageFlag
{
if
firstPageFlag
{
curPageIndex
=
1
params
=
[
"page"
:
1
,
params
=
[
"page"
:
curPageIndex
,
"page_size"
:
page_Size
,
"page_size"
:
page_Size
,
"classify_id[0]"
:
classifyID
]
"classify_id[0]"
:
classifyID
]
}
else
{
}
else
{
params
=
[
"page"
:
curPageIndex
+
1
,
params
=
[
"page"
:
curPageIndex
+
1
,
"page_size"
:
page_Size
,
"page_size"
:
page_Size
,
"classify_id[0]"
:
classifyID
]
"classify_id[0]"
:
classifyID
]
curPageIndex
=
curPageIndex
+
1
}
}
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Common
.
article
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Common
.
article
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
...
@@ -206,9 +204,11 @@ extension YHHomePageViewModel {
...
@@ -206,9 +204,11 @@ extension YHHomePageViewModel {
}
}
if
firstPageFlag
{
if
firstPageFlag
{
self
.
curPageIndex
=
1
self
.
totalCount
=
result
.
total
self
.
totalCount
=
result
.
total
self
.
arrHomeNewsData
=
result
.
data
self
.
arrHomeNewsData
=
result
.
data
}
else
{
}
else
{
self
.
curPageIndex
=
self
.
curPageIndex
+
1
self
.
arrHomeNewsData
?
.
append
(
contentsOf
:
result
.
data
)
self
.
arrHomeNewsData
?
.
append
(
contentsOf
:
result
.
data
)
}
}
...
@@ -260,8 +260,7 @@ extension YHHomePageViewModel {
...
@@ -260,8 +260,7 @@ extension YHHomePageViewModel {
var
params
:
[
String
:
Any
]
=
[:]
var
params
:
[
String
:
Any
]
=
[:]
if
isFirstPage
{
if
isFirstPage
{
curPageIndex
=
1
params
=
[
"page"
:
1
,
params
=
[
"page"
:
curPageIndex
,
"page_size"
:
10
,
"page_size"
:
10
,
"title"
:
title
]
"title"
:
title
]
}
else
{
}
else
{
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
View file @
61c116fb
...
@@ -41,7 +41,7 @@ struct PersonalModuleItem {
...
@@ -41,7 +41,7 @@ struct PersonalModuleItem {
class
YHMyViewController
:
YHBaseViewController
,
ConstraintRelatableTarget
{
class
YHMyViewController
:
YHBaseViewController
,
ConstraintRelatableTarget
{
let
viewModel
:
YHMyLikeViewModel
=
YHMyLikeViewModel
()
let
viewModel
:
YHMyLikeViewModel
=
YHMyLikeViewModel
()
lazy
var
tableView
:
UITableView
=
{
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
CGRect
.
zero
,
style
:
.
grouped
)
let
tableView
=
UITableView
(
frame
:
CGRect
.
zero
,
style
:
.
grouped
)
if
#available(iOS 11.0, *)
{
if
#available(iOS 11.0, *)
{
...
@@ -62,17 +62,18 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
...
@@ -62,17 +62,18 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
lazy
var
items
:
[
PersonalModuleItem
]
=
{
lazy
var
items
:
[
PersonalModuleItem
]
=
{
let
version
=
"app版本号:"
+
UIDevice
.
appVersion
()
+
"_"
+
UIDevice
.
appBuild
()
let
version
=
"app版本号:"
+
UIDevice
.
appVersion
()
+
"_"
+
UIDevice
.
appBuild
()
return
[
var
arrData
=
[
PersonalModuleItem
(
icon
:
"mine_item_msg"
,
title
:
"我的消息"
.
local
,
type
:
.
myMessage
),
PersonalModuleItem
(
icon
:
"mine_item_msg"
,
title
:
"我的消息"
.
local
,
type
:
.
myMessage
),
PersonalModuleItem
(
icon
:
"mine_item_progress"
,
title
:
"我的进度"
.
local
,
type
:
.
myProgress
),
PersonalModuleItem
(
icon
:
"mine_item_scoreCenter"
,
title
:
"积分中心"
.
local
,
type
:
.
scoreCenter
),
PersonalModuleItem
(
icon
:
"mine_item_scoreCenter"
,
title
:
"积分中心"
.
local
,
type
:
.
scoreCenter
),
PersonalModuleItem
(
icon
:
"mine_item_code"
,
title
:
"我的测评码"
.
local
,
type
:
.
myTestCode
),
PersonalModuleItem
(
icon
:
"mine_item_recommend"
,
title
:
"推荐有礼"
.
local
,
type
:
.
recommend
),
PersonalModuleItem
(
icon
:
"mine_item_appoint"
,
title
:
"预约银河湾"
.
local
,
type
:
.
appointGalaxyBay
),
PersonalModuleItem
(
icon
:
"mine_item_poster"
,
title
:
"我的海报"
.
local
,
type
:
.
myPoster
),
PersonalModuleItem
(
icon
:
"mine_item_appoint"
,
title
:
version
,
type
:
.
appointGalaxyBay
),
PersonalModuleItem
(
icon
:
"mine_item_code"
,
title
:
"我的测评码"
.
local
,
type
:
.
myTestCode
),
]
PersonalModuleItem
(
icon
:
"mine_item_appoint"
,
title
:
"预约银河湾"
.
local
,
type
:
.
appointGalaxyBay
),
PersonalModuleItem
(
icon
:
"mine_item_appoint"
,
title
:
version
,
type
:
.
appointGalaxyBay
),
]
return
arrData
}()
}()
lazy
var
headerView
:
YHUserInfoHeaderView
=
{
lazy
var
headerView
:
YHUserInfoHeaderView
=
{
...
@@ -128,7 +129,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
...
@@ -128,7 +129,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
}
}
return
view
return
view
}()
}()
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
initView
()
initView
()
...
@@ -206,62 +207,54 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
...
@@ -206,62 +207,54 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
vc
.
modalPresentationStyle
=
.
custom
vc
.
modalPresentationStyle
=
.
custom
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
self
.
navigationController
?
.
present
(
vc
,
animated
:
true
)
return
return
}
else
{
let
vc
=
YHTestViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
YHHUD
.
flash
(
message
:
"已登录: 功能完善中..."
)
}
}
return
let
item
:
PersonalModuleItem
=
items
[
indexPath
.
row
];
// 预览文件预研 杜宇todo
let
item
:
PersonalModuleItem
=
items
[
indexPath
.
row
]
if
item
.
title
==
"我的消息"
{
switch
item
.
type
{
case
.
myMessage
:
//我的消息
}
else
if
item
.
title
==
"我的进度"
{
printLog
(
"我的消息"
)
goTabBarBy
(
tabType
:
.
message
)
}
else
if
item
.
title
==
"积分中心"
{
case
.
scoreCenter
:
////积分中心
printLog
(
"积分中心"
)
}
else
if
item
.
title
==
"推荐有理"
{
if
let
param
=
YHLoginManager
.
shared
.
userModel
?
.
token
,
param
.
count
>
5
{
printLog
(
param
)
var
token
:
String
=
param
//待h5端同学提供
var
url
=
"https:www.baidu.com"
var
addtionString
=
randomAlphanumericString
(
6
)
//随机6个字母或者数字
let
indexToInsert
=
token
.
index
(
token
.
startIndex
,
offsetBy
:
6
)
//插入位置,这里以第六个字符后面为例
// token.insert(addtionString, at: indexToInsert) //for test hjl
}
case
.
myTestCode
:
//我的测评码
printLog
(
"我的测评码"
)
}
else
if
item
.
title
==
"我的海报"
{
let
vc
=
YHHomeWebViewController
()
vc
.
url
=
"https://upload.cdn.galaxy-immi.com/sell/product/images/page-1686138671996.png"
self
.
navigationController
?
.
pushViewController
(
vc
)
}
else
if
item
.
title
==
"我的测评码"
{
case
.
appointGalaxyBay
:
//预约银河湾
printLog
(
"预约银河湾"
)
let
vc
=
YHHomeWebViewController
()
vc
.
url
=
"https://upload.cdn.galaxy-immi.com/sell/product/images/page-1686138671996.png"
self
.
navigationController
?
.
pushViewController
(
vc
)
default
:
printLog
(
"不需要响应"
)
}
}
// if item.title == "关于我们" {
// let vc = YHAboutUsViewController()
// self.navigationController?.pushViewController(vc)
//
// } else if item.title == "我的设置" {
//
// let account = "duyu"
// let token = "123456"
// let vc = ConversationController()
// self.navigationController?.pushViewController(vc)
//
// IMKitClient.instance.loginIM(account, token) { error in
// if let err = error {
// print("login error in app : ", err.localizedDescription)
// }else {
// let _ = NEAtMessageManager.instance
//
// }
// }
//
//
//
// } else {
// let vc = YHLoginViewController()
// self.navigationController?.pushViewController(vc)
// }
}
}
}
}
extension
YHMyViewController
{
extension
YHMyViewController
{
func
randomAlphanumericString
(
_
length
:
Int
)
->
String
{
let
letters
=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
let
randomString
=
(
0
..<
length
)
.
map
{
_
in
String
(
letters
.
randomElement
()
!
)
}
.
reduce
(
""
,
+
)
return
randomString
}
@objc
func
loginSuccess
()
{
@objc
func
loginSuccess
()
{
printLog
(
"登录成功,进行相应的 UI刷新操作"
)
printLog
(
"登录成功,进行相应的 UI刷新操作"
)
updateUserUI
()
updateUserUI
()
...
...
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