GPS
Showing
2 changed files
with
34 additions
and
13 deletions
| ... | @@ -167,11 +167,40 @@ angular.module('myApp') | ... | @@ -167,11 +167,40 @@ angular.module('myApp') |
| 167 | }); | 167 | }); |
| 168 | 168 | ||
| 169 | } else { | 169 | } else { |
| 170 | appClient.getERCode('', function (data, cb) { | 170 | appClient.getERCode('', function (str, cb) { |
| 171 | dingdaService.verifyScanCode(str).success(function(data , status){ | ||
| 172 | // alert(JSON.stringify(data)) | ||
| 173 | if(data.meta.code == 200) { | ||
| 174 | if(data.data.orderDetail.id) { | ||
| 175 | |||
| 171 | layer.open({ | 176 | layer.open({ |
| 172 | content: data, | 177 | content: "租车成功,订单号为:" + data.data.orderDetail.id, |
| 173 | time: 2 | 178 | time:2 |
| 174 | }) | 179 | }); |
| 180 | // alert("租车成功,订单号为:" + data.data.orderDetail.id); | ||
| 181 | $rootScope.isRendBike = true; | ||
| 182 | |||
| 183 | $state.go('rentDetail', {}, {reload: true}); | ||
| 184 | |||
| 185 | } | ||
| 186 | } else if(data.meta.code == 202) { | ||
| 187 | layer.open({ | ||
| 188 | content: data.meta.message, | ||
| 189 | time:2 | ||
| 190 | }); | ||
| 191 | $state.go('bond', {longitude: $rootScope.currentPoint.longitude , latitude: $rootScope.currentPoint.latitude }); | ||
| 192 | } else { | ||
| 193 | layer.open({ | ||
| 194 | content: data.meta.message, | ||
| 195 | time:2 | ||
| 196 | }); | ||
| 197 | } | ||
| 198 | }).error(function(data , status){ | ||
| 199 | layer.open({ | ||
| 200 | content: "租车失败" + JSON.stringify(data), | ||
| 201 | time:2 | ||
| 202 | }); | ||
| 203 | }); | ||
| 175 | }) | 204 | }) |
| 176 | // window.WebViewJavascriptBridge.registerHandler('postERCode', function(data, responseCallback) { | 205 | // window.WebViewJavascriptBridge.registerHandler('postERCode', function(data, responseCallback) { |
| 177 | // layer.open({ | 206 | // layer.open({ | ... | ... |
| ... | @@ -315,11 +315,7 @@ angular.module('myApp') | ... | @@ -315,11 +315,7 @@ angular.module('myApp') |
| 315 | latitude = arr[0].split(':')[1] | 315 | latitude = arr[0].split(':')[1] |
| 316 | longitude = arr[1].split(':')[1] | 316 | longitude = arr[1].split(':')[1] |
| 317 | } | 317 | } |
| 318 | layer.open({ | 318 | |
| 319 | content: latitude, | ||
| 320 | time: 5 | ||
| 321 | }) | ||
| 322 | // return | ||
| 323 | onSuccess({ | 319 | onSuccess({ |
| 324 | latitude: latitude, | 320 | latitude: latitude, |
| 325 | longitude: longitude | 321 | longitude: longitude |
| ... | @@ -375,10 +371,6 @@ angular.module('myApp') | ... | @@ -375,10 +371,6 @@ angular.module('myApp') |
| 375 | 371 | ||
| 376 | 372 | ||
| 377 | function onSuccess(position){ | 373 | function onSuccess(position){ |
| 378 | layer.open({ | ||
| 379 | content: Object.keys(position), | ||
| 380 | time: 5 | ||
| 381 | }) | ||
| 382 | // layer.open({ | 374 | // layer.open({ |
| 383 | // content: JSON.stringify(position)+',longitude:'+ position.longitude+',latitude:' + position.latitude, | 375 | // content: JSON.stringify(position)+',longitude:'+ position.longitude+',latitude:' + position.latitude, |
| 384 | // time: 5 | 376 | // time: 5 | ... | ... |
-
Please register or sign in to post a comment