Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
5
51business
Project
Project
Details
Activity
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
方斌
51business
Commits
4597fc7a
Commit
4597fc7a
authored
Apr 26, 2019
by
李尚科
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
1389d39b
Pipeline
#6526
passed with stage
in 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
helper.js
app/extend/helper.js
+5
-4
No files found.
app/extend/helper.js
View file @
4597fc7a
...
...
@@ -155,14 +155,15 @@ module.exports = {
},
async
getGPS
(
address
,
city
)
{
console
.
info
(
address
);
const
baidu_url
=
`https://api.map.baidu.com/geocoder/v2/`
;
const
result
=
await
this
.
send_request
(
baidu_url
,
{
address
:
address
,
output
:
'json'
,
ak
:
'3TBenWOhPygtFFazaR5kSibU'
,
city
:
city
},
{
method
:
'GET'
});
console
.
info
(
result
);
const
ret
=
result
.
data
;
if
(
ret
&&
ret
.
status
===
0
)
{
return
ret
;
if
(
ret
&&
ret
.
status
===
0
&&
ret
.
result
&&
ret
.
result
.
location
)
{
return
ret
.
result
.
location
;
}
return
false
;
return
{
lng
:
0
,
lat
:
0
}
;
},
async
check_submit_frequent
(
redis_key
,
expire
=
5
)
{
...
...
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