Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GeliBusinessPlatform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
GeliBusinessPlatform
Commits
9e4bd83f
Commit
9e4bd83f
authored
Aug 06, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
输入搜索实现
parent
aa6d427a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/货拉拉/收发货地址/ToAndFormSelectViewController.swift
...wController/货拉拉/收发货地址/ToAndFormSelectViewController.swift
+16
-6
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
9e4bd83f
No preview for this file type
GeliBusinessPlatform/ViewController/货拉拉/收发货地址/ToAndFormSelectViewController.swift
View file @
9e4bd83f
...
@@ -20,12 +20,15 @@ protocol ToAndFormSelectViewControllerDelegate {
...
@@ -20,12 +20,15 @@ protocol ToAndFormSelectViewControllerDelegate {
class
ToAndFormSelectViewController
:
BaseViewController
,
MAMapViewDelegate
,
CLLocationManagerDelegate
,
AMapSearchDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
UITableViewDelegate
,
UITableViewDataSource
,
CityListViewControllerDelegate
,
HuoLaLaDiZhiCellDelegate
{
class
ToAndFormSelectViewController
:
BaseViewController
,
MAMapViewDelegate
,
CLLocationManagerDelegate
,
AMapSearchDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
UITableViewDelegate
,
UITableViewDataSource
,
CityListViewControllerDelegate
,
HuoLaLaDiZhiCellDelegate
{
func
HuoLaLaDiZhiCellBtnClick
(
model
:
citySearchDataPoiChildrenModel
,
cityStr
:
String
)
{
func
HuoLaLaDiZhiCellBtnClick
(
model
:
citySearchDataPoiChildrenModel
,
cityStr
:
String
)
{
citySelectBtn
.
setTitle
(
cityStr
,
for
:
.
normal
)
citySelectBtn
.
setTitle
(
cityStr
,
for
:
.
normal
)
mapView
.
centerCoordinate
=
CLLocationCoordinate2DMake
((
model
.
location
?
.
lat
)
!
,(
model
.
location
?
.
lon
)
!
)
mapView
.
centerCoordinate
=
BLCoordinatesChangeHelper
.
shared
()?
.
bl_wgs84togcj02
((
model
.
location
?
.
lon
)
!
,
andLat
:
(
model
.
location
?
.
lat
)
!
)
as!
CLLocationCoordinate2D
isMove
=
false
adrName
=
model
.
name
!
detailAdr
=
model
.
address
!
searchList
.
isHidden
=
true
searchList
.
isHidden
=
true
closeBtn
.
isHidden
=
true
closeBtn
.
isHidden
=
true
listViewBG
.
isHidden
=
true
listViewBG
.
isHidden
=
true
IQKeyboardManager
.
shared
.
resignFirstResponder
()
IQKeyboardManager
.
shared
.
resignFirstResponder
()
print
(
"1"
)
}
}
func
CityListViewControllerLocSelect
(
loc
:
cityListDataModel
)
{
func
CityListViewControllerLocSelect
(
loc
:
cityListDataModel
)
{
...
@@ -196,7 +199,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
...
@@ -196,7 +199,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
searchBr
.
cornerRadius
=
35
/
2.0
searchBr
.
cornerRadius
=
35
/
2.0
searchBr
.
delegate
=
self
searchBr
.
delegate
=
self
searchBr
.
delegateL
=
self
searchBr
.
delegateL
=
self
//
searchBr.returnKeyType = .done
searchBr
.
returnKeyType
=
.
done
if
idx
!=
0
{
if
idx
!=
0
{
sureSelectLbl
.
text
=
"确认收货地"
sureSelectLbl
.
text
=
"确认收货地"
...
@@ -503,10 +506,18 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
...
@@ -503,10 +506,18 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
}
}
searchBar
.
resignFirstResponder
()
searchBar
.
resignFirstResponder
()
}
func
searchBar
(
_
searchBar
:
UISearchBar
,
textDidChange
searchText
:
String
)
{
keyword
=
searchText
if
keyword
.
count
>
0
{
searchList
.
isHidden
=
false
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"nonce_str"
:
String
.
randomStr
(
len
:
30
)
as
Any
,
"nonce_str"
:
String
.
randomStr
(
len
:
30
)
as
Any
,
"kw"
:
keyword
as
Any
"kw"
:
keyword
as
Any
]
]
citySearch
(
dict
,
success
:
{
(
data
)
in
citySearch
(
dict
,
success
:
{
(
data
)
in
let
model
=
data
as!
citySearchModel
let
model
=
data
as!
citySearchModel
self
.
searchAdrDatas
.
removeAll
()
self
.
searchAdrDatas
.
removeAll
()
...
@@ -520,10 +531,9 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
...
@@ -520,10 +531,9 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
})
{
(
err
)
in
})
{
(
err
)
in
}
}
}
else
{
searchList
.
isHidden
=
true
}
}
func
searchBar
(
_
searchBar
:
UISearchBar
,
textDidChange
searchText
:
String
)
{
// keyword = searchText
}
}
func
searchBarShouldBeginEditing
(
_
searchBar
:
UISearchBar
)
->
Bool
{
func
searchBarShouldBeginEditing
(
_
searchBar
:
UISearchBar
)
->
Bool
{
...
...
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