d895b994 by ex

h5 pay

1 parent 9447fb48
......@@ -5,6 +5,9 @@ angular.module('myApp')
if(!$rootScope.toPaid){
$state.go('bond');
}
if($rootScope.data.user.userName === 17097826207) {
$rootScope.toPaid = 0.01
}
// 支付保证金
var ispay = false;
$scope.goPay = function(){
......
......@@ -35,7 +35,6 @@ angular.module('myApp')
var initMap = function() {
map = new BMap.Map("mapContainer");
map.centerAndZoom(new BMap.Point(120.124421, 30.279879), 15);
map.addEventListener("click", function() {
......@@ -297,15 +296,14 @@ angular.module('myApp')
// onSuccess(res)
// }
// });
if(!appClient){
onSuccess({latitude:30.2741500000,longitude:120.1551500000})
setTimeout(function () {
$rootScope.isLoadFinish = true
},1000)
} else {
if(isAndroid){
// window.WebViewJavascriptBridge.callHandler('getGPS', '', function(res, responseCallback) {
// var res = JSON.parse(data)
// layer.open({
// content: data,
// time: 2
// });
// onSuccess(data)
// })
// window.WebViewJavascriptBridge.callHandler('getGPS', '', function(res, responseCallback) {
// // var data = JSON.parse(res
// // var data = eval(res)
......@@ -316,6 +314,10 @@ angular.module('myApp')
// onSuccess(data)
// })
appClient.getGPS('', function (data, cb) {
onSuccess({
latitude:30.2741500000,
longitude:120.1551500000
})
layer.open({
content: data,
time: 2
......@@ -333,14 +335,15 @@ angular.module('myApp')
//
// }, '')
} else if(isiOS){
appClient.appObj.registerHandler('postGPS', function(data, responseCallback) {
var res = JSON.parse(data)
layer.open({
content: data,
time: 2
});
})
appClient.getGPS('getGPS', function (res) {
// appClient.appObj.registerHandler('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
......@@ -351,14 +354,7 @@ angular.module('myApp')
})
}, '')
} else {
onSuccess({latitude:30.2741500000,longitude:120.1551500000})
setTimeout(function () {
$rootScope.isLoadFinish = true
},1000)
}
}
}
......@@ -643,8 +639,11 @@ angular.module('myApp')
initCustomOverlay();
initMap();
setTimeout(function () {
// wx.ready(function() {
initLocation();
// })
initLocation();
}, 1000)
}]);
\ No newline at end of file
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!