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
b3b1b50c
Commit
b3b1b50c
authored
Jul 23, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'youhua-dev' of
http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS
into youhua-dev
parents
8d4ac3d3
c80e2dfc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
26 deletions
+77
-26
YHHomeIdentityViewController.swift
...ses/Modules/Home(首页)/C/YHHomeIdentityViewController.swift
+41
-10
YHCertificateModel.swift
...ice(服务中心)/MyCertificates(我的证书)/M/YHCertificateModel.swift
+2
-0
YHCertificateInfoCell.swift
...(服务中心)/MyCertificates(我的证书)/V/YHCertificateInfoCell.swift
+34
-16
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeIdentityViewController.swift
View file @
b3b1b50c
...
...
@@ -27,6 +27,8 @@ class YHHomeIdentityItem {
class
YHHomeIdentityViewController
:
YHBaseViewController
{
var
scrollContentY
:
CGFloat
=
0.0
var
isShowBottomView
:
Bool
=
false
var
imgItems
:[
YHHomeIdentityItem
]
=
[
YHHomeIdentityItem
(
img
:
UIImage
(
named
:
"identity_talent_1"
)),
YHHomeIdentityItem
(
img
:
UIImage
(
named
:
"identity_talent_2"
)),
YHHomeIdentityItem
(
img
:
UIImage
(
named
:
"identity_talent_3"
)),
...
...
@@ -60,6 +62,7 @@ class YHHomeIdentityViewController: YHBaseViewController {
tableView
.
register
(
YHHomeIdentityCell
.
self
,
forCellReuseIdentifier
:
YHHomeIdentityCell
.
cellReuseIdentifier
)
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
bounces
=
false
tableView
.
tableHeaderView
=
self
.
headerView
return
tableView
}()
...
...
@@ -148,16 +151,6 @@ class YHHomeIdentityViewController: YHBaseViewController {
make
.
top
.
equalTo
(
headImgView
.
snp
.
bottom
)
.
offset
(
8.0
)
}
}
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
printLog
(
"offset:
\(
scrollView
.
contentOffset
.
y
)
"
)
if
scrollView
.
contentOffset
.
y
<=
self
.
headerView
.
height
{
if
self
.
segmentedView
.
selectedIndex
!=
0
{
self
.
segmentedView
.
defaultSelectedIndex
=
0
self
.
segmentedView
.
reloadDataWithoutListContainer
()
}
}
}
}
extension
YHHomeIdentityViewController
:
JXSegmentedViewDelegate
{
...
...
@@ -212,6 +205,44 @@ extension YHHomeIdentityViewController: UITableViewDataSource, UITableViewDelega
}
}
extension
YHHomeIdentityViewController
:
UIScrollViewDelegate
{
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
printLog
(
"offset:
\(
scrollView
.
contentOffset
.
y
)
"
)
if
scrollView
.
contentOffset
.
y
<=
self
.
headerView
.
height
{
if
self
.
segmentedView
.
selectedIndex
!=
0
{
self
.
segmentedView
.
defaultSelectedIndex
=
0
self
.
segmentedView
.
reloadDataWithoutListContainer
()
}
}
let
gap
=
10.0
if
scrollView
.
contentOffset
.
y
>=
self
.
scrollContentY
+
gap
{
self
.
scrollContentY
=
scrollView
.
contentOffset
.
y
if
!
self
.
isShowBottomView
{
self
.
isShowBottomView
=
true
printLog
(
"ABC show:
\(
self
.
scrollContentY
)
"
)
var
model
=
TabBarShareModel
()
model
.
showFlag
=
true
model
.
shareUrl
=
""
model
.
codeUrl
=
""
model
.
downloadUrl
=
""
NotificationCenter
.
default
.
post
(
name
:
YhConstant
.
YhNotification
.
changeShareViewStatusOnTabBarNotifiction
,
object
:
model
)
}
}
else
if
scrollView
.
contentOffset
.
y
<=
self
.
scrollContentY
-
gap
{
self
.
scrollContentY
=
scrollView
.
contentOffset
.
y
if
self
.
isShowBottomView
{
self
.
isShowBottomView
=
false
printLog
(
"ABC hide:
\(
self
.
scrollContentY
)
"
)
var
model
=
TabBarShareModel
()
model
.
showFlag
=
false
NotificationCenter
.
default
.
post
(
name
:
YhConstant
.
YhNotification
.
changeShareViewStatusOnTabBarNotifiction
,
object
:
model
)
}
}
}
}
extension
YHHomeIdentityViewController
{
func
requestData
()
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/M/YHCertificateModel.swift
View file @
b3b1b50c
...
...
@@ -71,6 +71,7 @@ class YHSupplementInfo: SmartCodable {
var
auditContent
:
String
=
""
var
uploadRequirement
:
Int
=
0
var
contentUrl
:
[
YHContentUrl
]
=
[]
var
isNeedDealt
:
Bool
=
false
// 是否是银河代办
func
getStatusName
()
->
String
{
if
checkStatus
==
YHCertificateUploadStatus
.
review
.
rawValue
{
...
...
@@ -104,6 +105,7 @@ class YHSupplementInfo: SmartCodable {
case
auditContent
=
"audit_content"
case
uploadRequirement
=
"upload_requirement"
case
contentUrl
=
"content_url"
case
isNeedDealt
=
"is_need_dealt"
}
required
init
()
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateInfoCell.swift
View file @
b3b1b50c
...
...
@@ -13,7 +13,7 @@ import AttributedString
class
YHCertificateInfoCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHCertificateInfoCell"
var
model
:
YHSupplementInfo
=
YHSupplementInfo
()
var
status
:
YHCertificateUploadStatus
=
.
preUpload
var
templateBlock
:(()
->
())?
var
whiteView
:
UIView
!
...
...
@@ -21,7 +21,19 @@ class YHCertificateInfoCell: UITableViewCell {
var
infoLabel
:
UILabel
!
var
statusLabel
:
UILabel
!
var
rightArrowImgV
:
UIImageView
!
var
templateButton
:
UIButton
!
lazy
var
templateButton
:
UIButton
=
{
let
btn
=
UIButton
()
btn
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
48
,
height
:
16
)
btn
.
setTitle
(
"资料模版"
,
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
.
PFSC_M
(
ofSize
:
10
)
btn
.
setTitleColor
(
.
brandMainColor
,
for
:
.
normal
)
btn
.
layer
.
cornerRadius
=
kCornerRadius3
btn
.
clipsToBounds
=
true
btn
.
backgroundColor
=
.
brandMainColor8
btn
.
addTarget
(
self
,
action
:
#selector(
didTemplateBtnClicked
)
,
for
:
.
touchUpInside
)
btn
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
20
,
left
:
20
,
bottom
:
20
,
right
:
20
)
return
btn
}()
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
...
...
@@ -34,6 +46,7 @@ class YHCertificateInfoCell: UITableViewCell {
func
updateModel
(
_
model
:
YHSupplementInfo
)
{
self
.
model
=
model
if
let
status
=
YHCertificateUploadStatus
(
rawValue
:
model
.
checkStatus
)
{
var
titleColor
:
UIColor
=
.
labelTextColor2
...
...
@@ -82,14 +95,26 @@ class YHCertificateInfoCell: UITableViewCell {
var
result
:
ASAttributedString
=
.
init
(
string
:
""
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
mustTag
:
ASAttributedString
=
.
init
(
"*"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
)),
.
foreground
(
UIColor
.
failColor
))
let
cerName
:
ASAttributedString
=
.
init
(
string
:
model
.
name
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
)),
.
foreground
(
UIColor
.
mainTextColor
))
var
name
=
model
.
name
if
!
model
.
nameExtra
.
organization
.
isEmpty
{
name
+=
"(
\(
model
.
nameExtra
.
organization
)
)"
}
let
cerName
:
ASAttributedString
=
.
init
(
string
:
name
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
)),
.
foreground
(
UIColor
.
mainTextColor
))
var
template
:
ASAttributedString
=
"
\(
.
view
(
templateButton
,
.
original
(
.
center
))
)
"
// 是否展示右边的模版按钮
var
showTemplateBtn
=
true
if
model
.
templateInfo
.
materialPath
.
isEmpty
&&
model
.
templateInfo
.
guideFilePath
.
isEmpty
&&
model
.
templateInfo
.
description
.
isEmpty
{
showTemplateBtn
=
false
if
model
.
isNeedDealt
{
templateButton
.
setTitle
(
"银河代办"
,
for
:
.
normal
)
template
=
"
\(
.
view
(
templateButton
,
.
original
(
.
center
))
)
"
}
else
{
templateButton
.
setTitle
(
"资料模版"
,
for
:
.
normal
)
template
=
"
\(
.
view
(
templateButton
,
.
original
(
.
center
))
)
"
if
model
.
templateInfo
.
materialPath
.
isEmpty
&&
model
.
templateInfo
.
guideFilePath
.
isEmpty
&&
model
.
templateInfo
.
description
.
isEmpty
{
showTemplateBtn
=
false
}
}
if
model
.
isNeedSupplemnt
()
{
...
...
@@ -103,6 +128,9 @@ class YHCertificateInfoCell: UITableViewCell {
}
@objc
func
didTemplateBtnClicked
()
{
if
self
.
model
.
isNeedDealt
{
// 银河代办
return
}
if
let
templateBlock
=
templateBlock
{
templateBlock
()
}
...
...
@@ -127,16 +155,6 @@ class YHCertificateInfoCell: UITableViewCell {
nameTextView
.
isSelectable
=
false
whiteView
.
addSubview
(
nameTextView
)
templateButton
=
UIButton
()
templateButton
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
48
,
height
:
16
)
templateButton
.
setTitle
(
"资料模版"
,
for
:
.
normal
)
templateButton
.
titleLabel
?
.
font
=
.
PFSC_M
(
ofSize
:
10
)
templateButton
.
setTitleColor
(
.
brandMainColor
,
for
:
.
normal
)
templateButton
.
layer
.
cornerRadius
=
kCornerRadius3
templateButton
.
clipsToBounds
=
true
templateButton
.
backgroundColor
=
.
brandMainColor8
templateButton
.
addTarget
(
self
,
action
:
#selector(
didTemplateBtnClicked
)
,
for
:
.
touchUpInside
)
templateButton
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
20
,
left
:
20
,
bottom
:
20
,
right
:
20
)
nameTextView
.
attributed
.
text
=
"""
\(
"资料名称"
,
.
foreground
(
UIColor
.
mainTextColor
),
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
))
)
\(
.
view
(
templateButton
,
.
original
(
.
center
))
)
)
...
...
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