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
1156d47c
Commit
1156d47c
authored
Apr 09, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 文书列表逻辑
parent
683b8e5f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
46 deletions
+85
-46
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+47
-19
YHDavidTestCollectionViewCell.swift
...es/Modules/Home(首页)/V/YHDavidTestCollectionViewCell.swift
+1
-1
YHDocListCell.swift
...gentService(服务中心)/MyDocuments(我的文书)/V/YHDocListCell.swift
+16
-15
YHHomeCollectionLayout.swift
...s/IntelligentService(服务中心)/V/YHHomeCollectionLayout.swift
+0
-1
YHServiceTableFootView.swift
...s/IntelligentService(服务中心)/V/YHServiceTableFootView.swift
+21
-10
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
1156d47c
...
...
@@ -16,23 +16,40 @@ class YHHomePageViewController: YHBaseViewController {
}()
lazy
var
homeCollectView
=
{
// // 设置布局方向
// let flowLayout = UICollectionViewFlowLayout()
// let margin = 20.0
// let gap = 20.0
// let itemWidth = ceil((KScreenWidth - 2*margin - gap)/2.0)
// flowLayout.itemSize = CGSize(width: itemWidth, height: 210 + 87 + 4)
// flowLayout.minimumInteritemSpacing = 10.0
// flowLayout.minimumLineSpacing = 10.0
// flowLayout.scrollDirection = .vertical
//
// let collectinoView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
// collectinoView.backgroundColor = .white
// collectinoView.register(YHDavidTestCollectionViewCell.self, forCellWithReuseIdentifier:YHDavidTestCollectionViewCell.cellReuseIdentifier)
// collectinoView.delegate = self
// collectinoView.dataSource = self
// collectinoView.showsVerticalScrollIndicator = false
//
// collectinoView.translatesAutoresizingMaskIntoConstraints = false
// collectinoView.alwaysBounceVertical = true
//
// 设置布局方向
let
flowLayout
=
UICollectionViewFlowLayout
()
let
margin
=
20.0
let
gap
=
20.0
let
itemWidth
=
ceil
((
KScreenWidth
-
2*
margin
-
gap
)
/
2.0
)
flowLayout
.
itemSize
=
CGSize
(
width
:
itemWidth
,
height
:
210
+
87
+
4
)
flowLayout
.
minimumInteritemSpacing
=
10.0
flowLayout
.
minimumLineSpacing
=
10.0
flowLayout
.
scrollDirection
=
.
vertical
let
flowLayout
=
YHHomeCollectionLayout
()
flowLayout
.
minimumInteritemSpacing
=
7.0
flowLayout
.
minimumColumnSpacing
=
10.0
flowLayout
.
sectionInset
=
UIEdgeInsets
(
top
:
0
,
left
:
0
,
bottom
:
0
,
right
:
0
)
let
collectinoView
=
UICollectionView
(
frame
:
.
zero
,
collectionViewLayout
:
flowLayout
)
let
collectinoView
=
YHGestureCollectionView
(
frame
:
.
zero
,
collectionViewLayout
:
flowLayout
)
// collectinoView.contentInset = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
collectinoView
.
backgroundColor
=
.
white
collectinoView
.
register
(
YH
DavidTestCollectionViewCell
.
self
,
forCellWithReuseIdentifier
:
YHDavidTest
CollectionViewCell
.
cellReuseIdentifier
)
collectinoView
.
register
(
YH
HomeCollectionViewCell
.
self
,
forCellWithReuseIdentifier
:
YHHome
CollectionViewCell
.
cellReuseIdentifier
)
collectinoView
.
delegate
=
self
collectinoView
.
dataSource
=
self
collectinoView
.
showsVerticalScrollIndicator
=
false
collectinoView
.
bounces
=
false
collectinoView
.
translatesAutoresizingMaskIntoConstraints
=
false
collectinoView
.
alwaysBounceVertical
=
true
return
collectinoView
...
...
@@ -77,7 +94,7 @@ private extension YHHomePageViewController {
view
.
addSubview
(
homeCollectView
)
homeCollectView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
searchView
.
snp
.
bottom
)
make
.
top
.
equalTo
(
searchView
.
snp
.
bottom
)
.
offset
(
6
)
}
homeHeaderView
.
frame
=
CGRect
(
x
:
0
,
y
:
-
YHHomeHeadView
.
viewH
,
width
:
KScreenWidth
-
40
,
height
:
YHHomeHeadView
.
viewH
)
...
...
@@ -117,22 +134,33 @@ private extension YHHomePageViewController {
extension
YHHomePageViewController
:
UICollectionViewDelegate
FlowLayout
,
UICollectionViewDelegate
,
UICollectionViewDataSource
{
extension
YHHomePageViewController
:
UICollectionViewDelegate
,
UICollectionViewDataSource
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
numberOfItemsInSection
section
:
Int
)
->
Int
{
return
items
.
count
}
func
collectionView
(
_
collectionView
:
UICollectionView
,
cellForItemAt
indexPath
:
IndexPath
)
->
UICollectionViewCell
{
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YH
DavidTestCollectionViewCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHDavidTest
CollectionViewCell
let
cell
=
collectionView
.
dequeueReusableCell
(
withReuseIdentifier
:
YH
HomeCollectionViewCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHHome
CollectionViewCell
return
cell
}
private
func
collectionView
(
collectionView
:
UICollectionView
,
didSelectItemAtIndexPath
indexPath
:
NSIndexPath
)
{
print
(
"index is
\(
indexPath
.
row
)
"
)
}
//
func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
//
print("index is \(indexPath.row)")
//
}
}
private
extension
YHHomePageViewController
{
extension
YHHomePageViewController
:
CollectionViewWaterfallLayoutDelegate
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
:
UICollectionViewLayout
,
sizeForItemAtIndexPath
indexPath
:
NSIndexPath
)
->
CGSize
{
let
margin
=
20.0
let
gap
=
7.0
let
itemWidth
=
70.0
//ceil((KScreenWidth - 2*margin - gap)/2.0)
let
arrItemH
:
[
CGFloat
]
=
[
100
,
150
,
200
,
250
,
300
,
350
,
400
]
let
HHH
=
arrItemH
[
Int
.
random
(
in
:
0
...
6
)]
return
CGSize
(
width
:
itemWidth
,
height
:
HHH
)
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHDavidTestCollectionViewCell.swift
View file @
1156d47c
...
...
@@ -12,7 +12,7 @@ class YHDavidTestCollectionViewCell: UICollectionViewCell {
static
let
cellReuseIdentifier
=
"YHDavidTestCollectionViewCell"
lazy
var
titleImageView
:
UIImageView
=
{
let
imageV
=
UIImageView
(
image
:
UIImage
(
named
:
"
home_title_image
"
))
let
imageV
=
UIImageView
(
image
:
UIImage
(
named
:
"
start_page_bkg
"
))
imageV
.
contentMode
=
.
scaleAspectFill
imageV
.
roundCorners
(
UIRectCorner
.
topLeft
,
radius
:
8
)
imageV
.
roundCorners
(
UIRectCorner
.
topRight
,
radius
:
8
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/V/YHDocListCell.swift
View file @
1156d47c
...
...
@@ -156,31 +156,28 @@ class YHDocListCell: UITableViewCell {
*/
var
statusTxt
=
""
var
statusTxt
=
"
--
"
var
color
:
UIColor
=
.
brandMainColor
if
(
dataSource
.
document
.
id
==
0
&&
dataSource
.
file_type
.
contains
(
"doc"
,
caseSensitive
:
true
))
||
dataSource
.
file_type
.
contains
(
"sign"
,
caseSensitive
:
true
)
{
let
signStatus
=
dataSource
.
status
switch
signStatus
{
case
2
:
if
dataSource
.
file_type
.
contains
(
"sign"
,
caseSensitive
:
true
)
{
let
status
=
dataSource
.
sign_doc
.
status
if
status
==
3
{
statusTxt
=
"待签章"
color
=
UIColor
.
brandMainColor
case
3
:
statusTxt
=
"已驳回"
color
=
UIColor
.
failColor
case
5
:
}
else
if
status
==
4
{
statusTxt
=
"已签章"
color
=
UIColor
(
hex
:
0x49D2B1
,
alpha
:
1.0
)
case
7
:
color
=
UIColor
.
successColor
}
else
if
status
==
5
{
statusTxt
=
"已完成"
color
=
UIColor
.
labelTextColor2
default
:
}
else
if
status
==
6
{
statusTxt
=
"已驳回"
color
=
UIColor
.
failColor
}
else
{
statusTxt
=
"--"
color
=
UIColor
.
failColor
break
}
}
else
{
}
else
if
dataSource
.
file_type
.
contains
(
"doc"
,
caseSensitive
:
true
)
{
let
status
=
dataSource
.
status
if
status
==
2
{
statusTxt
=
"待确认"
...
...
@@ -201,6 +198,10 @@ class YHDocListCell: UITableViewCell {
statusTxt
=
"--"
color
=
UIColor
.
failColor
}
}
else
{
statusTxt
=
"--"
color
=
UIColor
.
failColor
}
statusLabel
.
text
=
statusTxt
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/V/YHHomeCollectionLayout.swift
View file @
1156d47c
...
...
@@ -25,7 +25,6 @@ public let CollectionViewWaterfallElementKindSectionFooter = "CollectionViewWate
@objc
optional
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
:
UICollectionViewLayout
,
insetForFooterInSection
section
:
Int
)
->
UIEdgeInsets
@objc
optional
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
:
UICollectionViewLayout
,
minimumInteritemSpacingForSection
section
:
Int
)
->
Float
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/V/YHServiceTableFootView.swift
View file @
1156d47c
...
...
@@ -11,7 +11,12 @@ import UIKit
class
YHServiceTableFootView
:
UIView
{
lazy
var
items
=
{
return
[
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
)]
return
[
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
)
]
}()
lazy
var
myCollectView
=
{
...
...
@@ -21,7 +26,6 @@ class YHServiceTableFootView: UIView {
flowLayout
.
minimumColumnSpacing
=
7.0
flowLayout
.
sectionInset
=
UIEdgeInsets
(
top
:
20
,
left
:
20
,
bottom
:
20
,
right
:
20
)
let
collectinoView
=
YHGestureCollectionView
(
frame
:
.
zero
,
collectionViewLayout
:
flowLayout
)
// collectinoView.contentInset = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
collectinoView
.
backgroundColor
=
.
white
collectinoView
.
register
(
YHHomeCollectionViewCell
.
self
,
forCellWithReuseIdentifier
:
YHHomeCollectionViewCell
.
cellReuseIdentifier
)
collectinoView
.
delegate
=
self
...
...
@@ -31,7 +35,7 @@ class YHServiceTableFootView: UIView {
collectinoView
.
alwaysBounceVertical
=
true
return
collectinoView
}()
var
dataSource
:
YHScemeHeadModel
?
{
didSet
{
updateAllViews
()
...
...
@@ -41,7 +45,14 @@ class YHServiceTableFootView: UIView {
super
.
init
(
frame
:
frame
)
backgroundColor
=
.
white
setUpView
()
self
.
items
=
[
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
"https://copyright.bdstatic.com/vcg/creative/cc9c744cf9f7c864889c563cbdeddce6.jpg@h_1280"
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
"https://inews.gtimg.com/om_bt/OjPq2cnMN_-ivDKjxpCZ2kk_ab8YC5VMnL-0pQ21fUvd4AA/1000"
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
"https://img.pconline.com.cn/images/upload/upc/tx/itbbs/2101/25/c1/251135935_1611532823091_mthumb.jpg"
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
"https://photo.16pic.com/00/47/86/16pic_4786353_b.jpg"
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
"https://inews.gtimg.com/om_bt/OMvPDmiuH_X5Vq1YLNgbFEzD2h_-2dCfWQ7xZFcKFSEsAAA/641"
)]
self
.
items
=
[
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
"https://copyright.bdstatic.com/vcg/creative/cc9c744cf9f7c864889c563cbdeddce6.jpg@h_1280"
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配精准匹配精准匹配精准匹配精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
"https://inews.gtimg.com/om_bt/OjPq2cnMN_-ivDKjxpCZ2kk_ab8YC5VMnL-0pQ21fUvd4AA/1000"
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配精准匹配精准匹配精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
"https://img.pconline.com.cn/images/upload/upc/tx/itbbs/2101/25/c1/251135935_1611532823091_mthumb.jpg"
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
""
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
"https://photo.16pic.com/00/47/86/16pic_4786353_b.jpg"
),
AboutAdvantageItem
(
iconName
:
"about_match"
,
title
:
"精准匹配"
,
detail
:
"大数据精准匹配,专属方案获批率更高"
,
url
:
"https://inews.gtimg.com/om_bt/OMvPDmiuH_X5Vq1YLNgbFEzD2h_-2dCfWQ7xZFcKFSEsAAA/641"
)
]
self
.
myCollectView
.
reloadData
()
}
...
...
@@ -55,9 +66,9 @@ class YHServiceTableFootView: UIView {
myCollectView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
left
.
right
.
bottom
.
equalToSuperview
()
}
// self.myCollectView.es.addInfiniteScrolling {
// self.loadFakeData()
// }
// self.myCollectView.es.addInfiniteScrolling {
// self.loadFakeData()
// }
}
func
updateAllViews
()
{
...
...
@@ -101,9 +112,9 @@ extension YHServiceTableFootView: UICollectionViewDelegate, UICollectionViewData
print
(
"index is
\(
indexPath
.
row
)
"
)
}
// func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
//
// }
// func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
//
// }
}
extension
YHServiceTableFootView
:
CollectionViewWaterfallLayoutDelegate
{
...
...
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