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
a66ba2a6
Commit
a66ba2a6
authored
Jun 29, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页 数据展示
parent
00a463bb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
7 deletions
+54
-7
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+16
-2
YHOrderTipsItemView.swift
...laxy/Classes/Modules/Home(首页)/V/YHOrderTipsItemView.swift
+6
-4
YHHomePageViewModel.swift
...axy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
+28
-1
YhConstant.swift
galaxy/galaxy/Classes/Tools/Helper/YhConstant.swift
+4
-0
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
a66ba2a6
...
@@ -24,6 +24,8 @@ class YHHomePageViewController: YHBaseViewController {
...
@@ -24,6 +24,8 @@ class YHHomePageViewController: YHBaseViewController {
let
serviceCenterMainReqVM
:
YHServiceCenterMainViewModel
=
YHServiceCenterMainViewModel
()
let
serviceCenterMainReqVM
:
YHServiceCenterMainViewModel
=
YHServiceCenterMainViewModel
()
var
homeHeaderViewHeight
=
YHHomeHeadView
.
fixViewH
var
homeHeaderViewHeight
=
YHHomeHeadView
.
fixViewH
var
needReloadDataFlag
:
Bool
=
false
lazy
var
homeCollectView
=
{
lazy
var
homeCollectView
=
{
// 设置布局方向
// 设置布局方向
let
flowLayout
=
YHHomeCollectionLayout
()
let
flowLayout
=
YHHomeCollectionLayout
()
...
@@ -45,12 +47,19 @@ class YHHomePageViewController: YHBaseViewController {
...
@@ -45,12 +47,19 @@ class YHHomePageViewController: YHBaseViewController {
super
.
viewDidLoad
()
super
.
viewDidLoad
()
setupUI
()
setupUI
()
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
clickMsgitem
)
,
name
:
YhConstant
.
YhNotification
.
clickHomeMsgNotifiction
,
object
:
nil
)
//1、加载默认数据
//1、加载默认数据
homeHeaderView
.
homeBannerView
.
dataArr
=
getCacheDataForBanner
()
homeHeaderView
.
homeBannerView
.
dataArr
=
getCacheDataForBanner
()
getCacheDataForHomeNewsData
()
getCacheDataForHomeNewsData
()
//2、请求新的数据
//2、请求新的数据
getData
()
getData
()
//3、
requestOrder
()
}
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
...
@@ -60,8 +69,11 @@ class YHHomePageViewController: YHBaseViewController {
...
@@ -60,8 +69,11 @@ class YHHomePageViewController: YHBaseViewController {
YHOSSManager
.
share
.
getOSSID
()
YHOSSManager
.
share
.
getOSSID
()
updateDefaultSearchKeyWord
()
updateDefaultSearchKeyWord
()
getTotalUnreadMsgCount
()
getTotalUnreadMsgCount
()
// requestOrder()
if
needReloadDataFlag
{
needReloadDataFlag
=
false
requestOrder
()
}
}
}
lazy
var
searchView
:
YHHomeSearchView
=
{
lazy
var
searchView
:
YHHomeSearchView
=
{
...
@@ -124,7 +136,6 @@ class YHHomePageViewController: YHBaseViewController {
...
@@ -124,7 +136,6 @@ class YHHomePageViewController: YHBaseViewController {
}
}
}
}
}
}
}
else
{
}
else
{
DispatchQueue
.
main
.
async
{
DispatchQueue
.
main
.
async
{
self
.
showOrderTipsView
(
isShow
)
self
.
showOrderTipsView
(
isShow
)
...
@@ -163,6 +174,9 @@ class YHHomePageViewController: YHBaseViewController {
...
@@ -163,6 +174,9 @@ class YHHomePageViewController: YHBaseViewController {
}
}
private
extension
YHHomePageViewController
{
private
extension
YHHomePageViewController
{
@objc
func
clickMsgitem
()
{
needReloadDataFlag
=
true
}
@objc
func
didSearchBarClicked
()
{
@objc
func
didSearchBarClicked
()
{
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHOrderTipsItemView.swift
View file @
a66ba2a6
...
@@ -144,6 +144,8 @@ extension YHOrderTipsItemView {
...
@@ -144,6 +144,8 @@ extension YHOrderTipsItemView {
vc
.
type
=
Int
(
msg
.
type
)
vc
.
type
=
Int
(
msg
.
type
)
vc
.
title
=
self
.
getTypeString
()
vc
.
title
=
self
.
getTypeString
()
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
NotificationCenter
.
default
.
post
(
name
:
YhConstant
.
YhNotification
.
clickHomeMsgNotifiction
,
object
:
nil
)
}
}
}
}
...
@@ -199,9 +201,9 @@ extension YHOrderTipsItemView {
...
@@ -199,9 +201,9 @@ extension YHOrderTipsItemView {
make
.
right
.
equalTo
(
lableTime
.
snp
.
left
)
.
offset
(
-
12
)
make
.
right
.
equalTo
(
lableTime
.
snp
.
left
)
.
offset
(
-
12
)
}
}
let
aa
:
ASAttributedString
=
.
init
(
"您有"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
.
mainTextColor70
))
//
let aa: ASAttributedString = .init("您有", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor70))
let
bb
:
ASAttributedString
=
.
init
(
"3"
,
.
font
(
UIFont
.
PFSC_B
(
ofSize
:
13
)),
.
foreground
(
UIColor
.
brandMainColor
))
//
let bb: ASAttributedString = .init("3", .font(UIFont.PFSC_B(ofSize: 13)),.foreground(UIColor.brandMainColor))
let
cc
:
ASAttributedString
=
.
init
(
"份证件需要上传份证件需要上传份证件需要上传"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
13
)),
.
foreground
(
UIColor
.
mainTextColor70
))
//
let cc: ASAttributedString = .init("份证件需要上传份证件需要上传份证件需要上传", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor70))
lableName
.
attributed
.
text
=
aa
+
bb
+
cc
//
lableName.attributed.text = aa+bb+cc
}
}
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/VM/YHHomePageViewModel.swift
View file @
a66ba2a6
...
@@ -33,6 +33,8 @@ class YHHomePageViewModel : YHBaseViewModel {
...
@@ -33,6 +33,8 @@ class YHHomePageViewModel : YHBaseViewModel {
//首页 签约用户信息
//首页 签约用户信息
var
signerModel
:
YHSignerInfoModel
?
var
signerModel
:
YHSignerInfoModel
?
// var testNumber : Int = 5 //for test hjl
}
}
//接口
//接口
...
@@ -76,7 +78,32 @@ extension YHHomePageViewModel {
...
@@ -76,7 +78,32 @@ extension YHHomePageViewModel {
}
}
arrLastTwoMessages
=
result
.
list
arrLastTwoMessages
=
result
.
list
//for test hjl 测试数据
// let model1 = YHHomeLastMessageModel()
// model1.id = "1"
// model1.content = "我是内容呀 消息填写"
// model1.time = 1609459200
// model1.type = 1
//
//
// let model2 = YHHomeLastMessageModel()
// model2.id = "2"
// model2.content = "我是内容呀 消息填写"
// model2.time = 1609459200
// model2.type = 2
//
//
//
// if testNumber > 2 {
// arrLastTwoMessages = [model1,model2] //for test hjl // //测试数据
// } else if testNumber == 1 {
// arrLastTwoMessages = [model1] //for test hjl // //测试数据
// } else {
// arrLastTwoMessages = []
// }
//
// testNumber = testNumber - 1
callBackBlock
(
true
,
nil
)
callBackBlock
(
true
,
nil
)
}
failBlock
:
{
err
in
}
failBlock
:
{
err
in
...
...
galaxy/galaxy/Classes/Tools/Helper/YhConstant.swift
View file @
a66ba2a6
...
@@ -254,5 +254,9 @@ extension YhConstant {
...
@@ -254,5 +254,9 @@ extension YhConstant {
// 跳转 社区的人脉页
// 跳转 社区的人脉页
public
static
let
goConnectionVCNotifiction
=
Notification
.
Name
(
rawValue
:
"com.yinhe.goConnectionVCNotifiction"
)
public
static
let
goConnectionVCNotifiction
=
Notification
.
Name
(
rawValue
:
"com.yinhe.goConnectionVCNotifiction"
)
// 点击了 首页的消息
public
static
let
clickHomeMsgNotifiction
=
Notification
.
Name
(
rawValue
:
"com.yinhe.clickHomeMsgNotifiction"
)
}
}
}
}
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