Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
郭成尧
8 years ago
Commit
ef90e2ae666ce953dcfff3be5d06d8822da13c5d
1 parent
ae371503
payzero
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
apps/cart/controllers/pay.js
apps/cart/models/pay.js
apps/cart/controllers/pay.js
View file @
ef90e2a
...
...
@@ -3,7 +3,7 @@
* @Author: Targaryen
* @Date: 2017-01-04 15:17:51
* @Last Modified by: Targaryen
* @Last Modified time: 2017-02-1
6 17:52:03
* @Last Modified time: 2017-02-1
7 09:52:57
*/
'use strict'
;
...
...
@@ -42,9 +42,15 @@ const payCenter = (req, res, next) => {
co
(
function
*
()
{
let
orderDetail
=
yield
payModel
.
payCenter
({
orderCode
:
orderCode
,
uid
:
uid
uid
:
uid
,
sessionKey
:
sessionKey
});
/* 判断订单是否已付款, 已付款跳到订单详情页 */
if
(
orderDetail
.
isPay
)
{
return
res
.
redirect
(
helpers
.
urlFormat
(
'/cart/shopping/pay/payZero'
,
{
order_code
:
orderCode
}));
}
if
(
hasWxShare
)
{
let
openId
=
req
.
cookies
[
'weixinOpenId'
+
orderCode
];
...
...
apps/cart/models/pay.js
View file @
ef90e2a
...
...
@@ -296,7 +296,8 @@ const payCenter = (params) => {
return
_getOtherDetail
({
uid
:
params
.
uid
,
orderCode
:
params
.
orderCode
orderCode
:
params
.
orderCode
,
sessionKey
:
params
.
sessionKey
}).
then
(
result
=>
{
return
_
.
get
(
result
,
'data'
,
{});
});
...
...
Please
register
or
login
to post a comment