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
ce4779c0
Commit
ce4779c0
authored
Aug 12, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复回到中心点bug.
parent
b7c968a0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
75 additions
and
65 deletions
+75
-65
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Model/LalamoveInterface/LalamoveModel.swift
...inessPlatform/Model/LalamoveInterface/LalamoveModel.swift
+3
-28
GeliBusinessPlatform/ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
...ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
+14
-10
GeliBusinessPlatform/ViewController/货拉拉/收发货地址/HuoLaLaDiZhiCell.swift
...sPlatform/ViewController/货拉拉/收发货地址/HuoLaLaDiZhiCell.swift
+3
-3
GeliBusinessPlatform/ViewController/货拉拉/收发货地址/ToAndFormSelectViewController.swift
...wController/货拉拉/收发货地址/ToAndFormSelectViewController.swift
+48
-24
GeliBusinessPlatform/ViewController/货拉拉/收发货地址/ToAndFormSelectViewController.xib
...iewController/货拉拉/收发货地址/ToAndFormSelectViewController.xib
+7
-0
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
ce4779c0
No preview for this file type
GeliBusinessPlatform/Model/LalamoveInterface/LalamoveModel.swift
View file @
ce4779c0
...
...
@@ -364,7 +364,7 @@ class citySearchDataPoiChildrenModel: Mappable {
class
shopsAuthListModel
:
Mappable
{
var
code
:
Int
?
var
message
:
String
?
var
data
:
shopsAuthListDataModel
?
var
data
:
Int
?
required
init
?(
map
:
Map
)
{
...
...
@@ -376,31 +376,6 @@ class shopsAuthListModel: Mappable {
}
}
class
shopsAuthListDataModel
:
Mappable
{
var
msg
:
String
?
var
data
:
shopsAuthListDataDetailModel
?
//订单号
var
ret
:
Int
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
msg
<-
map
[
"msg"
]
data
<-
map
[
"data"
]
ret
<-
map
[
"ret"
]
}
}
class
shopsAuthListDataDetailModel
:
Mappable
{
var
order_display_id
:
Int
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
order_display_id
<-
map
[
"order_display_id"
]
}
}
//MARK: - 查看收发货历史
class
getSearchLogListModel
:
Mappable
{
var
code
:
Int
?
...
...
@@ -787,11 +762,11 @@ class orderDetailItemAddrInfoArrDataModel: Mappable { //订单地址信息
class
poiDataModel
:
Mappable
{
var
district
:
String
?
var
location
:
citySearchDataPoiLocationModel
?
var
location
:
String
?
var
city_id
:
Int
?
var
city
:
String
?
var
address
:
String
?
var
wgs84_location
:
citySearchDataPoiLocationModel
?
var
wgs84_location
:
String
?
var
name
:
String
?
required
init
?(
map
:
Map
)
{
...
...
GeliBusinessPlatform/ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
View file @
ce4779c0
...
...
@@ -143,6 +143,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
for
i
in
0
..<
adrArr
.
count
{
let
item
=
adrArr
[
i
]
let
itemModel
=
item
[
"adr"
]
as!
cityListDataModel
print
(
"itemModel"
,
itemModel
.
lat_lon
?
.
lat
,
itemModel
.
lat_lon
?
.
lon
)
let
itemData
=
(
item
[
"detailAdr"
]
as!
NSString
)
.
components
(
separatedBy
:
"_"
)
...
...
@@ -158,7 +159,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
addr_info_arr
.
append
(
dict
)
}
var
s_consignee
=
""
if
(
firstDict
!
[
"shouHuoRen"
]
as!
String
)
.
count
>
0
{
s_consignee
=
firstDict
!
[
"shouHuoRen"
]
as!
String
...
...
@@ -200,12 +201,17 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
"order_sn"
:
guanlianDingStr
as
Any
,
"addr_info"
:
dataChangeString
(
sender
:
addr_info_arr
)
as
Any
]
return
shopsAuthList
(
dict1
,
success
:
{
(
data
)
in
let
model
=
data
as!
shopsAuthListModel
HUD
.
flash
(
.
success
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
let
vc
=
WaybillDetailViewController
()
vc
.
lwb_no
=
"
\(
model
.
data
!
)
"
vc
.
isYDBc
=
true
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
})
{
(
err
)
in
}
...
...
@@ -325,10 +331,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
for
item
in
model
.
data
!.
vehicle_arr
!
{
self
.
carTypesArr
.
append
(
item
)
}
if
self
.
carTypesArr
.
count
==
0
{
HUD
.
flash
(
.
label
(
"暂无可选车型"
),
delay
:
1.2
)
return
}
let
view
=
self
.
hListView
.
footerView
(
forSection
:
0
)
view
?
.
layoutIfNeeded
()
self
.
setBtnUI
(
carTypesArr
:
self
.
carTypesArr
,
view
:
self
.
topCarBtnSelectView
)
...
...
@@ -742,13 +745,14 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
else
{
hBtnViewH
.
constant
=
49
}
if
isAlready
{
for
item
in
adrDatas
{
if
item
.
name
==
selectLoc
{
city_id
=
item
.
city_id
!
}
}
extractedFunc
()
...
...
@@ -835,10 +839,11 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
self
.
locBtn
.
addTarget
(
self
,
action
:
#selector(
self.locSelect
)
,
for
:
.
touchUpInside
)
self
.
locBtn
.
setTitle
(
" "
+
(
firstPL
?
.
postalAddress
?
.
city
)
!
,
for
:
.
normal
)
self
.
selectLoc
=
(
firstPL
?
.
postalAddress
?
.
city
)
!
print
(
"abc == "
,
self
.
selectLoc
)
self
.
locBtn
.
sizeToFit
()
self
.
view
.
addSubview
(
self
.
locBtn
)
self
.
locBtn
.
snp_makeConstraints
({
(
make
)
in
make
.
right
.
equalTo
(
-
15
)
make
.
bottom
.
equalTo
(
self
.
navbar
.
snp_bottom
)
.
offset
(
-
7
)
...
...
@@ -883,6 +888,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
// locSelect()
checkLocation
()
...
...
@@ -1336,8 +1342,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
}
}
}
else
{
//MARK: - 货拉拉did select
if
indexPath
.
section
==
1
{
if
locationIsOpen
==
false
{
checkLocation
()
...
...
GeliBusinessPlatform/ViewController/货拉拉/收发货地址/HuoLaLaDiZhiCell.swift
View file @
ce4779c0
...
...
@@ -53,7 +53,7 @@ class HuoLaLaDiZhiCell: UITableViewCell {
let
shopY
=
CGFloat
(
row
)
*
(
30
+
10
)
let
btn
=
UIButton
(
frame
:
CGRect
(
x
:
shopX
,
y
:
shopY
,
width
:
w
,
height
:
30
))
btn
.
addTarget
(
self
,
action
:
#selector(
locSelect
(sender:)
)
,
for
:
.
touchUpInside
)
btn
.
addTarget
(
self
,
action
:
#selector(
abc
(sender:)
)
,
for
:
.
touchUpInside
)
btn
.
tag
=
index
btn
.
layer
.
borderColor
=
UIColor
(
named
:
"提示语字体颜色"
)?
.
cgColor
btn
.
layer
.
borderWidth
=
1
...
...
@@ -65,8 +65,8 @@ class HuoLaLaDiZhiCell: UITableViewCell {
bg
.
addSubview
(
btn
)
}
@objc
func
locSelect
(
sender
:
UIButton
){
//卓悦汇购物中心
@objc
func
abc
(
sender
:
UIButton
){
delegate
?
.
HuoLaLaDiZhiCellBtnClick
(
model
:
children
!
[
sender
.
tag
],
cityStr
:
cityStr
)
}
...
...
GeliBusinessPlatform/ViewController/货拉拉/收发货地址/ToAndFormSelectViewController.swift
View file @
ce4779c0
...
...
@@ -19,6 +19,10 @@ protocol ToAndFormSelectViewControllerDelegate {
func
ToAndFormSelectViewControllerSelectAdr
(
dict
:
Dictionary
<
String
,
Any
>
,
idx
:
Int
)
}
class
ToAndFormSelectViewController
:
BaseViewController
,
MAMapViewDelegate
,
CLLocationManagerDelegate
,
AMapSearchDelegate
,
UISearchBarDelegate
,
SearchBarViewDelegate
,
UITableViewDelegate
,
UITableViewDataSource
,
CityListViewControllerDelegate
,
HuoLaLaDiZhiCellDelegate
{
func
clearSearchAction
()
{
}
var
tempLat
:
CLLocationDegrees
=
0
var
tempLng
:
CLLocationDegrees
=
0
...
...
@@ -34,8 +38,12 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
searchList
.
isHidden
=
true
closeBtn
.
isHidden
=
true
listViewBG
.
isHidden
=
true
keyword
=
""
searchBr
.
text
=
""
IQKeyboardManager
.
shared
.
resignFirstResponder
()
}
func
HuoLaLaDiZhiCellBtnClick
(
model
:
citySearchDataPoiChildrenModel
,
cityStr
:
String
)
{
citySelectBtn
.
setTitle
(
cityStr
,
for
:
.
normal
)
...
...
@@ -48,6 +56,8 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
searchList
.
isHidden
=
true
closeBtn
.
isHidden
=
true
listViewBG
.
isHidden
=
true
keyword
=
""
searchBr
.
text
=
""
IQKeyboardManager
.
shared
.
resignFirstResponder
()
}
...
...
@@ -104,7 +114,6 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
cell
.
delegate
=
self
cell
.
cityStr
=
model
.
city
!
if
model
.
children
!=
nil
{
if
model
.
children
!.
count
==
0
{
cell
.
marginValue
.
constant
=
0
cell
.
btnViewH
.
constant
=
0
...
...
@@ -119,7 +128,6 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
let
rows
=
(
model
.
children
!.
count
+
3
-
1
)
/
3
cell
.
btnViewH
.
constant
=
CGFloat
(
rows
)
*
40
}
}
}
else
{
...
...
@@ -168,6 +176,8 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
@IBAction
func
closeAction
(
_
sender
:
Any
)
{
closeBtn
.
isHidden
=
true
listViewBG
.
isHidden
=
true
keyword
=
""
searchBr
.
text
=
""
IQKeyboardManager
.
shared
.
resignFirstResponder
()
}
...
...
@@ -213,14 +223,35 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
searchList
.
isHidden
=
true
closeBtn
.
isHidden
=
true
listViewBG
.
isHidden
=
true
keyword
=
""
searchBr
.
text
=
""
IQKeyboardManager
.
shared
.
resignFirstResponder
()
}
else
{
let
data
=
historyArr
[
indexPath
.
row
]
let
dict
=
getDicFromJSONString
(
jsonString
:
data
.
poi
!
)
let
poiData
=
poiDataModel
(
JSON
:
dict
)
citySelectBtn
.
setTitle
(
poiData
?
.
city
,
for
:
.
normal
)
let
locData
=
getDictionaryFromJSONString
(
jsonString
:
(
poiData
?
.
location
)
!
)
lat
=
locData
[
"lat"
]
as!
CLLocationDegrees
lng
=
locData
[
"lon"
]
as!
CLLocationDegrees
isMove
=
false
adrName
=
poiData
!.
name
!
detailAdr
=
poiData
!.
address
!
mapView
.
setCenter
(
CLLocationCoordinate2DMake
(
lat
,
lng
),
animated
:
false
)
searchList
.
isHidden
=
true
closeBtn
.
isHidden
=
true
listViewBG
.
isHidden
=
true
keyword
=
""
searchBr
.
text
=
""
IQKeyboardManager
.
shared
.
resignFirstResponder
()
}
}
let
searchBr
=
SearchBarView
.
init
()
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
let
searchBr
=
SearchBarView
.
init
()
navBgView
.
addSubview
(
searchBr
)
searchBr
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
equalTo
(
citySelectBtn
.
snp_right
)
.
offset
(
5
)
...
...
@@ -388,7 +419,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
var
introView
:
UIView
?
var
titleLbl
:
UILabel
?
var
contentLbl
:
UILabel
?
// var adrArr:Array<AMapPOI> = []
var
keyword
=
""
var
locName
=
""
var
adrName
:
String
=
""
...
...
@@ -404,6 +435,10 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
if
response
.
count
==
0
{
return
}
lat
=
mapView
.
centerCoordinate
.
latitude
lng
=
mapView
.
centerCoordinate
.
longitude
//解析response获取POI信息,具体解析见 Demo
// adrArr.removeAll()
// response.pois.forEach { (poi) in
...
...
@@ -457,9 +492,9 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
if
adrName
.
count
>
0
{
isMove
=
true
titleLbl
!.
text
=
adrName
str
=
detailAdr
//
isMove = true
//
titleLbl!.text = adrName
//
str = detailAdr
}
detailAdrStr
=
"
\(
city
)
_
\(
districet
)
_
\(
ad
)
_
\(
titleLbl
!.
text
!
)
"
...
...
@@ -505,6 +540,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
}
introView
?
.
snp_updateConstraints
({
(
make
)
in
make
.
centerX
.
equalTo
(
MapBgView
.
snp_centerX
)
make
.
centerY
.
equalTo
(
MapBgView
.
snp_centerY
)
.
offset
(
-
(
h
+
45
))
...
...
@@ -595,23 +631,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
}
return
nil
}
//火星坐标系 (GCJ-02)转百度坐标系 (BD-09)算法
func
bd_encrypt
(
gg_lat
:
Double
,
gg_lon
:
Double
)
->
(
bd_lat
:
Double
,
bd_lon
:
Double
)
{
let
x_pi
=
3.14159265358979
*
3000.0
/
180.0
let
x
=
gg_lon
let
y
=
gg_lat
let
z
=
sqrt
(
x
*
x
+
y
*
y
)
+
0.00002
*
sin
(
y
*
x_pi
)
let
theta
=
atan2
(
y
,
x
)
+
0.000003
*
cos
(
x
*
x_pi
)
let
bdlon
=
z
*
cos
(
theta
)
+
0.0065
let
bdlat
=
z
*
sin
(
theta
)
+
0.006
return
(
bdlat
,
bdlon
)
}
func
clearSearchAction
()
{
print
(
"清楚搜索文字"
)
}
var
searchAdrDatas
:
Array
<
citySearchDataPoiModel
>
=
[]
func
searchBarSearchButtonClicked
(
_
searchBar
:
UISearchBar
)
{
...
...
@@ -619,6 +639,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
print
(
"点击搜索进行--"
)
if
searchBar
.
text
!.
count
==
0
{
searchList
.
isHidden
=
true
backToCenterBtn
.
isHidden
=
false
}
searchBar
.
resignFirstResponder
()
...
...
@@ -628,6 +649,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
func
searchBar
(
_
searchBar
:
UISearchBar
,
textDidChange
searchText
:
String
)
{
keyword
=
searchText
if
keyword
.
count
>
0
{
backToCenterBtn
.
isHidden
=
true
searchList
.
isHidden
=
false
let
dict
=
[
"user_token"
:
UserToken
as
Any
,
"nonce_str"
:
String
.
randomStr
(
len
:
30
)
as
Any
,
...
...
@@ -642,6 +664,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
self
.
searchAdrDatas
.
append
(
item
)
}
self
.
searchList
.
isHidden
=
false
self
.
backToCenterBtn
.
isHidden
=
true
self
.
searchList
.
reloadData
()
}
})
{
(
err
)
in
...
...
@@ -649,6 +672,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
}
}
else
{
searchList
.
isHidden
=
true
backToCenterBtn
.
isHidden
=
false
}
}
...
...
GeliBusinessPlatform/ViewController/货拉拉/收发货地址/ToAndFormSelectViewController.xib
View file @
ce4779c0
...
...
@@ -273,6 +273,10 @@
</view>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"7b1-Dd-JY1"
>
<rect
key=
"frame"
x=
"0.0"
y=
"52.5"
width=
"414"
height=
"49"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<state
key=
"normal"
>
<color
key=
"titleColor"
name=
"#999999"
/>
</state>
<connections>
<action
selector=
"backToUserLocation:"
destination=
"-1"
eventType=
"touchUpInside"
id=
"fzl-eo-JNZ"
/>
</connections>
...
...
@@ -365,6 +369,9 @@
<image
name=
"dzdingwei"
width=
"14"
height=
"17"
/>
<image
name=
"fanhui"
width=
"18"
height=
"35"
/>
<image
name=
"xiala"
width=
"9"
height=
"4.5"
/>
<namedColor
name=
"#999999"
>
<color
red=
"0.60000002384185791"
green=
"0.60000002384185791"
blue=
"0.60000002384185791"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
<namedColor
name=
"app底色"
>
<color
red=
"0.94509803921568625"
green=
"0.94509803921568625"
blue=
"0.94509803921568625"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</namedColor>
...
...
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