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
9eca51cf
Commit
9eca51cf
authored
Aug 11, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 正式批的展示
parent
1bcfd057
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
157 additions
and
27 deletions
+157
-27
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+4
-0
YHHomeHoldViewPageViewController.swift
...Modules/Home(首页)/C/YHHomeHoldViewPageViewController.swift
+0
-2
YHOfficialApprovalResultVC.swift
...OfficialApprovalBatch/C/YHOfficialApprovalResultVC.swift
+47
-25
YHOfficalLetterListModel.swift
...e/OfficialApprovalBatch/M/YHOfficalLetterListModel.swift
+2
-0
YHOfficailLetterColledtionCell.swift
...icialApprovalBatch/V/YHOfficailLetterColledtionCell.swift
+90
-0
YHPrincleViewModel.swift
...erService/PrincipleBatch(原则批)/VM/YHPrincleViewModel.swift
+14
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
9eca51cf
...
...
@@ -596,6 +596,7 @@
A5DF3D462BF72BA1003D5F03
/* YHTestViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5DF3D452BF72BA0003D5F03
/* YHTestViewController.swift */
;
};
A5E69D512BA304D400411932
/* DIN Alternate Bold.ttf in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5E69D502BA304D400411932
/* DIN Alternate Bold.ttf */
;
};
A5EB6C622C675DA20081FB6C
/* YHOfficalLetterListModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5EB6C612C675DA20081FB6C
/* YHOfficalLetterListModel.swift */
;
};
A5EB6C642C68AD050081FB6C
/* YHOfficailLetterColledtionCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5EB6C632C68AD050081FB6C
/* YHOfficailLetterColledtionCell.swift */
;
};
A5EE41EF2C21387C005BBA5D
/* YHAiRadarAreaView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5EE41EE2C21387C005BBA5D
/* YHAiRadarAreaView.swift */
;
};
A5EE42002C216C78005BBA5D
/* img_1.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5EE41FC2C216C78005BBA5D
/* img_1.png */
;
};
A5EE42012C216C78005BBA5D
/* img_0.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5EE41FD2C216C78005BBA5D
/* img_0.png */
;
};
...
...
@@ -1256,6 +1257,7 @@
A5DF3D452BF72BA0003D5F03
/* YHTestViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHTestViewController.swift
;
sourceTree
=
"<group>"
;
};
A5E69D502BA304D400411932
/* DIN Alternate Bold.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"DIN Alternate Bold.ttf"
;
sourceTree
=
"<group>"
;
};
A5EB6C612C675DA20081FB6C
/* YHOfficalLetterListModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHOfficalLetterListModel.swift
;
sourceTree
=
"<group>"
;
};
A5EB6C632C68AD050081FB6C
/* YHOfficailLetterColledtionCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHOfficailLetterColledtionCell.swift
;
sourceTree
=
"<group>"
;
};
A5EE41EE2C21387C005BBA5D
/* YHAiRadarAreaView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAiRadarAreaView.swift
;
sourceTree
=
"<group>"
;
};
A5EE41FC2C216C78005BBA5D
/* img_1.png */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.png
;
path
=
img_1.png
;
sourceTree
=
"<group>"
;
};
A5EE41FD2C216C78005BBA5D
/* img_0.png */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.png
;
path
=
img_0.png
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2388,6 +2390,7 @@
047AA4062C65C1AC009C4554
/* YHOffivialApprovalSuccessView.swift */
,
047AA4072C65C1AC009C4554
/* YHOffivialApprovalGuildLineCheckView.swift */
,
047AA4082C65C1AC009C4554
/* YHOffivialApprovalSuccessCheckView.swift */
,
A5EB6C632C68AD050081FB6C
/* YHOfficailLetterColledtionCell.swift */
,
);
path
=
V
;
sourceTree
=
"<group>"
;
...
...
@@ -3771,6 +3774,7 @@
04F5F8642C19460D004A463C
/* YHHKLifeViewController.swift in Sources */
,
A59B43CF2C4B5AD100B28379
/* YHShareViewOnTablebarView.swift in Sources */
,
A5ACE94A2B4564F7002C94D2
/* YHHUDProgressView.swift in Sources */
,
A5EB6C642C68AD050081FB6C
/* YHOfficailLetterColledtionCell.swift in Sources */
,
04A271232BABFF3200652B1B
/* YHCertificateUploadTypeCell.swift in Sources */
,
04B360F32C636525001EB053
/* YHPrincipleWaitResultViewController.swift in Sources */
,
A582B2412BB95998009D098C
/* YHHKPlanTipsCell.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeHoldViewPageViewController.swift
View file @
9eca51cf
...
...
@@ -148,8 +148,6 @@ extension YHHomeHoldViewPageViewController {
return
}
// model.type = 1 //for test hjl
if
model
.
type
==
1
{
//正式弹窗
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/OfficialApprovalBatch/C/YHOfficialApprovalResultVC.swift
View file @
9eca51cf
...
...
@@ -9,6 +9,8 @@
import
UIKit
import
FSPagerView
import
AttributedString
/*
正式批 结果页
*/
...
...
@@ -94,7 +96,7 @@ class YHOfficialApprovalResultVC: YHBaseViewController {
label
.
textColor
=
UIColor
(
hex
:
0xffffff
,
alpha
:
0.6
)
label
.
textAlignment
=
.
center
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
label
.
text
=
"左滑查看其他获批信,当前
1/5
"
label
.
text
=
"左滑查看其他获批信,当前"
return
label
}()
...
...
@@ -106,9 +108,11 @@ class YHOfficialApprovalResultVC: YHBaseViewController {
view
.
dataSource
=
self
view
.
bounces
=
false
view
.
isInfinite
=
false
// view.automaticSlidingInterval = bannerSildingInterval
view
.
register
(
YHHomeBannerCollectionViewCell
.
self
,
forCellWithReuseIdentifier
:
"cell"
)
view
.
removesInfiniteLoopForSingleItem
=
true
view
.
alwaysBounceHorizontal
=
true
view
.
register
(
YHOfficailLetterColledtionCell
.
self
,
forCellWithReuseIdentifier
:
YHOfficailLetterColledtionCell
.
cellReuseIdentifier
)
view
.
itemSize
=
CGSizeMake
(
268.0
,
148
)
view
.
interitemSpacing
=
20
return
view
}()
...
...
@@ -117,20 +121,17 @@ class YHOfficialApprovalResultVC: YHBaseViewController {
return
view
}()
var
dataArr
:
[
YH
Bann
erModel
]
=
[]
{
var
dataArr
:
[
YH
OfficalLett
erModel
]
=
[]
{
didSet
{
// 设置为0是先停掉自动滑动定时器
// bannerView.automaticSlidingInterval = 0
self
.
indicatorView
.
indicatorItems
=
self
.
dataArr
.
count
bannerView
.
reloadData
()
// 指定指示器为第一个
self
.
indicatorView
.
curIndicatorIndex
=
0
// 指定显示图片为第一个
bannerView
.
selectItem
(
at
:
0
,
animated
:
false
)
// 开启定时器开始滚动
// bannerView.automaticSlidingInterval = bannerSildingInterval
bannerView
.
removesInfiniteLoopForSingleItem
=
true
bannerView
.
alwaysBounceHorizontal
=
true
let
aa
:
ASAttributedString
=
.
init
(
"左滑查看其他获批信,当前 "
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
(
hex
:
0xffffff
,
alpha
:
0.6
)))
let
bb
:
ASAttributedString
=
.
init
(
"1/
\(
self
.
dataArr
.
count
)
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
(
hex
:
0xffffff
,
alpha
:
1.0
)))
tipsLabel
.
attributed
.
text
=
aa
+
bb
}
}
...
...
@@ -144,6 +145,12 @@ class YHOfficialApprovalResultVC: YHBaseViewController {
var
showGuildViewFlag
:
Bool
=
false
lazy
var
previewFileTool
:
YHFilePreviewTool
=
{
let
tool
=
YHFilePreviewTool
(
targetVC
:
UIViewController
.
current
)
return
tool
}()
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -165,7 +172,7 @@ private extension YHOfficialApprovalResultVC {
}
func
updateLetterListInfo
()
{
self
.
dataArr
=
self
.
princleVM
.
lettersModel
?
.
list
??
[]
}
//获取正式批信件列表
...
...
@@ -184,7 +191,7 @@ private extension YHOfficialApprovalResultVC {
self
.
updateLetterListInfo
()
}
else
{
YHHUD
.
flash
(
message
:
"数据获取失败"
)
}
}
}
else
{
...
...
@@ -354,12 +361,9 @@ private extension YHOfficialApprovalResultVC {
// let transform = CGAffineTransform(scaleX: 0.6, y: 0.75)
bannerView
.
transformer
=
FSPagerViewTransformer
(
type
:
.
linear
)
//
bannerView.transformer = FSPagerViewTransformer(type:.linear)
// bannerView.itemSize = CGSize(width: 268, height: 148).applying(transform)
self
.
dataArr
=
[
YHBannerModel
(),
YHBannerModel
(),
YHBannerModel
()]
//for test hjl
bannerView
.
reloadData
()
// bannerView.reloadData()
}
private
func
rotatedTransform
()
->
CGAffineTransform
{
...
...
@@ -405,7 +409,7 @@ private extension YHOfficialApprovalResultVC {
}
// MARK: - FSPagerView Delegate
extension
YHOfficialApprovalResultVC
:
FSPagerViewDataSource
,
FSPagerViewDelegate
{
public
func
numberOfItems
(
in
pagerView
:
FSPagerView
)
->
Int
{
...
...
@@ -413,19 +417,29 @@ extension YHOfficialApprovalResultVC: FSPagerViewDataSource, FSPagerViewDelegate
}
public
func
pagerView
(
_
pagerView
:
FSPagerView
,
cellForItemAt
index
:
Int
)
->
FSPagerViewCell
{
let
cell
=
pagerView
.
dequeueReusableCell
(
withReuseIdentifier
:
"cell"
,
at
:
index
)
as!
YHHomeBannerCollectionView
Cell
let
cell
=
pagerView
.
dequeueReusableCell
(
withReuseIdentifier
:
YHOfficailLetterColledtionCell
.
cellReuseIdentifier
,
at
:
index
)
as!
YHOfficailLetterColledtion
Cell
if
index
<
dataArr
.
count
{
// cell.dataModel = dataArr[index]
// cell.contentView.backgroundColor = .red//for test hjl
cell
.
dataModel
=
dataArr
[
index
]
}
return
cell
}
// MARK: - FSPagerView Delegate
func
pagerView
(
_
pagerView
:
FSPagerView
,
didSelectItemAt
index
:
Int
)
{
pagerView
.
deselectItem
(
at
:
index
,
animated
:
true
)
pagerView
.
scrollToItem
(
at
:
index
,
animated
:
true
)
if
index
>=
dataArr
.
count
{
if
index
<
dataArr
.
count
{
let
model
=
self
.
dataArr
[
index
]
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
model
.
file_url_transformed
,
fileName
:
""
)
if
!
model
.
localShowFlag
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
model
.
localShowFlag
=
true
UserDefaults
.
standard
.
setValue
(
"localShowFlag"
,
forKey
:
String
(
model
.
id
))
UserDefaults
.
standard
.
synchronize
()
self
.
bannerView
.
reloadData
()
}
}
return
}
...
...
@@ -433,9 +447,17 @@ extension YHOfficialApprovalResultVC: FSPagerViewDataSource, FSPagerViewDelegate
func
pagerViewWillEndDragging
(
_
pagerView
:
FSPagerView
,
targetIndex
:
Int
)
{
self
.
indicatorView
.
curIndicatorIndex
=
targetIndex
let
aa
:
ASAttributedString
=
.
init
(
"左滑查看其他获批信,当前 "
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
(
hex
:
0xffffff
,
alpha
:
0.6
)))
let
bb
:
ASAttributedString
=
.
init
(
"
\(
targetIndex
+
1
)
/
\(
self
.
dataArr
.
count
)
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
(
hex
:
0xffffff
,
alpha
:
1.0
)))
tipsLabel
.
attributed
.
text
=
aa
+
bb
}
func
pagerViewDidEndScrollAnimation
(
_
pagerView
:
FSPagerView
)
{
self
.
indicatorView
.
curIndicatorIndex
=
pagerView
.
currentIndex
let
aa
:
ASAttributedString
=
.
init
(
"左滑查看其他获批信,当前 "
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
(
hex
:
0xffffff
,
alpha
:
0.6
)))
let
bb
:
ASAttributedString
=
.
init
(
"
\(
pagerView
.
currentIndex
+
1
)
/
\(
self
.
dataArr
.
count
)
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
(
hex
:
0xffffff
,
alpha
:
1.0
)))
tipsLabel
.
attributed
.
text
=
aa
+
bb
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/OfficialApprovalBatch/M/YHOfficalLetterListModel.swift
View file @
9eca51cf
...
...
@@ -41,6 +41,8 @@ class YHOfficalLetterModel: SmartCodable {
var
updated_at
:
String
=
""
//申请记录最后更新的时间
var
url
:
String
=
""
//文件的URL
var
localShowFlag
:
Bool
=
false
//信件是否点击打开 本地变量
required
init
()
{
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/OfficialApprovalBatch/V/YHOfficailLetterColledtionCell.swift
0 → 100644
View file @
9eca51cf
//
// YHOfficailLetterColledtionCell.swift
// galaxy
//
// Created by davidhuangA on 2024/8/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
FSPagerView
class
YHOfficailLetterColledtionCell
:
FSPagerViewCell
{
static
let
cellReuseIdentifier
=
"YHOfficailLetterColledtionCell"
var
dataModel
:
YHOfficalLetterModel
?
{
didSet
{
updateUI
()
}
}
lazy
var
bkgImageView
:
UIImageView
=
{
let
imageV
=
UIImageView
(
image
:
UIImage
(
named
:
"official_approval_result_envelope_not_read"
))
imageV
.
contentMode
=
.
scaleAspectFill
return
imageV
}()
lazy
var
nameLable
:
UILabel
=
{
let
label
=
UILabel
()
label
.
text
=
""
label
.
textColor
=
UIColor
(
hex
:
0xA96B42
,
alpha
:
1.0
)
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
15
)
return
label
}()
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
}
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
contentView
.
removeSubviews
()
setupUI
()
}
}
private
extension
YHOfficailLetterColledtionCell
{
func
setupUI
()
{
backgroundColor
=
.
clear
contentView
.
backgroundColor
=
.
clear
clipsToBounds
=
true
contentView
.
layer
.
shadowColor
=
UIColor
.
clear
.
cgColor
contentView
.
layer
.
shadowRadius
=
0
contentView
.
layer
.
shadowOpacity
=
0
contentView
.
layer
.
shadowOffset
=
.
zero
contentView
.
addSubview
(
bkgImageView
)
bkgImageView
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
}
contentView
.
addSubview
(
nameLable
)
nameLable
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
kMargin
+
12
)
make
.
left
.
equalToSuperview
()
.
offset
(
60
)
make
.
height
.
equalTo
(
21
)
}
}
func
updateUI
()
{
guard
let
model
=
dataModel
else
{
return
}
nameLable
.
text
=
model
.
applicant
if
!
model
.
localShowFlag
{
//未读
bkgImageView
.
image
=
UIImage
(
named
:
"official_approval_result_envelope_not_read"
)
}
else
{
//已读
bkgImageView
.
image
=
UIImage
(
named
:
"official_approval_result_envelope_readed"
)
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/PrincipleBatch(原则批)/VM/YHPrincleViewModel.swift
View file @
9eca51cf
...
...
@@ -46,6 +46,20 @@ extension YHPrincleViewModel {
callback
?(
false
,
err
)
return
}
var
arrList
:
[
YHOfficalLetterModel
]
=
[]
for
(
index
,
item
)
in
resultModel
.
list
.
enumerated
()
{
//
let
oldString
=
UserDefaults
.
standard
.
value
(
forKey
:
String
(
item
.
id
))
if
let
tempStr
=
oldString
as?
String
,
tempStr
.
isEmpty
==
false
{
item
.
localShowFlag
=
true
}
else
{
item
.
localShowFlag
=
false
}
arrList
.
append
(
item
)
}
resultModel
.
list
=
arrList
self
.
lettersModel
=
resultModel
callback
?(
true
,
nil
)
}
else
{
...
...
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