Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-frontend
·
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
Plain Diff
Browse Files
Authored by
xuqi
10 years ago
Commit
18f2609e4a327fd595e662f581e9969bd6b81707
2 parents
c96cd1ab
8a619651
Merge branch 'develop'
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
21 deletions
mobile/public/js/tag.js
mobile/public/js/tag.js
View file @
18f2609
...
...
@@ -63,6 +63,12 @@ exports.init = function() {
Mustache
.
parse
(
tpl
);
});
//相关文章截取文字
ellipsis
.
init
();
$
(
'.tag-text, .tag-title'
).
each
(
function
()
{
this
.
mlellipsis
(
2
);
});
//文章点赞
$
(
'#container'
).
delegate
(
'.like-btn'
,
'touchstart'
,
function
(
e
)
{
var
$cur
=
$
(
e
.
currentTarget
),
...
...
@@ -157,18 +163,6 @@ exports.init = function() {
}
});
}
if
(
$
(
document
).
height
()
===
winH
)
{
//应对初始加载时数据不满屏不能触发scroll的情况
$
(
document
).
one
(
'touchmove'
,
function
()
{
if
(
!
canScroll
||
dataEnd
)
{
return
;
}
//显示LoadMore
$loading
.
removeClass
(
'hide'
);
loadMore
();
});
}
$
(
document
).
on
(
'scroll'
,
function
()
{
//正在请求数据或者数据请求结束时返回
...
...
@@ -181,15 +175,18 @@ exports.init = function() {
}
});
setTimeout
(
function
()
{
//相关文章截取文字
ellipsis
.
init
();
$
(
'.tag-text, .tag-title'
).
each
(
function
()
{
this
.
mlellipsis
(
2
);
});
if
(
$
(
document
).
height
()
!==
winH
)
{
if
(
$
(
document
).
height
()
===
winH
)
{
//应对初始加载时数据不满屏不能触发scroll的情况
$
(
document
).
one
(
'touchmove'
,
function
()
{
if
(
!
canScroll
||
dataEnd
)
{
return
;
}
//显示LoadMore
$loading
.
removeClass
(
'hide'
);
}
},
0
);
loadMore
();
});
}
else
{
$loading
.
removeClass
(
'hide'
);
}
});
};
\ No newline at end of file
...
...
Please
register
or
login
to post a comment