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
8e57f2359b7e4e80bfd2aea949ddb001e66d7312
1 parent
08cd4527
增加cookie时效
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
public/js/product/detail/functions.js
public/js/product/detail/functions.js
View file @
8e57f23
...
...
@@ -71,8 +71,12 @@ let functions = {
addToCart
(
sku
,
skn
,
buyNum
)
{
if
(
!
yoho
.
isLogin
())
{
let
preInfo
=
`
$
{
sku
}
_$
{
skn
}
_$
{
buyNum
}
`
;
let
actCkOpthn
=
{
path
:
'/'
,
expires
:
1
};
window
.
setCookie
(
'tmp-cart-info'
,
preInfo
,
{
expires
:
1
}
);
window
.
setCookie
(
'tmp-cart-info'
,
preInfo
,
actCkOpthn
);
window
.
location
.
href
=
'//m.yohobuy.com/signin.html?refer='
+
encodeURIComponent
(
window
.
location
.
href
);
return
false
;
}
...
...
Please
register
or
login
to post a comment