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
9a5ac1b4
Commit
9a5ac1b4
authored
Aug 19, 2020
by
lujunye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化地图选择
parent
832fbb0c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
18 deletions
+28
-18
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
...erdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
...ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
+23
-16
GeliBusinessPlatform/ViewController/城市列表/CityListViewController.swift
...Platform/ViewController/城市列表/CityListViewController.swift
+4
-0
GeliBusinessPlatform/ViewController/货拉拉/收发货地址/ToAndFormSelectViewController.swift
...wController/货拉拉/收发货地址/ToAndFormSelectViewController.swift
+1
-2
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/junyelu.xcuserdatad/UserInterfaceState.xcuserstate
View file @
9a5ac1b4
No preview for this file type
GeliBusinessPlatform/ViewController/代客下单(货运)/下运单/XiaYunDanViewController.swift
View file @
9a5ac1b4
...
@@ -925,22 +925,22 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
...
@@ -925,22 +925,22 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
var
locationIsOpen
=
false
var
locationIsOpen
=
false
func
checkLocation
(){
func
checkLocation
(){
if
CLLocationManager
.
locationServicesEnabled
()
&&
CLLocationManager
.
authorizationStatus
()
==
.
authorizedAlways
||
CLLocationManager
.
authorizationStatus
()
==
.
authorizedWhenInUse
{
//
if CLLocationManager.locationServicesEnabled() && CLLocationManager.authorizationStatus() == .authorizedAlways || CLLocationManager.authorizationStatus() == .authorizedWhenInUse{
locationIsOpen
=
true
locationIsOpen
=
true
}
else
if
CLLocationManager
.
authorizationStatus
()
==
.
denied
{
//
}else if CLLocationManager.authorizationStatus() == .denied {
let
aleat
=
UIAlertController
(
title
:
"打开定位开关"
,
message
:
"定位服务未开启,请进入系统设置>隐私>定位服务中打开开关,并允许商户端使用定位服务"
,
preferredStyle
:
.
alert
)
//
let aleat = UIAlertController(title: "打开定位开关", message:"定位服务未开启,请进入系统设置>隐私>定位服务中打开开关,并允许商户端使用定位服务", preferredStyle: .alert)
let
tempAction
=
UIAlertAction
(
title
:
"取消"
,
style
:
.
cancel
)
{
(
action
)
in
//
let tempAction = UIAlertAction(title: "取消", style: .cancel) { (action) in
}
//
}
let
callAction
=
UIAlertAction
(
title
:
"立即设置"
,
style
:
.
default
)
{
(
action
)
in
//
let callAction = UIAlertAction(title: "立即设置", style: .default) { (action) in
let
url
=
NSURL
.
init
(
string
:
UIApplication
.
openSettingsURLString
)
//
let url = NSURL.init(string: UIApplication.openSettingsURLString)
if
(
UIApplication
.
shared
.
canOpenURL
(
url
!
as
URL
))
{
//
if(UIApplication.shared.canOpenURL(url! as URL)) {
UIApplication
.
shared
.
openURL
(
url
!
as
URL
)
//
UIApplication.shared.openURL(url! as URL)
}
//
}
}
//
}
aleat
.
addAction
(
tempAction
)
//
aleat.addAction(tempAction)
aleat
.
addAction
(
callAction
)
//
aleat.addAction(callAction)
self
.
present
(
aleat
,
animated
:
true
,
completion
:
nil
)
//
self.present(aleat, animated: true, completion: nil)
}
//
}
}
}
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
...
@@ -1442,7 +1442,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
...
@@ -1442,7 +1442,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
vc
.
idx
=
indexPath
.
row
vc
.
idx
=
indexPath
.
row
vc
.
adrDatasArr
=
self
.
adrDatas
vc
.
adrDatasArr
=
self
.
adrDatas
vc
.
delegate
=
self
vc
.
delegate
=
self
if
self
.
loc
!=
nil
{
vc
.
lat
=
self
.
loc
.
lat_lon
?
.
lat
as!
CLLocationDegrees
vc
.
lng
=
self
.
loc
.
lat_lon
?
.
lon
as!
CLLocationDegrees
}
if
self
.
adrArr
.
count
>
indexPath
.
row
{
if
self
.
adrArr
.
count
>
indexPath
.
row
{
let
dict
=
self
.
adrArr
[
indexPath
.
row
]
as!
NSDictionary
let
dict
=
self
.
adrArr
[
indexPath
.
row
]
as!
NSDictionary
...
@@ -1467,6 +1470,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
...
@@ -1467,6 +1470,10 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
vc
.
idx
=
indexPath
.
row
vc
.
idx
=
indexPath
.
row
vc
.
adrDatasArr
=
adrDatas
vc
.
adrDatasArr
=
adrDatas
vc
.
delegate
=
self
vc
.
delegate
=
self
if
self
.
loc
!=
nil
{
vc
.
lat
=
self
.
loc
.
lat_lon
?
.
lat
as!
CLLocationDegrees
vc
.
lng
=
self
.
loc
.
lat_lon
?
.
lon
as!
CLLocationDegrees
}
if
adrArr
.
count
>
indexPath
.
row
{
if
adrArr
.
count
>
indexPath
.
row
{
let
dict
=
adrArr
[
indexPath
.
row
]
as!
NSDictionary
let
dict
=
adrArr
[
indexPath
.
row
]
as!
NSDictionary
...
...
GeliBusinessPlatform/ViewController/城市列表/CityListViewController.swift
View file @
9a5ac1b4
...
@@ -172,6 +172,10 @@ class CityListViewController: BaseViewController ,UITableViewDelegate,UITableVie
...
@@ -172,6 +172,10 @@ class CityListViewController: BaseViewController ,UITableViewDelegate,UITableVie
}
}
@IBAction
func
back
(
_
sender
:
Any
)
{
@IBAction
func
back
(
_
sender
:
Any
)
{
if
locLbl
.
text
==
"未定位"
{
HUD
.
flash
(
.
label
(
"请选择城市"
),
delay
:
1.2
)
return
}
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
...
...
GeliBusinessPlatform/ViewController/货拉拉/收发货地址/ToAndFormSelectViewController.swift
View file @
9a5ac1b4
...
@@ -90,7 +90,6 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
...
@@ -90,7 +90,6 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
lat
=
location
.
latitude
as!
CLLocationDegrees
lat
=
location
.
latitude
as!
CLLocationDegrees
lng
=
location
.
longitude
as!
CLLocationDegrees
lng
=
location
.
longitude
as!
CLLocationDegrees
mapView
.
setCenter
(
location
,
animated
:
false
)
mapView
.
setCenter
(
location
,
animated
:
false
)
}
}
...
@@ -100,7 +99,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
...
@@ -100,7 +99,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
let
vc
=
CityListViewController
()
let
vc
=
CityListViewController
()
vc
.
adrDatas
=
adrDatasArr
!
vc
.
adrDatas
=
adrDatasArr
!
vc
.
locatStr
=
"未定位"
vc
.
locatStr
=
"未定位"
if
cityName
.
length
!=
0
||
cityName
!=
nil
{
if
cityName
.
length
!=
0
{
vc
.
locatStr
=
cityName
as
String
vc
.
locatStr
=
cityName
as
String
}
}
vc
.
delegate
=
self
vc
.
delegate
=
self
...
...
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