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
50a98b3e
authored
2018-09-01 15:18:34 +0800
by
ex
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
h5 2
1 parent
9f0d88d7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
js/JSBridge.js
js/controller/mainController.js
js/controller/mapController.js
js/JSBridge.js
View file @
50a98b3
...
...
@@ -111,7 +111,7 @@ if(isAndroid || isiOS) {
}
setupWebViewJavascriptBridge
(
function
(
bridge
)
{
if
(
isAndroid
)
{
appClient
=
new
AppClient
(
bridge
,
isAndroid
);
//
appClient = new AppClient(bridge, isAndroid);
}
if
(
isiOS
)
{
appClient
=
new
AppClient
(
bridge
,
isAndroid
);
...
...
js/controller/mainController.js
View file @
50a98b3
...
...
@@ -163,6 +163,7 @@ angular.module('myApp')
content
:
appClient
,
time
:
5
})
if
(
appClient
){
appClient
.
appObj
.
registerHandler
(
'postERCode'
,
function
(
data
,
responseCallback
)
{
layer
.
open
({
...
...
js/controller/mapController.js
View file @
50a98b3
...
...
@@ -297,8 +297,26 @@ angular.module('myApp')
// onSuccess(res)
// }
// });
if
(
isAndroid
){
window
.
WebViewJavascriptBridge
.
callHandler
(
'postGPS'
,
''
,
function
(
data
,
responseCallback
)
{
var
res
=
JSON
.
parse
(
data
)
layer
.
open
({
content
:
data
,
time
:
2
});
})
appClient
.
getGPS
(
'getGPS'
,
function
(
res
)
{
// layer.open({
// content: JSON.stringify(res) + 'cb',
// time: 10
// });
onSuccess
({
latitude
:
30.2741500000
,
longitude
:
120.1551500000
})
if
(
appClient
){
},
''
)
}
else
if
(
appClient
){
appClient
.
appObj
.
registerHandler
(
'postGPS'
,
function
(
data
,
responseCallback
)
{
var
res
=
JSON
.
parse
(
data
)
layer
.
open
({
...
...
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