Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
f8ec0ca4
Commit
f8ec0ca4
authored
May 15, 2021
by
郭晓清
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、签到距离计算
parent
745f7164
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
detail.vue
src/pages/order/detail.vue
+8
-3
No files found.
src/pages/order/detail.vue
View file @
f8ec0ca4
...
@@ -247,7 +247,7 @@
...
@@ -247,7 +247,7 @@
}
}
this
.
loadOrderDetail
()
this
.
loadOrderDetail
()
this
.
loadOrderRecord
()
this
.
loadOrderRecord
()
this
.
getLocation
()
//
this.getLocation()
this
.
getSignDistance
()
this
.
getSignDistance
()
},
},
onHide
()
{
onHide
()
{
...
@@ -321,6 +321,11 @@
...
@@ -321,6 +321,11 @@
},
},
_locationChangeFn
(
res
)
{
_locationChangeFn
(
res
)
{
console
.
log
(
'location change'
,
res
)
console
.
log
(
'location change'
,
res
)
const
dataValue
=
this
.
dataValue
||
[]
dataValue
.
push
(
res
.
longitude
)
dataValue
.
push
(
res
.
latitude
)
self
.
dataValue
=
dataValue
if
(
this
.
getDistance
(
res
.
latitude
,
res
.
longitude
)
>
this
.
signDistance
){
if
(
this
.
getDistance
(
res
.
latitude
,
res
.
longitude
)
>
this
.
signDistance
){
// 计算签到距离
// 计算签到距离
this
.
btnClass
=
"isGan-btn"
this
.
btnClass
=
"isGan-btn"
...
@@ -599,7 +604,7 @@
...
@@ -599,7 +604,7 @@
}
else
{
}
else
{
this
.
closeLocationChange
()
this
.
closeLocationChange
()
}
}
if
(
this
.
getDistance
(
this
.
order
.
contactAddressLatitud
,
this
.
order
.
contactAddressLongitud
)
>
this
.
signDistance
){
if
(
this
.
getDistance
(
)
>
this
.
signDistance
){
this
.
commonToast
(
'签到失败,请点击异常签到处理或联系客服'
,
'error'
)
this
.
commonToast
(
'签到失败,请点击异常签到处理或联系客服'
,
'error'
)
return
return
}
}
...
@@ -727,7 +732,7 @@
...
@@ -727,7 +732,7 @@
});
});
},
},
getDistance
(
Latitud
,
Longitud
){
getDistance
(
Latitud
,
Longitud
){
return
this
.
distance
(
Latitud
,
Longitud
,
this
.
dataValue
[
1
],
this
.
dataValue
[
0
])
return
this
.
distance
(
this
.
order
.
contactAddressLatitud
,
this
.
order
.
contactAddress
Longitud
,
this
.
dataValue
[
1
],
this
.
dataValue
[
0
])
},
},
/**
/**
* echo distance(116.3896,39.91917,116.3940,39.91726);
* echo distance(116.3896,39.91917,116.3940,39.91726);
...
...
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