50a98b3e by ex

h5 2

1 parent 9f0d88d7
......@@ -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);
......
......@@ -163,6 +163,7 @@ angular.module('myApp')
content: appClient,
time: 5
})
if(appClient){
appClient.appObj.registerHandler('postERCode', function(data, responseCallback) {
layer.open({
......
......@@ -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({
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!