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
cb152d70
Commit
cb152d70
authored
Jul 08, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、其他 字段控制
2、提示 赴港计划书格式、内容作出调整,共分为六部分,每部分不得超过对应字数
parent
94051c42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
29 deletions
+41
-29
YHHKPlanItemView.swift
...tService(服务中心)/MyDocuments(我的文书)/V/YHHKPlanItemView.swift
+40
-28
YHHKPlanTipsCell.swift
...tService(服务中心)/MyDocuments(我的文书)/V/YHHKPlanTipsCell.swift
+1
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/V/YHHKPlanItemView.swift
View file @
cb152d70
...
...
@@ -391,22 +391,19 @@ private extension YHHKPlanItemView {
extension
YHHKPlanItemView
:
UITextViewDelegate
{
func
textView
(
_
textView
:
UITextView
,
shouldChangeTextIn
range
:
NSRange
,
replacementText
text
:
String
)
->
Bool
{
if
text
.
isEmpty
{
return
true
}
var
newLength
=
(
textView
.
text
as
NSString
)
.
length
+
text
.
count
-
range
.
length
if
dataMode
?
.
type
==
.
planOther
{
return
newLength
<=
maxNumbler
}
else
{
newLength
=
calcTextLength
(
string
:
textView
.
text
)
}
//
var newLength = (textView.text as NSString).length + text.count - range.length
// if dataMode?.type == .planOther {
// return newLength <= maxNumbler
// } else {
// newLength = calcTextLength(string: textView.text)
// }
var
newLength
=
calcTextLength
(
string
:
textView
.
text
)
return
newLength
<=
maxNumbler
-
1
}
...
...
@@ -415,29 +412,44 @@ extension YHHKPlanItemView : UITextViewDelegate {
guard
let
text
=
textView
.
text
else
{
return
}
var
txtNum
:
Int
=
0
if
model
.
type
==
.
planOther
{
txtNum
=
myTextView
.
text
.
count
numberLabel
.
text
=
txtNum
.
string
+
"/
\(
maxNumbler
)
"
// if model.type == .planOther {
// txtNum = myTextView.text.count
// numberLabel.text = txtNum.string + "/\(maxNumbler)"
//
//
// model.content = text
// } else {
// txtNum = calcTextLength(string: text)
// numberLabel.text = txtNum.string + "/\(maxNumbler)" //for test hjl
//
//
// printLog(text.count)
// if text.count <= maxNumbler{
// model.content = text
// } else {
// var ttt = text
// let subString = ttt.slice(from: 0, length: maxNumbler)
//
// model.content = subString
// }
//
// }
txtNum
=
calcTextLength
(
string
:
text
)
numberLabel
.
text
=
txtNum
.
string
+
"/
\(
maxNumbler
)
"
//for test hjl
printLog
(
text
.
count
)
if
text
.
count
<=
maxNumbler
{
model
.
content
=
text
}
else
{
txtNum
=
calcTextLength
(
string
:
text
)
numberLabel
.
text
=
txtNum
.
string
+
"/
\(
maxNumbler
)
"
//for test hjl
printLog
(
text
.
count
)
if
text
.
count
<=
maxNumbler
{
model
.
content
=
text
}
else
{
var
ttt
=
text
let
subString
=
ttt
.
slice
(
from
:
0
,
length
:
maxNumbler
)
model
.
content
=
subString
}
var
ttt
=
text
let
subString
=
ttt
.
slice
(
from
:
0
,
length
:
maxNumbler
)
model
.
content
=
subString
}
if
txtNum
>
maxNumbler
{
numberLabel
.
textColor
=
.
failColor
}
else
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/V/YHHKPlanTipsCell.swift
View file @
cb152d70
...
...
@@ -84,7 +84,7 @@ private extension YHHKPlanTipsCell {
let
a
:
ASAttributedString
=
.
init
(
"应香港入境处最新要求,"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
labelTextColor2
))
let
b
:
ASAttributedString
=
.
init
(
"赴港计划书格式、内容作出调整,共分为六部分,每部分不得超过
100字
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
brandMainColor
))
let
b
:
ASAttributedString
=
.
init
(
"赴港计划书格式、内容作出调整,共分为六部分,每部分不得超过
对应字数
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
brandMainColor
))
let
c
:
ASAttributedString
=
.
init
(
"。其中“赴港具体计划”仅代表个人预期规划,无须严格执行。"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
labelTextColor2
))
...
...
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