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
zhangxiaoru
9 years ago
Commit
895c526d3c11da067497037f0af00dd20f37ee65
1 parent
9525f1e7
首页
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
static/js/product/shop.js
static/js/product/shop.js
View file @
895c526
...
...
@@ -136,15 +136,16 @@ $.jqtab = function(nav, posNav, main) {
}
else
if
(
activeTab
==
'popularity'
){
hotData
();
}
else
if
(
activeTab
==
'home-page'
)
{
myScroll
.
scrollTo
(
0
,
0
);
setTimeout
(
function
()
{
myScroll
.
refresh
();
scH
=
$
(
'#scroller'
).
outerHeight
();
console
.
log
(
scH
)
},
1000
);
}
myScroll
.
scrollTo
(
0
,
0
);
$nav1
.
addClass
(
'hide'
);
return
false
;
});
};
...
...
@@ -476,9 +477,9 @@ function search(opt) {
},
1000
);
myScroll
.
refresh
();
console
.
log
(
sTop
)
if
(
sTop
>
imgH
+
nav1H
+
main1oH
)
{
myScroll
.
scrollTo
(
0
,
-
(
imgH
+
nav1H
+
main1oH
));
myScroll
.
scrollTo
(
0
,
-
(
imgH
+
nav1H
+
main1oH
+
10
));
}
},
error
:
function
()
{
...
...
@@ -694,7 +695,7 @@ function stopPropagation(e) {
e
.
cancelBubble
=
true
;
}
}
$
(
document
).
bind
(
'touchstart'
,
function
(){
$
(
document
).
bind
(
'touchstart'
,
function
(){
$
(
'.sub-group'
).
addClass
(
'hide'
);
});
...
...
@@ -703,18 +704,13 @@ $('.shop-foot-wrapper').bind('touchstart',function(e){
});
//收藏
function
collectClick
()
{
$
(
'#collect'
).
on
(
'touchstart'
,
function
()
{
if
(
$
(
'#collect'
).
hasClass
(
'alreadyCollect'
))
{
cancelShop
();
}
else
{
collectShop
();
}
});
};
collectClick
();
$
(
'#collect'
).
bind
(
'touchstart'
,
function
()
{
if
(
$
(
'#collect'
).
hasClass
(
'alreadyCollect'
))
{
cancelShop
();
}
else
{
collectShop
();
}
});
function
postCollect
(
info
)
{
var
url
=
''
;
...
...
@@ -733,8 +729,10 @@ function postCollect(info) {
if
(
data
.
code
===
200
){
if
(
$
(
'#collect'
).
hasClass
(
'alreadyCollect'
))
{
console
.
log
(
1
)
$
(
'#collect'
).
attr
(
'class'
,
'notCollect'
);
}
else
{
console
.
log
(
0
)
$
(
'#collect'
).
attr
(
'class'
,
'alreadyCollect'
);
}
}
...
...
Please
register
or
login
to post a comment