Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨建斌
/
dy-wx2
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
4ebea400
authored
2018-07-30 23:34:26 +0800
by
杨建斌
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add
1 parent
0da040b4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
js/service/wechatPaymentService.js
js/service/wechatPaymentService.js
View file @
4ebea40
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
);
}
}
}]);
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment