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
Plain Diff
Browse Files
Authored by
毕凯
7 years ago
Commit
87e67afa3fb327e38a5d1c0a72ef1374e6d7ba87
2 parents
adb917fd
a5daa998
Merge branch 'hotfix/6.6' into 'gray'
Hotfix/6.6 See merge request
!1384
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
apps/cart/controllers/buy-now-controller.js
apps/cart/models/shopping.js
doraemon/middleware/limiter/rules/useragent.js
apps/cart/controllers/buy-now-controller.js
View file @
87e67af
...
...
@@ -454,17 +454,13 @@ class BuyNowController {
}
/**
*
输入优惠券码使用
优惠券
*
兑换
优惠券
*/
useCouponCode
(
req
,
res
,
next
)
{
co
(
function
*
()
{
let
result
=
yield
req
.
ctx
(
BuyNowModel
).
usePromotionCode
({
uid
:
req
.
user
.
uid
,
product_sku
:
req
.
body
.
product_sku
,
sku_type
:
req
.
body
.
sku_type
,
buy_number
:
req
.
body
.
buy_number
,
promotion_code
:
req
.
body
.
promotion_code
});
let
result
=
yield
req
.
ctx
(
shoppingModel
).
useCoupon
(
req
.
user
.
uid
,
req
.
body
.
couponCode
);
res
.
json
(
result
);
})().
catch
(
next
);
...
...
apps/cart/models/shopping.js
View file @
87e67af
...
...
@@ -267,7 +267,7 @@ class shoppingModel extends global.yoho.BaseModel {
}
/**
* 购物车结算--
使用
优惠券
* 购物车结算--
兑换
优惠券
* @param uid int 用户uid
* @param couponCode string 优惠券代码
* @return
...
...
doraemon/middleware/limiter/rules/useragent.js
View file @
87e67af
...
...
@@ -20,6 +20,11 @@ module.exports = (limiter, policy) => {
try
{
blacklist
=
JSON
.
parse
(
args
[
0
]);
}
catch
(
error
)
{
logger
.
error
(
error
);
}
try
{
whitelist
=
JSON
.
parse
(
args
[
1
]);
}
catch
(
error
)
{
logger
.
error
(
error
);
...
...
Please
register
or
login
to post a comment