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
Lynnic
9 years ago
Commit
a5c88e7440a2be3879f613221d65a73d1eeb2dae
1 parent
798b4fc5
update
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
43 deletions
docs/data-structure.md
static/js/product/detail/detail.js
template/m.yohobuy.com/actions/product/detail/index.phtml
template/m.yohobuy.com/partials/product/product_description.phtml
docs/data-structure.md
View file @
a5c88e7
...
...
@@ -1170,9 +1170,12 @@
'detail' : {
'list' : [
{
'fieldName' : '头像',
'firstModel' : '', //头像图片url
'secondModel' =>''
'params':[
{
'param' =>'头像'
},
...
]
},
...
]
...
...
static/js/product/detail/detail.js
View file @
a5c88e7
...
...
@@ -5,13 +5,11 @@
*/
var
$
=
require
(
'jquery'
),
Swiper
=
require
(
'yoho.iswiper'
),
lazyLoad
=
require
(
'yoho.lazyload'
),
Handlebars
=
require
(
'yoho.handlebars'
);
lazyLoad
=
require
(
'yoho.lazyload'
);
var
goodsSwiper
,
sizeSwiper
,
refSwiper
,
handleHelper
;
refSwiper
;
require
(
'./desc'
);
require
(
'./comments-consults'
);
...
...
@@ -38,27 +36,6 @@ goodsSwiper = new Swiper('.banner-swiper', {
}
})();
// $('#nav-tab li').on('click', function() {
// var index = $(this).index();
// if ($(this).hasClass('comment-nav') && 0 === commentsNum) {
// alert('暂无商品评价');
// } else {
// if (!$(this).hasClass('focus')) {
// $('#nav-tab li').each(function() {
// $(this).removeClass('focus');
// });
// $('#feedback-content .content').each(function() {
// $(this).addClass('hide');
// });
// $(this).addClass('focus');
// $('#feedback-content .content:eq(' + index + ')').removeClass('hide');
// }
// }
// });
$
(
'.goodsDiscount .dropdown'
).
on
(
'click'
,
function
()
{
if
(
$
(
'.goodsDiscount .discount-folder'
).
is
(
':hidden'
))
{
$
(
'.goodsDiscount .first-item span'
).
removeClass
(
'icon-down'
);
...
...
@@ -82,13 +59,4 @@ refSwiper = new Swiper('#reference-swiper-container',{
});
handleHelper
=
Handlebars
.
registerHelper
(
'addOne'
,
function
(
index
)
{
return
index
+
1
;
});
//srcoll to load more
// $(window).scroll(function () {
// if ($(window).scrollTop() + winH >= $(document).height() - 50) {
// }
// });
...
...
template/m.yohobuy.com/actions/product/detail/index.phtml
View file @
a5c88e7
...
...
@@ -35,7 +35,7 @@
<div
class=
"vipLevel"
>
{
{#
list
}
}
<span
class=
"vip-img"
>
<div
class=
"img"
alt=
""
></div>
<div
class=
"img"
alt=
""
style=
"background-size:cover;"
></div>
</span>
<span
class=
"vip-price"
>
{
{text
}
}</span>
{
{/
list
}
}
...
...
template/m.yohobuy.com/partials/product/product_description.phtml
View file @
a5c88e7
...
...
@@ -74,14 +74,18 @@
{
{#list
}
}
{
{#if
@first
}
}
<div
class=
"swiper-slide first-group"
>
<img
class=
"lazy avatar"
data-original=
"{{firstModel}}"
alt=
""
>
<img
class=
"lazy avatar"
data-original=
"{{secondModel}}"
alt=
""
>
{
{#params
}
}
{
{#if
@first
}
}
{
{else
}
}
<img
class=
"lazy avatar"
data-original=
"{{param}}"
/>
{
{/if
}
}
{
{/params
}
}
</div>
{
{^
}
}
<div
class=
"swiper-slide"
>
<div
class=
"model-field cell"
>
{
{fieldName
}
}</div>
<div
class=
"first-model cell"
>
{
{firstModel
}
}</div>
<div
class=
"second-model cell"
>
{
{secondModel
}
}</div>
{
{#params
}
}
<div
class=
" cell"
>
{
{param
}
}</div>
{
{/params
}
}
</div>
{
{/if
}
}
{
{/list
}
}
...
...
Please
register
or
login
to post a comment