Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
梁志锋
9 years ago
Commit
cf1422f96be6f53606cf0de191ec20a8d3f67b74
1 parent
d71120ea
购物车修改
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
static/js/cart/cart.js
static/js/cart/cart.js
View file @
cf1422f
...
...
@@ -12,12 +12,13 @@ var chosePanel = require('./chose-panel'),
dialog
=
require
(
'../me/dialog'
),
tip
=
require
(
'../plugin/tip'
);
var
$cartContent
=
$
(
'.cart-content'
);
var
$cartContent
=
$
(
'.cart-content'
),
cartType
=
$
(
'#cartType'
).
val
(),
hasShowCartPresellTip
=
false
;
var
navHammer
,
advanceBuyHammer
,
freebieHammer
,
cartType
=
$
(
'#cartType'
).
val
();
freebieHammer
;
var
hasChecked
=
$
(
'.cart-content:not(.hide) .icon-cb-checked'
).
length
>
0
?
true
:
false
;
//是否有选中商品
...
...
@@ -67,6 +68,11 @@ require('./good');
lazyLoad
(
$
(
'img.lazy'
));
if
(
typeof
window
.
cookie
===
'function'
&&
'y'
===
window
.
cookie
(
'_hasShowCartPresellTip'
))
{
$
(
'#presell-tip'
).
addClass
(
'hide'
);
hasShowCartPresellTip
=
true
;
}
if
(
'advance'
===
cartType
)
{
$cartContent
.
toggleClass
(
'hide'
);
$
(
'presell-cart-nav'
).
addClass
(
'active'
);
...
...
@@ -102,9 +108,12 @@ if ($('.cart-nav').length > 0) {
$
(
window
).
trigger
(
'scroll'
);
});
setTimeout
(
function
()
{
$
(
'#presell-tip'
).
addClass
(
'hide'
);
},
3000
);
if
(
!
hasShowCartPresellTip
)
{
setTimeout
(
function
()
{
$
(
'#presell-tip'
).
addClass
(
'hide'
);
window
.
setCookie
(
'_hasShowCartPresellTip'
,
'y'
);
},
3000
);
}
}
if
(
$
(
'.advance-buy'
).
length
>
0
)
{
...
...
@@ -121,14 +130,6 @@ if ($('.freebie').length > 0) {
});
}
//$('.advance-buy').on('touchend', function() {
// window.location.href = '/cart/index/advanceBuy?cartType=' + cartType;
//});
//
//$('.freebie').on('touchend', function() {
// window.location.href = '/cart/index/gift?cartType=' + cartType;
//});
$
(
'.btn-balance'
).
on
(
'touchend'
,
function
()
{
if
(
shouldSelectGift
())
{
showChooseGifDialog
();
...
...
Please
register
or
login
to post a comment