Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
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
biao
9 years ago
Commit
22651992e7fdc679d478638390665bfd2337a2d5
1 parent
37b04c28
1.删除购物车物品后,页面刷新不请求为你优选。2.减小购物车中商品数字的大小. code review by LZF
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
4 deletions
static/js/cart/cart.js
static/js/cart/good.js
static/sass/cart/_good.scss
static/js/cart/cart.js
View file @
2265199
...
...
@@ -22,14 +22,34 @@ var navHammer,
freebieHammer
,
switchChose
=
false
;
require
(
'./good'
);
//
require('./good');
if
(
$
(
'.cart-zero'
).
length
>
0
)
{
function
isCookiesEnabled
()
{
var
cookieEnabled
=
(
navigator
.
cookieEnabled
)
?
true
:
false
;
if
(
typeof
navigator
.
cookieEnabled
===
'undefined'
&&
!
cookieEnabled
)
{
document
.
cookie
=
'testcookie'
;
cookieEnabled
=
(
document
.
cookie
.
indexOf
(
'testcookie'
)
!==
-
1
)
?
true
:
false
;
}
return
(
cookieEnabled
);
}
function
needLoadRecommandForYou
()
{
return
isCookiesEnabled
()
?
$
(
'.shopping-cart-good'
).
length
<=
0
&&
window
.
cookie
(
'yoho-cart-refreshByDelete'
)
!==
'true'
:
$
(
'.shopping-cart-good'
).
length
<=
0
;
}
if
(
needLoadRecommandForYou
())
{
require
(
'../product/recommend-for-you'
);
}
else
{
require
(
'./good'
);
}
window
.
setCookie
(
'yoho-cart-refreshByDelete'
,
false
);
ellipsis
.
init
();
function
cartContentShow
()
{
...
...
static/js/cart/good.js
View file @
2265199
...
...
@@ -108,6 +108,7 @@ $('.icon-del').on('touchstart', function(e) {
});
orderInfo
(
'couponCode'
,
null
);
orderInfo
(
'couponName'
,
null
);
window
.
setCookie
(
'yoho-cart-refreshByDelete'
,
true
);
window
.
location
.
href
=
'/cart/index/index?cartType='
+
$
(
'#cartType'
).
val
();
}
else
{
tip
.
show
(
data
.
message
);
...
...
static/sass/cart/_good.scss
View file @
2265199
...
...
@@ -123,10 +123,10 @@
}
.count
{
font-size
:
2
8
rem
/
$pxConvertRem
;
font-size
:
2
0
rem
/
$pxConvertRem
;
color
:
#999
;
display
:
inline-block
;
width
:
19
%
;
width
:
22
%
;
position
:
absolute
;
text-align
:
center
;
}
...
...
Please
register
or
login
to post a comment