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,15 +296,14 @@ angular.module('myApp') ...@@ -297,15 +296,14 @@ angular.module('myApp')
297 // onSuccess(res) 296 // onSuccess(res)
298 // } 297 // }
299 // }); 298 // });
299 if(!appClient){
300 onSuccess({latitude:30.2741500000,longitude:120.1551500000})
301 setTimeout(function () {
302 $rootScope.isLoadFinish = true
303 },1000)
304 } else {
300 if(isAndroid){ 305 if(isAndroid){
301 // window.WebViewJavascriptBridge.callHandler('getGPS', '', function(res, responseCallback) { 306
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) { 307 // window.WebViewJavascriptBridge.callHandler('getGPS', '', function(res, responseCallback) {
310 // // var data = JSON.parse(res 308 // // var data = JSON.parse(res
311 // // var data = eval(res) 309 // // var data = eval(res)
...@@ -316,6 +314,10 @@ angular.module('myApp') ...@@ -316,6 +314,10 @@ angular.module('myApp')
316 // onSuccess(data) 314 // onSuccess(data)
317 // }) 315 // })
318 appClient.getGPS('', function (data, cb) { 316 appClient.getGPS('', function (data, cb) {
317 onSuccess({
318 latitude:30.2741500000,
319 longitude:120.1551500000
320 })
319 layer.open({ 321 layer.open({
320 content: data, 322 content: data,
321 time: 2 323 time: 2
...@@ -333,14 +335,15 @@ angular.module('myApp') ...@@ -333,14 +335,15 @@ angular.module('myApp')
333 // 335 //
334 // }, '') 336 // }, '')
335 } else if(isiOS){ 337 } else if(isiOS){
336 appClient.appObj.registerHandler('postGPS', function(data, responseCallback) { 338
337 var res = JSON.parse(data) 339 // appClient.appObj.registerHandler('postGPS', function(data, responseCallback) {
338 layer.open({ 340 // var res = JSON.parse(data)
339 content: data, 341 // layer.open({
340 time: 2 342 // content: data,
341 }); 343 // time: 2
342 }) 344 // });
343 appClient.getGPS('getGPS', function (res) { 345 // })
346 appClient.getGPS('getGPS', '', function (res) {
344 // layer.open({ 347 // layer.open({
345 // content: JSON.stringify(res) + 'cb', 348 // content: JSON.stringify(res) + 'cb',
346 // time: 10 349 // time: 10
...@@ -351,14 +354,7 @@ angular.module('myApp') ...@@ -351,14 +354,7 @@ angular.module('myApp')
351 }) 354 })
352 355
353 }, '') 356 }, '')
354 357 }
355 } else {
356 onSuccess({latitude:30.2741500000,longitude:120.1551500000})
357 setTimeout(function () {
358 $rootScope.isLoadFinish = true
359
360 },1000)
361
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();
642 setTimeout(function () {
646 // wx.ready(function() { 643 // wx.ready(function() {
647 initLocation();
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!