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
5f77bc24e1beea138e28e3d363e609fb6f9b67c5
1 parent
7b159548
完善收藏商品功能
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
web-static/js/product/product.js
web-static/sass/product/_good.scss
web-static/js/product/product.js
View file @
5f77bc2
...
...
@@ -150,7 +150,7 @@ exports.init = function(num) {
$goodItemWrapper
.
mouseleave
(
function
()
{
removeHtmlFn
();
//
removeHtmlFn();
});
function
removeHtmlFn
()
{
...
...
@@ -171,15 +171,19 @@ $(document).on('hover', '.good-select-color li', function() {
});
$goodInfoMain
.
on
(
'click'
,
'.col-btn'
,
function
()
{
var
$this
=
$
(
this
);
$
.
ajax
({
type
:
'POST'
,
url
:
'/product/list/changeFavorite'
,
data
:
{
skn
:
$
(
this
).
closest
(
'.good-info'
).
data
(
'skn'
),
isFavorite
:
!
$
(
this
).
hasClass
(
'coled'
)
skn
:
$this
.
closest
(
'.good-info'
).
data
(
'skn'
),
isFavorite
:
!
$this
.
hasClass
(
'coled'
)
}
}).
then
(
function
(
res
)
{
console
.
log
(
res
);
if
(
res
.
code
===
200
)
{
$this
.
toggleClass
(
'coled'
);
}
});
});
...
...
web-static/sass/product/_good.scss
View file @
5f77bc2
...
...
@@ -123,7 +123,7 @@
display
:
block
;
&
:hover
{
color
:
#f95b4f
;
//
color: #f95b4f;
cursor
:
pointer
;
}
}
...
...
Please
register
or
login
to post a comment