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
9762ec05
Commit
9762ec05
authored
Jun 03, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 搜索默认词
parent
dfb58f61
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+2
-0
YHSearchInfomationVC.swift
...axy/Classes/Modules/Home(首页)/C/YHSearchInfomationVC.swift
+5
-3
YHServerTableHeadView.swift
...es/IntelligentService(服务中心)/V/YHServerTableHeadView.swift
+2
-0
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
9762ec05
...
@@ -78,6 +78,8 @@ class YHHomePageViewController: YHBaseViewController {
...
@@ -78,6 +78,8 @@ class YHHomePageViewController: YHBaseViewController {
private
extension
YHHomePageViewController
{
private
extension
YHHomePageViewController
{
@objc
func
didSearchBarClicked
()
{
@objc
func
didSearchBarClicked
()
{
let
vc
=
YHSearchInfomationVC
()
let
vc
=
YHSearchInfomationVC
()
vc
.
searchPlaceHolder
=
searchView
.
placeHolder
printLog
(
"placeHolder:
\(
searchView
.
placeHolder
)
"
)
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHSearchInfomationVC.swift
View file @
9762ec05
...
@@ -35,7 +35,8 @@ func getLatestValidSearchWord() -> String {
...
@@ -35,7 +35,8 @@ func getLatestValidSearchWord() -> String {
class
YHSearchInfomationVC
:
YHBaseViewController
{
class
YHSearchInfomationVC
:
YHBaseViewController
{
static
let
searchHistoryMaxCount
=
10
static
let
searchHistoryMaxCount
=
10
var
searchStr
=
""
private
var
searchStr
=
""
var
searchPlaceHolder
=
""
var
items
:[
YHHomeListModel
]
=
[]
var
items
:[
YHHomeListModel
]
=
[]
lazy
var
viewModel
:
YHHomePageViewModel
=
{
lazy
var
viewModel
:
YHHomePageViewModel
=
{
...
@@ -65,6 +66,7 @@ class YHSearchInfomationVC: YHBaseViewController {
...
@@ -65,6 +66,7 @@ class YHSearchInfomationVC: YHBaseViewController {
lazy
var
searchBar
:
YHSearchInfoBar
=
{
lazy
var
searchBar
:
YHSearchInfoBar
=
{
let
bar
=
YHSearchInfoBar
(
frame
:
CGRect
(
x
:
20
,
y
:
k_Height_NavigationtBarAndStatuBar
+
8.0
,
width
:
KScreenWidth
-
40
,
height
:
36.0
))
let
bar
=
YHSearchInfoBar
(
frame
:
CGRect
(
x
:
20
,
y
:
k_Height_NavigationtBarAndStatuBar
+
8.0
,
width
:
KScreenWidth
-
40
,
height
:
36.0
))
bar
.
placeHolder
=
self
.
searchPlaceHolder
bar
.
searchBlock
=
{
bar
.
searchBlock
=
{
[
weak
self
]
text
in
[
weak
self
]
text
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
...
@@ -72,8 +74,8 @@ class YHSearchInfomationVC: YHBaseViewController {
...
@@ -72,8 +74,8 @@ class YHSearchInfomationVC: YHBaseViewController {
searchStr
=
searchStr
.
trimmingCharacters
(
in
:
.
whitespaces
)
searchStr
=
searchStr
.
trimmingCharacters
(
in
:
.
whitespaces
)
if
isEmptyString
(
searchStr
)
{
if
isEmptyString
(
searchStr
)
{
searchStr
=
"香港身份"
searchStr
=
searchPlaceHolder
self
.
searchBar
.
textField
.
text
=
"香港身份"
self
.
searchBar
.
textField
.
text
=
searchPlaceHolder
}
}
searchText
()
searchText
()
if
searchStr
.
count
>
0
{
if
searchStr
.
count
>
0
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/V/YHServerTableHeadView.swift
View file @
9762ec05
...
@@ -86,6 +86,8 @@ class YHServerTableHeadView: UIView {
...
@@ -86,6 +86,8 @@ class YHServerTableHeadView: UIView {
@objc
func
didSearchBarClicked
()
{
@objc
func
didSearchBarClicked
()
{
let
vc
=
YHSearchInfomationVC
()
let
vc
=
YHSearchInfomationVC
()
vc
.
searchPlaceHolder
=
self
.
searchPlaceHolder
printLog
(
"placeHolder:
\(
searchPlaceHolder
)
"
)
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
}
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