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
郭成尧
7 years ago
Commit
3f5ef333df362bdf628902b125ca8bcec5c6f116
1 parent
57d3a1c9
ensure_from
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletions
apps/cart/controllers/index.js
public/js/cart/order-ensure.js
apps/cart/controllers/index.js
View file @
3f5ef33
...
...
@@ -11,6 +11,11 @@ const headerModel = require('../../../doraemon/models/header'); // 头部model
const
cartModel
=
require
(
'../models/index'
);
// cookie 参数
const
actCkOpthn
=
{
path
:
'/cart/index'
};
/**
* [购物车首页]
*/
...
...
@@ -23,6 +28,9 @@ const index = (req, res) => {
})
};
// 标识是从普通购物车进的提交订单页面,普通购物车进入提交订单页面默认不使用优惠券
res
.
cookie
(
'ensure_from'
,
'cart'
,
actCkOpthn
);
// 唤起 APP 的路径
res
.
locals
.
appPath
=
'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.shopcart","params":{}}'
;
...
...
public/js/cart/order-ensure.js
View file @
3f5ef33
...
...
@@ -40,6 +40,11 @@ let $invoice = $('.invoice'),
const
orderEnsure
=
new
OrderEnsure
(
order
);
// cookie 参数
const
actCkOpthn
=
{
path
:
'/cart/index'
};
require
(
'common'
);
lazyLoad
();
...
...
@@ -49,10 +54,11 @@ function isLimitGood() {
}
// 来自购物车的链接默认不使用优惠券
if
(
document
.
referrer
&&
document
.
referrer
.
indexOf
(
'/cart/index/index'
)
!==
-
1
)
{
if
(
cookie
.
get
(
'ensure_from'
)
===
'cart'
)
{
orderInfo
(
'couponCode'
,
null
);
orderInfo
(
'usable_usual_code'
,
null
);
orderInfo
(
'usable_free_code'
,
null
);
cookie
.
removeSpecific
(
'ensure_from'
,
actCkOpthn
);
}
isLimitGood
()
&&
(
function
()
{
...
...
Please
register
or
login
to post a comment