Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
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
郭成尧
8 years ago
Commit
b5402da39c7ac43188b12ea64aca3bf47e1120c7
1 parent
9fca7f71
video
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
42 deletions
public/js/guang/info-index.page.js
public/scss/guang/_detail.css
public/js/guang/info-index.page.js
View file @
b5402da
...
...
@@ -29,49 +29,10 @@ require('common');
require
(
'plugin/wx-share'
)();
require
(
'./detail-dynamic'
);
require
(
'./detail/guang-cart'
);
require
(
'./detail/guang-comments'
);
let
CollactionBlock
=
require
(
'./collocation-block'
);
const
qs
=
window
.
queryString
;
const
article_id
=
qs
.
id
||
$
(
'.detail'
).
data
(
'id'
);
const
$comments
=
$
(
'#comments'
);
let
onLoading
=
false
;
// 是否正在加载
// let beforeScroll = document.body.scrollTop; // 滚动前位置记录
let
page
=
0
;
/**
* 异步加载评论
*/
const
getComments
=
()
=>
{
if
(
!
onLoading
)
{
onLoading
=
true
;
}
else
{
return
false
;
}
$
.
ajax
({
method
:
'get'
,
url
:
'//guang.m.yohobuy.com/guang/info/getComments'
,
data
:
{
article_id
:
article_id
,
page
:
page
++
},
success
:
function
(
res
)
{
$comments
.
append
(
res
);
onLoading
=
false
;
}
});
};
/**
* 当scroll到1/2$goodsContainer高度后继续请求下一页数据
*/
// const scrollHandler = function() {
// if ($(window).scrollTop() > $comments.height() * 0.6) {
// getComments();
// }
// };
$
(
'#wrapper'
).
css
({
'overflow-y'
:
'scroll'
});
...
...
@@ -371,6 +332,4 @@ $('.wei-share').on('touchend', function(e) {
}
initIscroll
();
getComments
();
}());
...
...
public/scss/guang/_detail.css
View file @
b5402da
...
...
@@ -749,6 +749,10 @@ $focus-size: 42px;
padding
:
6px
;
}
}
video
{
width
:
100%
;
}
}
.guang-detail-page.menu-open
{
...
...
Please
register
or
login
to post a comment