Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨建斌
/
dy-wx2
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
449137bf
authored
2018-08-25 17:47:02 +0800
by
ex
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
获取定位
1 parent
b124e651
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
12 deletions
js/controller/mainController.js
js/controller/mapController.js
js/controller/mainController.js
View file @
449137b
...
...
@@ -113,10 +113,17 @@ angular.module('myApp')
// return;
// }
$rootScope
.
openScan
=
false
;
console
.
log
(
appClient
)
appClient
.
getERCode
(
'getERCode'
,
function
(
res
)
{
alert
(
JSON
.
parse
(
res
))
},
''
)
if
(
appClient
){
appClient
.
getERCode
(
'getERCode'
,
function
(
res
)
{
alert
(
JSON
.
parse
(
res
))
},
''
)
}
else
{
layer
.
open
({
content
:
'JSBridge 初始化失败'
,
time
:
2
});
}
// wx.scanQRCode({
// needResult: 1, // 默认为1,扫描结果由微信处理,1则直接返回扫描结果,
// scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码,默认二者都有
...
...
js/controller/mapController.js
View file @
449137b
...
...
@@ -297,14 +297,17 @@ angular.module('myApp')
// onSuccess(res)
// }
// });
// appClient.getERCode('getGPS', function (res) {
// alert(JSON.parse(res))
// onSuccess({
// latitude:30.2741500000,
// longitude:120.1551500000
// })
//
// }, '')
if
(
appClient
){
appClient
.
getERCode
(
'getGPS'
,
function
(
res
)
{
alert
(
JSON
.
parse
(
res
))
onSuccess
({
latitude
:
30.2741500000
,
longitude
:
120.1551500000
})
},
''
)
}
// onSuccess({latitude:30.2741500000,longitude:120.1551500000})
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment