4ebea400 by 杨建斌

add

1 parent 0da040b4
angular.module('myApp.services')
.service('wechatPayment',['$http', '$q', '$rootScope',function($http, $q, $rootScope) {
.service('wechatPayment',['$http', '$q', '$rootScope','$location',function($http, $q, $rootScope,$location) {
//var host = 'http://finance.api.dingdachuxing.com/service';
var host = 'http://finance.dy.dingdatech.com/service';
......@@ -8,7 +8,7 @@ angular.module('myApp.services')
var h5alipayhost = 'http://lsz1.28ms.com/service/balance/';
console.log('search:',$location.search());
//调用微信JS api 支付
var jsApiCall = function (sign, q) {
......@@ -83,22 +83,24 @@ angular.module('myApp.services')
* 租车付款
*/
callRentPay: function (orderId, amount) {
return callUnifiedOrderApi(host + '/bill/wx/' + orderId, {
var param = Object.assign($location.search(),{
amount : amount,
body : "租车租金",
type : 101
});
return callUnifiedOrderApi(host + '/bill/wx/' + orderId, param);
},
/**
* 保证金充值
* @param amount
*/
callDepositPay : function(amount){
return callUnifiedOrderApi(host + "/bail/wx", {
var param = Object.assign($location.search(),{
amount : amount,
body : "保证金充值",
type : 101
});
return callUnifiedOrderApi(host + "/bail/wx", param);
},
/**
* 钱包充值
......@@ -106,11 +108,12 @@ angular.module('myApp.services')
*/
callBalanceRecharge : function(amount,way){
var host = (way == 100 ? h5alipayhost+ "alipay/h5" : h5wxhost+ "wx/h5");
return callUnifiedOrderApi(host, {
var param = Object.assign($location.search(),{
amount : amount,
body : "钱包充值",
type : parseInt(way)
});
return callUnifiedOrderApi(host, param);
}
}
}]);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!