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
9744d1fe
Commit
9744d1fe
authored
May 08, 2021
by
刘用法
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经纬度计算,接单
parent
47c6f6c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
order.js
src/common/api/order.js
+1
-1
index.vue
src/components/order/index.vue
+3
-2
index.vue
src/pages/index/index.vue
+1
-1
No files found.
src/common/api/order.js
View file @
9744d1fe
...
...
@@ -53,7 +53,7 @@ let orderApiFun = function(vm){
/**
* 接单
*/
let
orderAccept
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/accept'
,
params
);
let
orderAccept
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/accept'
,
params
,
{
'content-type'
:
'application/x-www-form-urlencoded'
}
);
/**
* 抢单
...
...
src/components/order/index.vue
View file @
9744d1fe
...
...
@@ -91,7 +91,7 @@
location
:
{
// 当前坐标
type
:
Array
,
default
()
{
return
[
116.3896
,
39.91917
]
//
经度,纬
度
return
[
116.3896
,
39.91917
]
//
纬度,经
度
}
}
},
...
...
@@ -196,7 +196,7 @@
return
this
.
orderType
==
5
},
showDistance
()
{
return
this
.
orderType
==
0
&&
this
.
orderData
.
contactAddressLatitud
&&
this
.
orderData
.
contactAddressLongitud
&&
this
.
location
[
0
]
&&
this
.
location
[
1
]
return
this
.
orderType
==
0
&&
this
.
location
.
length
>=
2
},
types
()
{
return
{
...
...
@@ -210,6 +210,7 @@
}
},
orderDistance
()
{
console
.
log
(
'orderData.contactAddressLatitud:'
,
this
.
orderData
.
contactAddressLatitud
,
'orderData.contactAddressLongitud'
,
this
.
orderData
.
contactAddressLongitud
,
'location:'
,
this
.
location
[
0
],
this
.
location
[
1
])
return
this
.
distance
(
this
.
orderData
.
contactAddressLatitud
,
this
.
orderData
.
contactAddressLongitud
,
this
.
location
[
0
],
this
.
location
[
1
])
}
},
...
...
src/pages/index/index.vue
View file @
9744d1fe
...
...
@@ -374,7 +374,7 @@
uni
.
getLocation
({
type
:
'gcj02'
,
success
:
function
(
res
)
{
self
.
location
=
[
res
.
l
ongitude
,
res
.
lat
itude
]
self
.
location
=
[
res
.
l
atitude
,
res
.
long
itude
]
},
complete
:
function
(
res
)
{
if
(
res
.
errMsg
.
indexOf
(
'auth'
)
!=
-
1
)
{
...
...
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