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
f1875c7f
Commit
f1875c7f
authored
Aug 14, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整地图
parent
8beca19e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
18 deletions
+55
-18
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
...ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
+21
-9
GeliBusinessPlatform/ViewController/地图/SJMapViewController.swift
...inessPlatform/ViewController/地图/SJMapViewController.swift
+15
-3
GeliBusinessPlatform/ViewController/货拉拉/收发货地址/ToAndFormSelectViewController.swift
...wController/货拉拉/收发货地址/ToAndFormSelectViewController.swift
+7
-5
GeliBusinessPlatform/ViewController/货拉拉/运单详情/cell/HLLTopCell.swift
...essPlatform/ViewController/货拉拉/运单详情/cell/HLLTopCell.swift
+12
-1
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
f1875c7f
No preview for this file type
GeliBusinessPlatform/ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
View file @
f1875c7f
...
...
@@ -284,6 +284,8 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
var
carModel
:
cityCartDataModel
?
fileprivate
func
extractedFunc
()
{
HUD
.
flash
(
.
progress
)
cityCart
([
"user_token"
:
UserToken
as
Any
,
"nonce_str"
:
String
.
randomStr
(
len
:
30
)
as
Any
,
"city_id"
:
city_id
as
Any
],
success
:
{
(
data
)
in
...
...
@@ -296,8 +298,13 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
if
self
.
carTypesArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"暂无车型可供选择"
),
delay
:
1.2
)
return
}
let
cell
=
self
.
hListView
.
cellForRow
(
at
:
IndexPath
(
row
:
0
,
section
:
0
))
as!
HLLTopCell
cell
.
idx
=
0
cell
.
scrollView
?
.
setContentOffset
(
CGPoint
(
x
:
0
,
y
:
0
),
animated
:
false
)
cell
.
tjLbl
.
text
=
"--"
cell
.
sizeLbl
.
text
=
"--"
cell
.
weightLbl
.
text
=
"--"
let
view
=
self
.
hListView
.
footerView
(
forSection
:
0
)
view
?
.
layoutIfNeeded
()
self
.
setBtnUI
(
carTypesArr
:
self
.
carTypesArr
,
view
:
self
.
topCarBtnSelectView
)
...
...
@@ -422,10 +429,9 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
make
.
height
.
equalTo
(
30
)
make
.
width
.
equalTo
(
self
.
locBtn
.
bounds
.
size
.
width
)
})
print
(
"abc == "
,
adrArr
.
count
)
if
adrArr
.
count
==
0
{
city_id
=
loc
.
city_id
!
print
(
"abc == "
)
extractedFunc
()
return
}
...
...
@@ -734,7 +740,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
let
model
=
data
as!
cityListModel
self
.
adrDatas
.
removeAll
()
for
item
in
model
.
data
!
{
if
self
.
se
lectLoc
.
contains
(
"
\(
item
.
name
!
)
"
)
||
self
.
selectLoc
.
localizedLowercase
.
contains
(
"
\(
item
.
name_en
!
)
"
)
{
if
self
.
se
tCityId
(
name1
:
item
.
name
!
,
name2
:
item
.
name_en
!
)
{
self
.
loc
=
item
}
self
.
adrDatas
.
append
(
item
)
...
...
@@ -764,7 +770,13 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
}
func
setCityId
(
name1
:
String
,
name2
:
String
)
->
Bool
{
if
selectLoc
.
contains
(
name1
)
||
selectLoc
.
localizedLowercase
.
contains
(
name2
){
return
true
}
else
{
return
false
}
}
func
getUICarList
(){
rightBtn
.
isSelected
=
true
leftBtn
.
isSelected
=
false
...
...
@@ -773,7 +785,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
locBtn
.
isUserInteractionEnabled
=
true
for
item
in
adrDatas
{
if
se
lectLoc
.
contains
(
"
\(
item
.
name
!
)
"
)
||
selectLoc
.
localizedLowercase
.
contains
(
"
\(
item
.
name_en
!
)
"
){
if
se
tCityId
(
name1
:
item
.
name
!
,
name2
:
item
.
name_en
!
){
city_id
=
item
.
city_id
!
}
}
...
...
@@ -803,7 +815,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
self
.
adrDatas
.
removeAll
()
for
item
in
model
.
data
!
{
if
self
.
se
lectLoc
.
contains
(
"
\(
item
.
name
!
)
"
)
||
self
.
selectLoc
.
localizedLowercase
.
contains
(
"
\(
item
.
name_en
!
)
"
)
{
if
self
.
se
tCityId
(
name1
:
item
.
name
!
,
name2
:
item
.
name_en
!
)
{
self
.
loc
=
item
}
self
.
adrDatas
.
append
(
item
)
...
...
@@ -1199,7 +1211,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
self
.
adrDatas
.
removeAll
()
for
item
in
model
.
data
!
{
if
self
.
se
lectLoc
.
contains
(
"
\(
item
.
name
!
)
"
)
||
self
.
selectLoc
.
localizedLowercase
.
contains
(
"
\(
item
.
name_en
!
)
"
)
{
if
self
.
se
tCityId
(
name1
:
item
.
name
!
,
name2
:
item
.
name_en
!
)
{
self
.
loc
=
item
}
self
.
adrDatas
.
append
(
item
)
...
...
@@ -1368,7 +1380,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
self
.
adrDatas
.
removeAll
()
for
item
in
model
.
data
!
{
if
self
.
se
lectLoc
.
contains
(
"
\(
item
.
name
!
)
"
)
||
self
.
selectLoc
.
localizedLowercase
.
contains
(
"
\(
item
.
name_en
!
)
"
)
{
if
self
.
se
tCityId
(
name1
:
item
.
name
!
,
name2
:
item
.
name_en
!
)
{
self
.
loc
=
item
}
self
.
adrDatas
.
append
(
item
)
...
...
GeliBusinessPlatform/ViewController/地图/SJMapViewController.swift
View file @
f1875c7f
...
...
@@ -13,6 +13,8 @@ import MAMapKit
import
AMapSearchKit
import
LGButton
import
IQKeyboardManagerSwift
protocol
SJMapViewControllerDelegate
{
func
SJMapViewControllerSelectArd
(
adr
:
String
)
}
...
...
@@ -47,7 +49,10 @@ class SJMapViewController: UIViewController,AMapLocationManagerDelegate,MAMapVie
let
location
=
locations
.
last
lat
=
location
?
.
coordinate
.
latitude
as!
CLLocationDegrees
lng
=
location
?
.
coordinate
.
longitude
as!
CLLocationDegrees
initMapView
(
lat
:
lat
,
lng
:
lng
)
let
coo
=
JZLocationConverter
.
wgs84
(
toGcj02
:
CLLocationCoordinate2D
(
latitude
:
lat
,
longitude
:
lng
))
initMapView
(
lat
:
coo
.
latitude
,
lng
:
coo
.
longitude
)
initSearch
()
initUI
()
}
...
...
@@ -277,7 +282,7 @@ class SJMapViewController: UIViewController,AMapLocationManagerDelegate,MAMapVie
searchBr
.
delegate
=
self
searchBr
.
delegateL
=
self
}
let
locationM
=
AMapLocationManager
()
func
initMapView
(
lat
:
CLLocationDegrees
,
lng
:
CLLocationDegrees
)
{
let
btmView
=
UIView
()
self
.
view
.
addSubview
(
btmView
)
...
...
@@ -287,6 +292,11 @@ class SJMapViewController: UIViewController,AMapLocationManagerDelegate,MAMapVie
}
initBtmView
(
view
:
btmView
)
// locationM.desiredAccuracy = kCLLocationAccuracyBest
// locationM.locationTimeout = 2
// locationM.reGeocodeTimeout = 2
AMapServices
.
shared
()
.
enableHTTPS
=
true
mapView
=
MAMapView
()
mapView
.
delegate
=
self
...
...
@@ -311,7 +321,9 @@ class SJMapViewController: UIViewController,AMapLocationManagerDelegate,MAMapVie
make
.
bottom
.
equalTo
(
btmView
.
snp_top
)
.
offset
(
-
13.5
)
}
}
// deinit {
// locationM.stopUpdatingLocation()
// }
func
initSearch
()
{
search
=
AMapSearchAPI
()
search
.
delegate
=
self
...
...
GeliBusinessPlatform/ViewController/货拉拉/收发货地址/ToAndFormSelectViewController.swift
View file @
f1875c7f
...
...
@@ -337,13 +337,15 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
func
locationManager
(
_
manager
:
CLLocationManager
,
didUpdateLocations
locations
:
[
CLLocation
])
{
manger
.
stopUpdatingLocation
()
let
location
=
locations
.
last
let
coo
=
JZLocationConverter
.
wgs84
(
toGcj02
:
CLLocationCoordinate2D
(
latitude
:
(
location
?
.
coordinate
.
latitude
)
!
,
longitude
:
(
location
?
.
coordinate
.
longitude
)
!
))
if
lat
==
0
&&
lng
==
0
{
lat
=
location
?
.
coordinate
.
latitude
as!
CLLocationDegrees
lng
=
location
?
.
coordinate
.
longitude
as!
CLLocationDegrees
mapView
.
centerCoordinate
=
CLLocationCoordinate2DMake
((
lat
),(
lng
))
lat
=
coo
.
latitude
lng
=
coo
.
longitude
mapView
.
centerCoordinate
=
CLLocationCoordinate2DMake
(
lat
,
lng
)
}
tempLat
=
location
?
.
coordinate
.
latitude
as!
CLLocationDegrees
tempLng
=
location
?
.
coordinate
.
longitude
as!
CLLocationDegrees
tempLat
=
coo
.
latitude
tempLng
=
coo
.
longitude
}
func
setMapCenter
(
lat
:
CLLocationDegrees
,
lng
:
CLLocationDegrees
)
{
...
...
GeliBusinessPlatform/ViewController/货拉拉/运单详情/cell/HLLTopCell.swift
View file @
f1875c7f
...
...
@@ -59,7 +59,7 @@ class HLLTopCell: UITableViewCell,UIScrollViewDelegate {
@objc
func
otherClick
(
_
sender
:
UIButton
)
{
print
(
"abc"
)
}
func
scrollViewDidScroll
(
_
scrollView
:
UIScrollView
)
{
leftBtn
.
isHidden
=
false
...
...
@@ -142,7 +142,10 @@ class HLLTopCell: UITableViewCell,UIScrollViewDelegate {
let
view
=
UIView
(
frame
:
CGRect
(
x
:
CGFloat
(
i
)
*
(
scViewBg
.
bounds
.
size
.
width
),
y
:
0
,
width
:
scViewBg
.
bounds
.
size
.
width
,
height
:
scViewBg
.
bounds
.
size
.
height
))
let
model
=
datas
[
i
]
let
imgV
=
UIImageView
()
// imgV.image =
view
.
addSubview
(
imgV
)
SDWebImageDownloader
.
shared
.
downloadImage
(
with
:
URL
(
string
:
model
.
img_url_high_light
!
),
options
:
.
continueInBackground
,
progress
:
{
(
a
,
b
,
nil
)
in
})
{
(
img
,
data
,
err
,
true
)
in
imgV
.
image
=
img
...
...
@@ -154,6 +157,14 @@ class HLLTopCell: UITableViewCell,UIScrollViewDelegate {
make
.
centerX
.
equalTo
(
view
.
snp
.
centerX
)
make
.
centerY
.
equalTo
(
view
.
snp
.
centerY
)
}
}
else
{
imgV
.
image
=
UIImage
(
named
:
"lmn_tool_image"
)
imgV
.
snp
.
makeConstraints
{
(
make
)
in
make
.
width
.
equalTo
(
self
.
scViewBg
.
bounds
.
size
.
width
)
make
.
height
.
equalTo
(
self
.
scViewBg
.
bounds
.
size
.
height
)
make
.
centerX
.
equalTo
(
view
.
snp
.
centerX
)
make
.
centerY
.
equalTo
(
view
.
snp
.
centerY
)
}
}
}
scrollView
?
.
addSubview
(
view
)
...
...
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