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
90620575
Commit
90620575
authored
Nov 07, 2024
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化首页银河管家弹窗逻辑
parent
1c88f083
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
9 deletions
+28
-9
YHHomeHoldViewPageViewController.swift
...Modules/Home(首页)/C/YHHomeHoldViewPageViewController.swift
+23
-6
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+3
-2
YhConstant.swift
galaxy/galaxy/Classes/Tools/Helper/YhConstant.swift
+2
-1
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeHoldViewPageViewController.swift
View file @
90620575
...
...
@@ -12,6 +12,8 @@ import JXSegmentedView
//MARK: - 生命周期函数 及变量
class
YHHomeHoldViewPageViewController
:
YHBaseViewController
{
private
var
needShowManagerTipsView
=
false
private
var
didFirstLoadYhManager
=
false
let
arrItemTitles
=
[
"推荐"
,
"身份"
,
"生活"
,
"资讯"
]
...
...
@@ -90,7 +92,7 @@ class YHHomeHoldViewPageViewController: YHBaseViewController {
private
func
isViewVisibleOnScreen
(
view
:
UIView
)
->
Bool
{
let
viewFrame
=
view
.
convert
(
view
.
bounds
,
to
:
UIScreen
.
main
.
coordinateSpace
)
let
screenFrame
=
UIScreen
.
main
.
bounds
return
viewFrame
.
intersects
(
screenFrame
)
return
viewFrame
.
intersects
(
screenFrame
)
&&
viewFrame
.
maxY
<=
screenFrame
.
maxY
}
override
func
viewWillDisappear
(
_
animated
:
Bool
)
{
...
...
@@ -197,7 +199,11 @@ extension YHHomeHoldViewPageViewController {
view
.
show
()
}
else
if
model
.
type
==
20
{
//签约用户新人指引
self
.
showYHManagerTipsView
()
if
self
.
didFirstLoadYhManager
{
self
.
showYHManagerTipsView
()
}
else
{
self
.
needShowManagerTipsView
=
true
}
}
else
{
callback
(
false
)
return
...
...
@@ -304,6 +310,7 @@ extension YHHomeHoldViewPageViewController {
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
didJumpToNewsTab
)
,
name
:
YhConstant
.
YhNotification
.
didJumpToHomePageNewsTabNotification
,
object
:
nil
)
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
didJumpToLifeTab
)
,
name
:
YhConstant
.
YhNotification
.
didJumpToHomePageLifeTabNotification
,
object
:
nil
)
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
didLoadYhManager
)
,
name
:
YhConstant
.
YhNotification
.
didLoadYhManagerNotification
,
object
:
nil
)
for
i
in
0
..<
arrItemTitles
.
count
{
if
i
==
0
{
...
...
@@ -361,6 +368,15 @@ extension YHHomeHoldViewPageViewController {
jumpToItemIndex
(
itemIndex
:
2
)
}
@objc
func
didLoadYhManager
()
{
if
needShowManagerTipsView
{
needShowManagerTipsView
=
false
showYHManagerTipsView
()
}
didFirstLoadYhManager
=
true
}
func
jumpToItemIndex
(
itemIndex
:
Int
)
{
self
.
segmentedView
.
selectItemAt
(
index
:
itemIndex
)
self
.
listContainerView
.
didClickSelectedItem
(
at
:
itemIndex
)
...
...
@@ -495,8 +511,8 @@ private extension YHHomeHoldViewPageViewController {
return
}
self
.
princleVM
.
postAlertStatus
(
20
)
{
success
,
error
in
}
//
self.princleVM.postAlertStatus(20) { success, error in
//
}
//不在屏幕内 就上移 200px
var
offSetY
:
CGFloat
=
0.0
...
...
@@ -506,9 +522,8 @@ private extension YHHomeHoldViewPageViewController {
if
viewFrame
.
origin
.
y
<
250
.
fix
{
offSetY
=
-
abs
(
viewFrame
.
origin
.
y
)
-
(
KScreenHeight
/
2
)
}
else
{
offSetY
=
self
.
isViewVisibleOnScreen
(
view
:
self
.
homePageVC
.
homeHeaderView
.
orderTipsView
.
mgrItem
)
?
0
.0
:
200.0
offSetY
=
self
.
isViewVisibleOnScreen
(
view
:
self
.
homePageVC
.
homeHeaderView
.
orderTipsView
.
mgrItem
)
?
0
:
200.0
}
var
point
=
self
.
homePageVC
.
homeCollectView
.
contentOffset
point
.
y
+=
offSetY
self
.
homePageVC
.
homeCollectView
.
setContentOffset
(
point
,
animated
:
false
)
...
...
@@ -523,6 +538,8 @@ private extension YHHomeHoldViewPageViewController {
guard
let
self
=
self
else
{
return
}
self
.
princleVM
.
postAlertStatus
(
20
)
{
success
,
error
in
}
self
.
homePageVC
.
gotoYinHeMgrVC
()
}
view
.
show
()
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
90620575
...
...
@@ -420,16 +420,17 @@ extension YHHomePageViewController {
if
success
{
self
.
homeHeaderView
.
orderTipsView
.
arrLastTwoMessage
=
self
.
viewModel
.
arrLastTwoMessages
self
.
updateMgrItem
()
self
.
homeHeaderView
.
updateSubViewsConstraints
()
//
self.homeHeaderView.updateSubViewsConstraints()
}
else
{
self
.
updateMgrItem
()
self
.
homeHeaderView
.
updateSubViewsConstraints
()
//
self.homeHeaderView.updateSubViewsConstraints()
}
if
showEvaluationB
{
self
.
updateHomeHeadViewStyle
(
.
evaluationBAndOrderTips
)
}
else
{
self
.
updateHomeHeadViewStyle
(
.
orderTips
)
}
NotificationCenter
.
default
.
post
(
name
:
YhConstant
.
YhNotification
.
didLoadYhManagerNotification
,
object
:
nil
)
}
}
}
else
{
...
...
galaxy/galaxy/Classes/Tools/Helper/YhConstant.swift
View file @
90620575
...
...
@@ -308,7 +308,8 @@ extension YhConstant {
// 我的证件 微信文件上传回调
public
static
let
didMyCertificateWeChatFileUploadCallBackNotification
=
Notification
.
Name
(
rawValue
:
"com.yinhe.myCertificate.wechat.fileUpload"
)
// 已经展示银河管家
public
static
let
didLoadYhManagerNotification
=
Notification
.
Name
(
rawValue
:
"com.yinhe.didLoadYhManager"
)
}
}
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