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
cfbe0386
authored
2018-08-25 17:56:58 +0800
by
ex
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
ios
1 parent
449137bf
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
index.html
js/JSBridge.js
js/controller/mainController.js
js/controller/mapController.js
index.html
View file @
cfbe038
...
...
@@ -5,6 +5,9 @@
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"
/>
<title>
东城行
</title>
<script>
alert
(
1
)
</script>
<!--<script src="js/mui/mui.min.js"></script>-->
<!--<link href="css/mui.min.css" rel="stylesheet"/>
<link href="css/app.css" rel="stylesheet"/>
...
...
js/JSBridge.js
View file @
cfbe038
...
...
@@ -37,7 +37,7 @@ AppClient.prototype.getERCode = function (callbackName, callback, jsonStr) {
if
(
this
.
isAndroid
)
{
this
.
appObj
.
getERCode
(
'H5'
,
jsonStr
);
}
else
{
this
.
appObj
.
callHandler
(
"
ge
tERCode"
,
iOSData
,
callback
);
this
.
appObj
.
callHandler
(
"
pos
tERCode"
,
iOSData
,
callback
);
}
};
AppClient
.
prototype
.
getGPS
=
function
(
callbackName
,
callback
,
jsonStr
)
{
...
...
@@ -52,14 +52,14 @@ AppClient.prototype.getGPS = function (callbackName, callback, jsonStr) {
if
(
this
.
isAndroid
)
{
this
.
appObj
.
getGPS
(
'H5'
,
jsonStr
);
}
else
{
this
.
appObj
.
callHandler
(
"
ge
tGPS"
,
iOSData
,
callback
);
this
.
appObj
.
callHandler
(
"
pos
tGPS"
,
iOSData
,
callback
);
}
};
window
.
ge
tERCode
=
function
(
_params
)
{
alert
(
JSON
.
parse
(
_params
))
window
.
pos
tERCode
=
function
(
_params
)
{
alert
(
JSON
.
stringify
(
_params
))
}
window
.
ge
tGPS
=
function
(
params
)
{
alert
(
JSON
.
parse
(
params
))
window
.
pos
tGPS
=
function
(
params
)
{
alert
(
JSON
.
stringify
(
params
))
}
if
(
window
.
android
)
{
...
...
js/controller/mainController.js
View file @
cfbe038
...
...
@@ -114,8 +114,8 @@ angular.module('myApp')
// }
$rootScope
.
openScan
=
false
;
if
(
appClient
){
appClient
.
getERCode
(
'
ge
tERCode'
,
function
(
res
)
{
alert
(
JSON
.
parse
(
res
))
appClient
.
getERCode
(
'
pos
tERCode'
,
function
(
res
)
{
alert
(
JSON
.
stringify
(
res
))
},
''
)
}
else
{
layer
.
open
({
...
...
js/controller/mapController.js
View file @
cfbe038
...
...
@@ -298,8 +298,8 @@ angular.module('myApp')
// }
// });
if
(
appClient
){
appClient
.
getERCode
(
'
ge
tGPS'
,
function
(
res
)
{
alert
(
JSON
.
parse
(
res
))
appClient
.
getERCode
(
'
pos
tGPS'
,
function
(
res
)
{
alert
(
JSON
.
stringify
(
res
))
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