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
c80e2dfc
Commit
c80e2dfc
authored
Jul 23, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
证件优化
parent
97b8603c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
16 deletions
+36
-16
YHCertificateModel.swift
...ice(服务中心)/MyCertificates(我的证书)/M/YHCertificateModel.swift
+2
-0
YHCertificateInfoCell.swift
...(服务中心)/MyCertificates(我的证书)/V/YHCertificateInfoCell.swift
+34
-16
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/M/YHCertificateModel.swift
View file @
c80e2dfc
...
@@ -71,6 +71,7 @@ class YHSupplementInfo: SmartCodable {
...
@@ -71,6 +71,7 @@ class YHSupplementInfo: SmartCodable {
var
auditContent
:
String
=
""
var
auditContent
:
String
=
""
var
uploadRequirement
:
Int
=
0
var
uploadRequirement
:
Int
=
0
var
contentUrl
:
[
YHContentUrl
]
=
[]
var
contentUrl
:
[
YHContentUrl
]
=
[]
var
isNeedDealt
:
Bool
=
false
// 是否是银河代办
func
getStatusName
()
->
String
{
func
getStatusName
()
->
String
{
if
checkStatus
==
YHCertificateUploadStatus
.
review
.
rawValue
{
if
checkStatus
==
YHCertificateUploadStatus
.
review
.
rawValue
{
...
@@ -104,6 +105,7 @@ class YHSupplementInfo: SmartCodable {
...
@@ -104,6 +105,7 @@ class YHSupplementInfo: SmartCodable {
case
auditContent
=
"audit_content"
case
auditContent
=
"audit_content"
case
uploadRequirement
=
"upload_requirement"
case
uploadRequirement
=
"upload_requirement"
case
contentUrl
=
"content_url"
case
contentUrl
=
"content_url"
case
isNeedDealt
=
"is_need_dealt"
}
}
required
init
()
{
required
init
()
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateInfoCell.swift
View file @
c80e2dfc
...
@@ -13,7 +13,7 @@ import AttributedString
...
@@ -13,7 +13,7 @@ import AttributedString
class
YHCertificateInfoCell
:
UITableViewCell
{
class
YHCertificateInfoCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHCertificateInfoCell"
static
let
cellReuseIdentifier
=
"YHCertificateInfoCell"
var
model
:
YHSupplementInfo
=
YHSupplementInfo
()
var
status
:
YHCertificateUploadStatus
=
.
preUpload
var
status
:
YHCertificateUploadStatus
=
.
preUpload
var
templateBlock
:(()
->
())?
var
templateBlock
:(()
->
())?
var
whiteView
:
UIView
!
var
whiteView
:
UIView
!
...
@@ -21,7 +21,19 @@ class YHCertificateInfoCell: UITableViewCell {
...
@@ -21,7 +21,19 @@ class YHCertificateInfoCell: UITableViewCell {
var
infoLabel
:
UILabel
!
var
infoLabel
:
UILabel
!
var
statusLabel
:
UILabel
!
var
statusLabel
:
UILabel
!
var
rightArrowImgV
:
UIImageView
!
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
)
{
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
super
.
init
(
coder
:
coder
)
...
@@ -34,6 +46,7 @@ class YHCertificateInfoCell: UITableViewCell {
...
@@ -34,6 +46,7 @@ class YHCertificateInfoCell: UITableViewCell {
func
updateModel
(
_
model
:
YHSupplementInfo
)
{
func
updateModel
(
_
model
:
YHSupplementInfo
)
{
self
.
model
=
model
if
let
status
=
YHCertificateUploadStatus
(
rawValue
:
model
.
checkStatus
)
{
if
let
status
=
YHCertificateUploadStatus
(
rawValue
:
model
.
checkStatus
)
{
var
titleColor
:
UIColor
=
.
labelTextColor2
var
titleColor
:
UIColor
=
.
labelTextColor2
...
@@ -82,14 +95,26 @@ class YHCertificateInfoCell: UITableViewCell {
...
@@ -82,14 +95,26 @@ class YHCertificateInfoCell: UITableViewCell {
var
result
:
ASAttributedString
=
.
init
(
string
:
""
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
)),
.
foreground
(
UIColor
.
mainTextColor
))
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
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
template
:
ASAttributedString
=
"
\(
.
view
(
templateButton
,
.
original
(
.
center
))
)
"
// 是否展示右边的模版按钮
// 是否展示右边的模版按钮
var
showTemplateBtn
=
true
var
showTemplateBtn
=
true
if
model
.
templateInfo
.
materialPath
.
isEmpty
&&
model
.
templateInfo
.
guideFilePath
.
isEmpty
&&
model
.
templateInfo
.
description
.
isEmpty
{
if
model
.
isNeedDealt
{
templateButton
.
setTitle
(
"银河代办"
,
for
:
.
normal
)
showTemplateBtn
=
false
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
()
{
if
model
.
isNeedSupplemnt
()
{
...
@@ -103,6 +128,9 @@ class YHCertificateInfoCell: UITableViewCell {
...
@@ -103,6 +128,9 @@ class YHCertificateInfoCell: UITableViewCell {
}
}
@objc
func
didTemplateBtnClicked
()
{
@objc
func
didTemplateBtnClicked
()
{
if
self
.
model
.
isNeedDealt
{
// 银河代办
return
}
if
let
templateBlock
=
templateBlock
{
if
let
templateBlock
=
templateBlock
{
templateBlock
()
templateBlock
()
}
}
...
@@ -127,16 +155,6 @@ class YHCertificateInfoCell: UITableViewCell {
...
@@ -127,16 +155,6 @@ class YHCertificateInfoCell: UITableViewCell {
nameTextView
.
isSelectable
=
false
nameTextView
.
isSelectable
=
false
whiteView
.
addSubview
(
nameTextView
)
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
=
"""
nameTextView
.
attributed
.
text
=
"""
\(
"资料名称"
,
.
foreground
(
UIColor
.
mainTextColor
),
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
16
))
)
\(
.
view
(
templateButton
,
.
original
(
.
center
))
)
)
\(
"资料名称"
,
.
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