ecc609ba by ex

修改支付地址

1 parent 368b7c2c
<div ng-controller="mainController">
<div id="mapContainer" class="mapContainer" ng-controller="mapController"></div>
<div id="sliderMenu" class="sliderMenu" style="display: none;"
<div id="sliderMenu" class="sliderMenu" style="display: block;"
ng-class="{true: 'menuOpen', false: 'menuClose'}[$root.openMenu]">
<img src="images/slideMenuBackground.png"/>
......
......@@ -40,10 +40,29 @@ AppClient.prototype.getERCode = function (callbackName, callback, jsonStr) {
this.appObj.callHandler("getERCode", iOSData, callback);
}
};
window.getIOSERCode = function (_params) {
AppClient.prototype.getGPS = function (callbackName, callback, jsonStr) {
var dataParams = "";
if(isJson(jsonStr)){
dataParams = JSON.parse(jsonStr);
}
var iOSData = {
from: 'H5',
params: dataParams
};
if (this.isAndroid) {
this.appObj.getGPS('H5', jsonStr);
} else {
this.appObj.callHandler("getGPS", iOSData, callback);
}
};
window.getERCode = function (_params) {
alert(JSON.parse(_params))
}
window.get
window.getGPS = function (params) {
alert(JSON.parse(params))
}
if(window.android) {
appClient = new AppClient(window.android, true);
// 此处可以调用一些init的方法
......
......@@ -2,7 +2,7 @@ angular.module('myApp')
.controller('mainController',['$scope','$rootScope','dingdaService','$state','globalService',function($scope,$rootScope,dingdaService,$state,globalService){
$rootScope.isRendBike = false;
$rootScope.isLoadFinish = false;
$rootScope.isLoadFinish = true;
$scope.unfinishOrder = {};
var init = function() {
// globalService.init();
......@@ -114,7 +114,7 @@ angular.module('myApp')
// }
$rootScope.openScan = false;
console.log(appClient)
appClient.getERCode('getIOSERCode', function (res) {
appClient.getERCode('getERCode', function (res) {
alert(JSON.parse(res))
}, '')
// wx.scanQRCode({
......
......@@ -34,6 +34,8 @@ angular.module('myApp')
var initMap = function() {
map = new BMap.Map("mapContainer");
map.centerAndZoom(new BMap.Point(120.124421, 30.279879), 15);
map.addEventListener("click", function() {
......@@ -295,8 +297,15 @@ angular.module('myApp')
// onSuccess(res)
// }
// });
appClient.getERCode('getGPS', function (res) {
alert(JSON.parse(res))
onSuccess({
latitude:30.2741500000,
longitude:120.1551500000
})
onSuccess({latitude:30.2741500000,longitude:120.1551500000})
}, '')
// onSuccess({latitude:30.2741500000,longitude:120.1551500000})
}
......@@ -578,6 +587,7 @@ angular.module('myApp')
// mui.init();
initCustomOverlay();
initMap();
// wx.ready(function() {
initLocation();
......
......@@ -57,7 +57,7 @@ angular.module('myApp.services')
}
var wxh5ApiCall = function (sign, q) {
console.log('sign', sign);
// console.log('sign', sign);
window.location.href = sign.mwebUrl;
}
......@@ -97,14 +97,19 @@ angular.module('myApp.services')
* 租车付款
*/
callRentTypePay: function (orderId, amount, type) {
var user = JSON.parse(localStorage.getItem("ls.user"))
if(user){
var token = user.token
}
switch (type) {
case 100:
var html = ' <form action="'+ host + '/bill/alipay/h5/'+ orderId
var html = ' <form action="'+ host + '/h5/alipay/bill/'+ orderId + '/'+ token
+'" method="post">' +
' <input type="text" name="amount" value="'+amount+'" />' +
' <input type="text" name="body" value="租车租金"/>' +
' <input type="text" name="type" value="100" />' +
' <input type="text" name="token" value="'+token+'" />' +
' <input type="submit" id="ok">' +
' </input>' +
' </form>'
......@@ -113,7 +118,7 @@ angular.module('myApp.services')
// form.querySelector('#ok').click()
document.body.appendChild(form)
document.querySelector('#ok').click()
return null
case 101:
var param = Object.assign($location.search(),{
amount : amount,
......@@ -142,14 +147,25 @@ angular.module('myApp.services')
* @param amount
*/
callDepositTypePay : function(amount, type){
var user = JSON.parse(localStorage.getItem("ls.user"))
if(user){
var token = user.token
}
switch (type) {
case 100:
var html = ' <form action="'+ host + '/balance/alipay/h5'
// $http.post(host + '/bill/alipay/h5',{
// 'amout': amount,
// 'body': '保证金充值',
// 'type': 100,
// }).success(function (res) {
// console.log(res)
// })
var html = ' <form action="'+ host + '/h5/alipay/balance/'+token
+'" method="post">' +
' <input type="text" name="amount" value="'+amount+'" />' +
' <input type="text" name="body" value="保证金充值"/>' +
' <input type="text" name="type" value="100" />' +
' <input type="submit" id="ok">\n' +
' 余额充值\n' +
' </input>\n' +
......@@ -159,7 +175,7 @@ angular.module('myApp.services')
// form.querySelector('#ok').click()
document.body.appendChild(form)
document.querySelector('#ok').click()
return null
case 101:
var param = Object.assign($location.search(),{
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!