Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
e76cc9ac
Commit
e76cc9ac
authored
May 07, 2018
by
Junling Bu
Browse files
fix[litemall-wx, litemall-wx-api]: 修复订单详情里面的支付问题。
parent
e6c90fcc
Changes
2
Hide whitespace changes
Inline
Side-by-side
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxOrderController.java
View file @
e76cc9ac
...
...
@@ -500,9 +500,6 @@ public class WxOrderController {
return
ResponseUtil
.
fail
(
403
,
"订单不能支付"
);
}
order
.
setOrderStatus
(
OrderUtil
.
STATUS_PAY
);
// 0 初始,1 预支付,2 支付成功
order
.
setPayStatus
((
short
)
1
);
orderService
.
updateById
(
order
);
return
ResponseUtil
.
ok
(
result
);
}
...
...
@@ -549,9 +546,8 @@ public class WxOrderController {
}
order
.
setPayId
(
payId
);
// 0 初始,1 预支付,2 支付成功
order
.
setPayStatus
((
short
)
2
);
order
.
setPayTime
(
LocalDateTime
.
now
());
order
.
setOrderStatus
(
OrderUtil
.
STATUS_PAY
);
orderService
.
updateById
(
order
);
return
WxPayNotifyResponse
.
success
(
"处理成功!"
);
...
...
litemall-wx/pages/ucenter/orderDetail/orderDetail.js
View file @
e76cc9ac
...
...
@@ -33,22 +33,28 @@ Page({
// “去付款”按钮点击效果
payOrder
:
function
()
{
let
that
=
this
;
util
.
request
(
api
.
Pay
Prepay
Id
,
{
util
.
request
(
api
.
Order
Prepay
,
{
orderId
:
that
.
data
.
orderId
},
'
POST
'
).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
const
payParam
=
res
.
data
;
console
.
log
(
"
支付过程开始
"
)
wx
.
requestPayment
({
'
timeStamp
'
:
payParam
.
timeStamp
,
'
nonceStr
'
:
payParam
.
nonceStr
,
'
package
'
:
payParam
.
package
,
'
package
'
:
payParam
.
package
Value
,
'
signType
'
:
payParam
.
signType
,
'
paySign
'
:
payParam
.
paySign
,
'
success
'
:
function
(
res
)
{
console
.
log
(
res
)
console
.
log
(
"
支付过程成功
"
)
util
.
redirect
(
'
/pages/ucenter/order/order
'
);
},
'
fail
'
:
function
(
res
)
{
console
.
log
(
res
)
console
.
log
(
"
支付过程失败
"
)
util
.
showErrorToast
(
'
支付失败
'
);
},
'
complete
'
:
function
(
res
)
{
console
.
log
(
"
支付过程结束
"
)
}
});
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment