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
77ea1464ce4c7133d763bf7afe095d8c1b0dd8ca
1 parent
5a8ed297
悬浮购物车数字大于99 显示99+
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
static/js/product/suspend-cart.js
static/sass/product/_suspend-cart.scss
static/js/product/suspend-cart.js
View file @
77ea146
...
...
@@ -12,8 +12,14 @@ $.ajax({
type
:
'GET'
,
url
:
'/cart/index/count'
,
success
:
function
(
data
)
{
var
count
;
if
(
data
.
code
===
200
)
{
$cart
.
find
(
'.cart-count'
).
html
(
data
.
data
.
cart_goods_count
).
removeClass
(
'hide'
);
count
=
data
.
data
.
cart_goods_count
;
if
(
count
>
99
)
{
count
=
'99+'
;
}
$cart
.
find
(
'.cart-count'
).
html
(
count
).
removeClass
(
'hide'
);
}
}
});
\ No newline at end of file
});
...
...
static/sass/product/_suspend-cart.scss
View file @
77ea146
...
...
@@ -23,13 +23,16 @@
.cart-count
{
position
:
absolute
;
width
:
18px
;
height
:
18px
;
line-height
:
18px
;
border-radius
:
50%
;
background
:
#f00
;
top
:
0
;
right
:
0
;
top
:
-12px
;
right
:
-10px
;
width
:
36px
;
height
:
36px
;
font-size
:
20px
;
line-height
:
36px
;
color
:
#fff
;
background
:
#f03d35
;
text-align
:
center
;
border-radius
:
50%
;
@include
transform
(
scale
(
0
.5
));
}
}
...
...
Please
register
or
login
to post a comment