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
6b4352fa
authored
2018-09-01 16:05:54 +0800
by
ex
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
h5
1 parent
ec50b287
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
js/JSBridge.js
js/controller/mainController.js
js/JSBridge.js
View file @
6b4352f
...
...
@@ -5,7 +5,6 @@ function AppClient(appObj, isAndroid) {
this
.
appObj
=
appObj
;
this
.
isAndroid
=
isAndroid
;
};
function
isJson
(
str
)
{
try
{
JSON
.
parse
(
str
);
...
...
@@ -81,10 +80,10 @@ AppClient.prototype.getGPS = function (callbackName, callback, jsonStr) {
// content: window.android,
// time: 2
// })
layer
.
open
({
content
:
'hah'
,
time
:
2
})
//
layer.open({
//
content: 'hah' ,
//
time: 2
//
})
// bridge.registerHandler('postGPS', function(data, responseCallback) {
// log('ObjC called testJavascriptHandler with', data)
// var responseData = { 'Javascript Says':'Right back atcha!' }
...
...
js/controller/mainController.js
View file @
6b4352f
...
...
@@ -172,7 +172,7 @@ angular.module('myApp')
// // responseCallback(responseData)
// })
window
.
WebViewJavascriptBridge
.
callHandler
(
'getGPS'
,
''
,
function
(
res
,
responseCallback
)
{
var
res
=
JSON
.
parse
(
data
)
var
data
=
JSON
.
parse
(
res
)
layer
.
open
({
content
:
data
,
time
:
2
...
...
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