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
6cf62c3e
Commit
6cf62c3e
authored
May 15, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 学校名称搜索bug修复
parent
ed86c79b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
15 deletions
+16
-15
YHCollegeSearchViewController.swift
...ification(学历专业资格填写)/C/YHCollegeSearchViewController.swift
+1
-5
YHEducationRequestViewModel.swift
...alification(学历专业资格填写)/M/YHEducationRequestViewModel.swift
+0
-2
YHCollegeSearchBar.swift
...cation&Qualification(学历专业资格填写)/V/YHCollegeSearchBar.swift
+15
-8
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/Education&Qualification(学历专业资格填写)/C/YHCollegeSearchViewController.swift
View file @
6cf62c3e
...
...
@@ -14,7 +14,6 @@ class YHCollegeSearchViewController: YHBaseViewController {
var
searchCollegeName
:
String
?
var
selectBlock
:((
String
?)
->
Void
)?
var
colleges
:[
YHCollegeInfo
]
=
[]
var
lastSearchTime
:
TimeInterval
=
0.0
let
educationRequest
:
YHEducationRequestViewModel
=
YHEducationRequestViewModel
()
lazy
var
searchBar
:
YHCollegeSearchBar
=
{
...
...
@@ -91,10 +90,7 @@ class YHCollegeSearchViewController: YHBaseViewController {
[
weak
self
]
text
in
guard
let
self
=
self
else
{
return
}
searchCollegeName
=
text
if
Date
()
.
timeIntervalSince1970
-
lastSearchTime
>=
1.0
{
lastSearchTime
=
Date
()
.
timeIntervalSince1970
searchCollege
()
}
self
.
searchCollege
()
}
searchBar
.
confirmBlock
=
{
[
weak
self
]
in
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/Education&Qualification(学历专业资格填写)/M/YHEducationRequestViewModel.swift
View file @
6cf62c3e
...
...
@@ -273,8 +273,6 @@ class YHEducationRequestViewModel {
// 搜索学校
func
searchCollegeInfoList
(
params
:[
String
:
Any
],
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
YHHUD
.
show
(
.
progress
(
message
:
"数据加载中..."
))
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Education
.
searchCollegeNameApi
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{[
weak
self
]
json
,
code
in
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/Education&Qualification(学历专业资格填写)/V/YHCollegeSearchBar.swift
View file @
6cf62c3e
...
...
@@ -8,7 +8,7 @@
import
UIKit
class
YHCollegeSearchBar
:
UIView
{
class
YHCollegeSearchBar
:
UIView
,
UITextFieldDelegate
{
static
let
height
=
40.0
static
let
confirmBtnHeight
=
height
-
8.0
...
...
@@ -37,7 +37,7 @@ class YHCollegeSearchBar: UIView {
textField
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
12
)
textField
.
tintColor
=
UIColor
.
brandMainColor
textField
.
textColor
=
UIColor
.
mainTextColor
textField
.
addTarget
(
self
,
action
:
#selector(
textFieldChanged(textField:)
)
,
for
:
.
editingChanged
)
textField
.
delegate
=
self
return
textField
}()
...
...
@@ -96,13 +96,20 @@ class YHCollegeSearchBar: UIView {
make
.
right
.
equalToSuperview
()
.
offset
(
-
4
)
}
}
@objc
func
textFieldChanged
(
textField
:
UITextField
)
{
func
textFieldDidChangeSelection
(
_
textField
:
UITextField
)
{
let
text
=
textField
.
text
??
""
let
max
=
100
textField
.
text
=
(
text
.
count
>
max
?
text
[
safe
:
..<
max
]
:
text
)
if
let
textChange
=
textChange
{
textChange
(
textField
.
text
)
textChange
?(
textField
.
text
)
}
func
textField
(
_
textField
:
UITextField
,
shouldChangeCharactersIn
range
:
NSRange
,
replacementString
string
:
String
)
->
Bool
{
if
string
.
count
>
0
{
let
newText
=
(
textField
.
text
!
as
NSString
)
.
replacingCharacters
(
in
:
range
,
with
:
string
)
if
newText
.
count
>
100
{
return
false
}
}
return
true
}
}
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