ecc609ba by ex

修改支付地址

1 parent 368b7c2c
1 <div ng-controller="mainController"> 1 <div ng-controller="mainController">
2 <div id="mapContainer" class="mapContainer" ng-controller="mapController"></div> 2 <div id="mapContainer" class="mapContainer" ng-controller="mapController"></div>
3 <div id="sliderMenu" class="sliderMenu" style="display: none;" 3 <div id="sliderMenu" class="sliderMenu" style="display: block;"
4 ng-class="{true: 'menuOpen', false: 'menuClose'}[$root.openMenu]"> 4 ng-class="{true: 'menuOpen', false: 'menuClose'}[$root.openMenu]">
5 5
6 <img src="images/slideMenuBackground.png"/> 6 <img src="images/slideMenuBackground.png"/>
......
...@@ -40,10 +40,29 @@ AppClient.prototype.getERCode = function (callbackName, callback, jsonStr) { ...@@ -40,10 +40,29 @@ AppClient.prototype.getERCode = function (callbackName, callback, jsonStr) {
40 this.appObj.callHandler("getERCode", iOSData, callback); 40 this.appObj.callHandler("getERCode", iOSData, callback);
41 } 41 }
42 }; 42 };
43 window.getIOSERCode = function (_params) { 43 AppClient.prototype.getGPS = function (callbackName, callback, jsonStr) {
44 var dataParams = "";
45 if(isJson(jsonStr)){
46 dataParams = JSON.parse(jsonStr);
47 }
48 var iOSData = {
49 from: 'H5',
50 params: dataParams
51 };
52 if (this.isAndroid) {
53 this.appObj.getGPS('H5', jsonStr);
54 } else {
55 this.appObj.callHandler("getGPS", iOSData, callback);
56 }
57 };
58 window.getERCode = function (_params) {
44 alert(JSON.parse(_params)) 59 alert(JSON.parse(_params))
45 } 60 }
46 window.get 61 window.getGPS = function (params) {
62 alert(JSON.parse(params))
63 }
64
65
47 if(window.android) { 66 if(window.android) {
48 appClient = new AppClient(window.android, true); 67 appClient = new AppClient(window.android, true);
49 // 此处可以调用一些init的方法 68 // 此处可以调用一些init的方法
......
...@@ -2,7 +2,7 @@ angular.module('myApp') ...@@ -2,7 +2,7 @@ angular.module('myApp')
2 .controller('mainController',['$scope','$rootScope','dingdaService','$state','globalService',function($scope,$rootScope,dingdaService,$state,globalService){ 2 .controller('mainController',['$scope','$rootScope','dingdaService','$state','globalService',function($scope,$rootScope,dingdaService,$state,globalService){
3 3
4 $rootScope.isRendBike = false; 4 $rootScope.isRendBike = false;
5 $rootScope.isLoadFinish = false; 5 $rootScope.isLoadFinish = true;
6 $scope.unfinishOrder = {}; 6 $scope.unfinishOrder = {};
7 var init = function() { 7 var init = function() {
8 // globalService.init(); 8 // globalService.init();
...@@ -114,7 +114,7 @@ angular.module('myApp') ...@@ -114,7 +114,7 @@ angular.module('myApp')
114 // } 114 // }
115 $rootScope.openScan = false; 115 $rootScope.openScan = false;
116 console.log(appClient) 116 console.log(appClient)
117 appClient.getERCode('getIOSERCode', function (res) { 117 appClient.getERCode('getERCode', function (res) {
118 alert(JSON.parse(res)) 118 alert(JSON.parse(res))
119 }, '') 119 }, '')
120 // wx.scanQRCode({ 120 // wx.scanQRCode({
......
...@@ -34,6 +34,8 @@ angular.module('myApp') ...@@ -34,6 +34,8 @@ angular.module('myApp')
34 34
35 var initMap = function() { 35 var initMap = function() {
36 map = new BMap.Map("mapContainer"); 36 map = new BMap.Map("mapContainer");
37
38
37 map.centerAndZoom(new BMap.Point(120.124421, 30.279879), 15); 39 map.centerAndZoom(new BMap.Point(120.124421, 30.279879), 15);
38 40
39 map.addEventListener("click", function() { 41 map.addEventListener("click", function() {
...@@ -295,8 +297,15 @@ angular.module('myApp') ...@@ -295,8 +297,15 @@ angular.module('myApp')
295 // onSuccess(res) 297 // onSuccess(res)
296 // } 298 // }
297 // }); 299 // });
300 appClient.getERCode('getGPS', function (res) {
301 alert(JSON.parse(res))
302 onSuccess({
303 latitude:30.2741500000,
304 longitude:120.1551500000
305 })
298 306
299 onSuccess({latitude:30.2741500000,longitude:120.1551500000}) 307 }, '')
308 // onSuccess({latitude:30.2741500000,longitude:120.1551500000})
300 } 309 }
301 310
302 311
...@@ -578,6 +587,7 @@ angular.module('myApp') ...@@ -578,6 +587,7 @@ angular.module('myApp')
578 // mui.init(); 587 // mui.init();
579 588
580 initCustomOverlay(); 589 initCustomOverlay();
590
581 initMap(); 591 initMap();
582 // wx.ready(function() { 592 // wx.ready(function() {
583 initLocation(); 593 initLocation();
......
...@@ -57,7 +57,7 @@ angular.module('myApp.services') ...@@ -57,7 +57,7 @@ angular.module('myApp.services')
57 } 57 }
58 58
59 var wxh5ApiCall = function (sign, q) { 59 var wxh5ApiCall = function (sign, q) {
60 console.log('sign', sign); 60 // console.log('sign', sign);
61 window.location.href = sign.mwebUrl; 61 window.location.href = sign.mwebUrl;
62 } 62 }
63 63
...@@ -97,14 +97,19 @@ angular.module('myApp.services') ...@@ -97,14 +97,19 @@ angular.module('myApp.services')
97 * 租车付款 97 * 租车付款
98 */ 98 */
99 callRentTypePay: function (orderId, amount, type) { 99 callRentTypePay: function (orderId, amount, type) {
100 var user = JSON.parse(localStorage.getItem("ls.user"))
101 if(user){
102 var token = user.token
103 }
100 104
101 switch (type) { 105 switch (type) {
102 case 100: 106 case 100:
103 var html = ' <form action="'+ host + '/bill/alipay/h5/'+ orderId 107 var html = ' <form action="'+ host + '/h5/alipay/bill/'+ orderId + '/'+ token
104 +'" method="post">' + 108 +'" method="post">' +
105 ' <input type="text" name="amount" value="'+amount+'" />' + 109 ' <input type="text" name="amount" value="'+amount+'" />' +
106 ' <input type="text" name="body" value="租车租金"/>' + 110 ' <input type="text" name="body" value="租车租金"/>' +
107 ' <input type="text" name="type" value="100" />' + 111 ' <input type="text" name="type" value="100" />' +
112 ' <input type="text" name="token" value="'+token+'" />' +
108 ' <input type="submit" id="ok">' + 113 ' <input type="submit" id="ok">' +
109 ' </input>' + 114 ' </input>' +
110 ' </form>' 115 ' </form>'
...@@ -113,7 +118,7 @@ angular.module('myApp.services') ...@@ -113,7 +118,7 @@ angular.module('myApp.services')
113 // form.querySelector('#ok').click() 118 // form.querySelector('#ok').click()
114 document.body.appendChild(form) 119 document.body.appendChild(form)
115 document.querySelector('#ok').click() 120 document.querySelector('#ok').click()
116 121 return null
117 case 101: 122 case 101:
118 var param = Object.assign($location.search(),{ 123 var param = Object.assign($location.search(),{
119 amount : amount, 124 amount : amount,
...@@ -142,14 +147,25 @@ angular.module('myApp.services') ...@@ -142,14 +147,25 @@ angular.module('myApp.services')
142 * @param amount 147 * @param amount
143 */ 148 */
144 callDepositTypePay : function(amount, type){ 149 callDepositTypePay : function(amount, type){
150 var user = JSON.parse(localStorage.getItem("ls.user"))
151 if(user){
152 var token = user.token
153 }
145 switch (type) { 154 switch (type) {
146 case 100: 155 case 100:
147 var html = ' <form action="'+ host + '/balance/alipay/h5' 156 // $http.post(host + '/bill/alipay/h5',{
148 +'" method="post">' + 157 // 'amout': amount,
158 // 'body': '保证金充值',
159 // 'type': 100,
160 // }).success(function (res) {
161 // console.log(res)
162 // })
163
164 var html = ' <form action="'+ host + '/h5/alipay/balance/'+token
165 +'" method="post">' +
149 ' <input type="text" name="amount" value="'+amount+'" />' + 166 ' <input type="text" name="amount" value="'+amount+'" />' +
150 ' <input type="text" name="body" value="保证金充值"/>' + 167 ' <input type="text" name="body" value="保证金充值"/>' +
151 ' <input type="text" name="type" value="100" />' + 168 ' <input type="text" name="type" value="100" />' +
152
153 ' <input type="submit" id="ok">\n' + 169 ' <input type="submit" id="ok">\n' +
154 ' 余额充值\n' + 170 ' 余额充值\n' +
155 ' </input>\n' + 171 ' </input>\n' +
...@@ -159,7 +175,7 @@ angular.module('myApp.services') ...@@ -159,7 +175,7 @@ angular.module('myApp.services')
159 // form.querySelector('#ok').click() 175 // form.querySelector('#ok').click()
160 document.body.appendChild(form) 176 document.body.appendChild(form)
161 document.querySelector('#ok').click() 177 document.querySelector('#ok').click()
162 178 return null
163 case 101: 179 case 101:
164 var param = Object.assign($location.search(),{ 180 var param = Object.assign($location.search(),{
165 amount : amount, 181 amount : amount,
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!