Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
hongweigao
8 years ago
Commit
e0edd6b6ad90cdbae4863e3ef59390fef44135bc
2 parents
2d7c30a7
03ca5e1b
Merge branch 'release/5.1' of
http://git.yoho.cn/fe/yohobuy-node
into release/5.1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
20 deletions
apps/product/models/detail-service.js
apps/product/views/partial/product/latest-walk.hbs
doraemon/views/partial/product/latest-walk-tpl.hbs
public/js/product/detail.page.js
public/js/product/detail/latest-walk.js
apps/product/models/detail-service.js
View file @
e0edd6b
...
...
@@ -487,7 +487,7 @@ function _getSortNavAsync(smallSortId, gender) {
// 保存在 gids 和 skns ,最近流览功能
const
saveRecentGoodInCookies
=
(
oldSkns
,
res
,
addSkns
)
=>
{
oldSkns
=
oldSkns
||
[];
oldSkns
=
oldSkns
.
split
(
','
)
||
[];
_
.
remove
(
oldSkns
,
addSkns
);
...
...
apps/product/views/partial/product/latest-walk.hbs
deleted
100644 → 0
View file @
2d7c30a
<script
id=
"latest-walk-tpl"
type=
"text/html"
>
\{{# latestWalk}}
<div class="good">
<a href="\{{href}}" target="_blank">
<img class="lazy" data-original="\{{img}}">
</a>
<a class="name" href="\{{href}}" target="_blank">\{{name}}</a>
<p class="price">
<span class="market-price">\{{marketPrice}}</span>
<span class="sale-price">\{{salePrice}}</span>
</p>
</div>
\{{
/
latestWalk
}}
</script>
\ No newline at end of file
doraemon/views/partial/product/latest-walk-tpl.hbs
View file @
e0edd6b
...
...
@@ -11,4 +11,9 @@
</p>
</div>
\{{
/
latestWalk
}}
</script>
\ No newline at end of file
</script>
<div
class=
"lazy-load-object"
>
<textarea
class=
"datalazyload"
style=
"visibility: hidden;"
>
<script>
fetchLatestWalk
();
</script>
</textarea>
</div>
...
...
public/js/product/detail.page.js
View file @
e0edd6b
...
...
@@ -502,8 +502,7 @@ bindEvent.add(function() {
// yas
require
(
'../common'
);
// 最近浏览
require
(
'./detail/latest-walk'
);
require
(
'./detail/latest-walk'
);
// 最近浏览
// 商品详情/材质洗涤切换
$
(
'.description-material'
).
on
(
'click'
,
'.title'
,
function
()
{
...
...
public/js/product/detail/latest-walk.js
View file @
e0edd6b
...
...
@@ -10,7 +10,12 @@ var lazyLoad = require('yoho-jquery-lazyload');
var
$latestWalkCount
=
$
(
'#latest-walk-count'
);
(
function
()
{
var
dataLazyLoad
=
require
(
'../../plugins/lazy-load'
)(
document
);
// 数据懒加载
dataLazyLoad
.
init
({
cls
:
'datalazyload'
,
threshold
:
-
50
});
function
fetchLatestWalk
()
{
var
tpl
;
if
(
$latestWalkCount
.
length
===
0
)
{
...
...
@@ -59,4 +64,6 @@ var $latestWalkCount = $('#latest-walk-count');
}
}
});
}());
}
window
.
fetchLatestWalk
=
fetchLatestWalk
;
...
...
Please
register
or
login
to post a comment