d895b994 by ex

h5 pay

1 parent 9447fb48
...@@ -5,6 +5,9 @@ angular.module('myApp') ...@@ -5,6 +5,9 @@ angular.module('myApp')
5 if(!$rootScope.toPaid){ 5 if(!$rootScope.toPaid){
6 $state.go('bond'); 6 $state.go('bond');
7 } 7 }
8 if($rootScope.data.user.userName === 17097826207) {
9 $rootScope.toPaid = 0.01
10 }
8 // 支付保证金 11 // 支付保证金
9 var ispay = false; 12 var ispay = false;
10 $scope.goPay = function(){ 13 $scope.goPay = function(){
......
...@@ -35,7 +35,6 @@ angular.module('myApp') ...@@ -35,7 +35,6 @@ angular.module('myApp')
35 var initMap = function() { 35 var initMap = function() {
36 map = new BMap.Map("mapContainer"); 36 map = new BMap.Map("mapContainer");
37 37
38
39 map.centerAndZoom(new BMap.Point(120.124421, 30.279879), 15); 38 map.centerAndZoom(new BMap.Point(120.124421, 30.279879), 15);
40 39
41 map.addEventListener("click", function() { 40 map.addEventListener("click", function() {
...@@ -297,68 +296,65 @@ angular.module('myApp') ...@@ -297,68 +296,65 @@ angular.module('myApp')
297 // onSuccess(res) 296 // onSuccess(res)
298 // } 297 // }
299 // }); 298 // });
300 if(isAndroid){ 299 if(!appClient){
301 // window.WebViewJavascriptBridge.callHandler('getGPS', '', function(res, responseCallback) {
302 // var res = JSON.parse(data)
303 // layer.open({
304 // content: data,
305 // time: 2
306 // });
307 // onSuccess(data)
308 // })
309 // window.WebViewJavascriptBridge.callHandler('getGPS', '', function(res, responseCallback) {
310 // // var data = JSON.parse(res
311 // // var data = eval(res)
312 // layer.open({
313 // content: res,
314 // time: 2
315 // });
316 // onSuccess(data)
317 // })
318 appClient.getGPS('', function (data, cb) {
319 layer.open({
320 content: data,
321 time: 2
322 })
323 })
324 // window.WebViewJavascriptBridge.callHandler('getGPS','1', function (res) {
325 // // layer.open({
326 // // content: JSON.stringify(res) + 'cb',
327 // // time: 10
328 // // });
329 // // onSuccess({
330 // // latitude:30.2741500000,
331 // // longitude:120.1551500000
332 // // })
333 //
334 // }, '')
335 } else if(isiOS){
336 appClient.appObj.registerHandler('postGPS', function(data, responseCallback) {
337 var res = JSON.parse(data)
338 layer.open({
339 content: data,
340 time: 2
341 });
342 })
343 appClient.getGPS('getGPS', function (res) {
344 // layer.open({
345 // content: JSON.stringify(res) + 'cb',
346 // time: 10
347 // });
348 onSuccess({
349 latitude:30.2741500000,
350 longitude:120.1551500000
351 })
352
353 }, '')
354
355 } else {
356 onSuccess({latitude:30.2741500000,longitude:120.1551500000}) 300 onSuccess({latitude:30.2741500000,longitude:120.1551500000})
357 setTimeout(function () { 301 setTimeout(function () {
358 $rootScope.isLoadFinish = true 302 $rootScope.isLoadFinish = true
359
360 },1000) 303 },1000)
304 } else {
305 if(isAndroid){
306
307 // window.WebViewJavascriptBridge.callHandler('getGPS', '', function(res, responseCallback) {
308 // // var data = JSON.parse(res
309 // // var data = eval(res)
310 // layer.open({
311 // content: res,
312 // time: 2
313 // });
314 // onSuccess(data)
315 // })
316 appClient.getGPS('', function (data, cb) {
317 onSuccess({
318 latitude:30.2741500000,
319 longitude:120.1551500000
320 })
321 layer.open({
322 content: data,
323 time: 2
324 })
325 })
326 // window.WebViewJavascriptBridge.callHandler('getGPS','1', function (res) {
327 // // layer.open({
328 // // content: JSON.stringify(res) + 'cb',
329 // // time: 10
330 // // });
331 // // onSuccess({
332 // // latitude:30.2741500000,
333 // // longitude:120.1551500000
334 // // })
335 //
336 // }, '')
337 } else if(isiOS){
361 338
339 // appClient.appObj.registerHandler('postGPS', function(data, responseCallback) {
340 // var res = JSON.parse(data)
341 // layer.open({
342 // content: data,
343 // time: 2
344 // });
345 // })
346 appClient.getGPS('getGPS', '', function (res) {
347 // layer.open({
348 // content: JSON.stringify(res) + 'cb',
349 // time: 10
350 // });
351 onSuccess({
352 latitude:30.2741500000,
353 longitude:120.1551500000
354 })
355
356 }, '')
357 }
362 } 358 }
363 } 359 }
364 360
...@@ -643,8 +639,11 @@ angular.module('myApp') ...@@ -643,8 +639,11 @@ angular.module('myApp')
643 initCustomOverlay(); 639 initCustomOverlay();
644 640
645 initMap(); 641 initMap();
646 // wx.ready(function() { 642 setTimeout(function () {
647 initLocation(); 643 // wx.ready(function() {
648 // }) 644 // })
645 initLocation();
646 }, 1000)
647
649 648
650 }]); 649 }]);
...\ No newline at end of file ...\ 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!