dcdc695d by ex

GPS

1 parent 7f33dc07
......@@ -167,11 +167,40 @@ angular.module('myApp')
});
} else {
appClient.getERCode('', function (data, cb) {
appClient.getERCode('', function (str, cb) {
dingdaService.verifyScanCode(str).success(function(data , status){
// alert(JSON.stringify(data))
if(data.meta.code == 200) {
if(data.data.orderDetail.id) {
layer.open({
content: data,
time: 2
})
content: "租车成功,订单号为:" + data.data.orderDetail.id,
time:2
});
// alert("租车成功,订单号为:" + data.data.orderDetail.id);
$rootScope.isRendBike = true;
$state.go('rentDetail', {}, {reload: true});
}
} else if(data.meta.code == 202) {
layer.open({
content: data.meta.message,
time:2
});
$state.go('bond', {longitude: $rootScope.currentPoint.longitude , latitude: $rootScope.currentPoint.latitude });
} else {
layer.open({
content: data.meta.message,
time:2
});
}
}).error(function(data , status){
layer.open({
content: "租车失败" + JSON.stringify(data),
time:2
});
});
})
// window.WebViewJavascriptBridge.registerHandler('postERCode', function(data, responseCallback) {
// layer.open({
......
......@@ -315,11 +315,7 @@ angular.module('myApp')
latitude = arr[0].split(':')[1]
longitude = arr[1].split(':')[1]
}
layer.open({
content: latitude,
time: 5
})
// return
onSuccess({
latitude: latitude,
longitude: longitude
......@@ -375,10 +371,6 @@ angular.module('myApp')
function onSuccess(position){
layer.open({
content: Object.keys(position),
time: 5
})
// layer.open({
// content: JSON.stringify(position)+',longitude:'+ position.longitude+',latitude:' + position.latitude,
// time: 5
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!