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
ccbikai
2016-07-14 10:30:32 +0800
Commit
3e6d0dd75ce4dca431cc99ae7b375cdce4829cf7
1 parent
52b08983
商品详情页面模板整理
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
181 additions
and
209 deletions
apps/product/models/detail.js
apps/product/views/action/detail/detail.hbs
apps/product/views/action/detail/intro.hbs
apps/product/views/action/detail/preference.hbs
apps/product/views/partial/product/banner-swipe-and-single.hbs
apps/product/views/partial/product/banner-swiper-arrow.hbs → apps/product/views/partial/product/detail/banner-swiper-arrow.hbs
apps/product/views/partial/product/detail/product-description.hbs
apps/product/views/partial/product/detail/recommend-content.hbs
config/common.js
apps/product/models/detail.js
View file @
3e6d0dd
...
...
@@ -277,10 +277,11 @@ const _detailDataPkg = (origin, uid, vipLevel, ua) => {
if
(
_
.
has
(
dest
,
'feedbacks.consultsNum'
))
{
consultParams
.
total
=
dest
.
feedbacks
.
consultsNum
;
dest
.
feedbacks
.
consultsUrl
=
helpers
.
urlFormat
(
'/product/detail/consult'
,
consultParams
);
}
else
{
dest
.
feedbacks
.
consultsUrl
=
helpers
.
urlFormat
(
'/product/detail/consultform'
,
consultParams
);
}
dest
.
feedbacks
.
consultsUrl
=
helpers
.
urlFormat
(
'/product/detail/consultform'
,
consultParams
);
// 商品评价
dest
.
feedbacks
.
commentsNum
=
0
;
...
...
apps/product/views/action/detail/detail.hbs
View file @
3e6d0dd
...
...
@@ -24,7 +24,7 @@
{{/
tags
}}
</div>
{{#
bannerTop
}}
{{>
product
/
banner-swiper-arrow
}}
{{>
product
/
detail
/
banner-swiper-arrow
}}
{{/
bannerTop
}}
</div>
{{#
goodsName
}}
...
...
@@ -184,4 +184,4 @@
{{/
loginUrl
}}
</div>
{{/
result
}}
\ No newline at end of file
{{/
result
}}
...
...
apps/product/views/action/detail/intro.hbs
View file @
3e6d0dd
{{#
result
}}
{{>
product
/
detail
/
product-description
}}
{{/
result
}}
\ No newline at end of file
{{#
goodsDescription
}}
<div
class=
"goods-desc page-block"
>
<div
class=
"service"
></div>
<h1
class=
"title"
>
{{
title
}}
<span
class=
"en-title"
>
{{
enTitle
}}
</span>
</h1>
{{#
detail
}}
<div
class=
"detail table"
>
{{#
list
}}
<div
class=
"column"
>
{{
param
}}
</div>
{{/
list
}}
</div>
{{/
detail
}}
{{#if
desc
}}
<div
class=
"desc-text"
>
{{
desc
}}
</div>
{{/if}}
</div>
{{/
goodsDescription
}}
{{#
sizeInfo
}}
<div
class=
"size-info page-block"
>
<h1
class=
"title"
>
{{
title
}}
<span
class=
"en-title"
>
{{
enTitle
}}
</span>
</h1>
{{#
detail
}}
<div
class=
"detail"
>
<div
class=
"swiper-container detail-swiper"
id=
"size-swiper-container"
>
<div
class=
"swiper-wrapper"
>
{{#
list
}}
<div
class=
"swiper-slide "
>
{{#
params
}}
<div
class=
"cell"
>
{{
param
}}
</div>
{{/
params
}}
</div>
{{/
list
}}
</div>
</div>
<p
class=
"tips"
>
提示:左滑查看完整表格信息
</p>
</div>
{{/
detail
}}
</div>
{{/
sizeInfo
}}
{{#
measurementMethod
}}
<div
class=
"measurement-method page-block"
>
<h1
class=
"title"
>
{{
title
}}
<span
class=
"en-title"
>
{{
enTitle
}}
</span>
</h1>
<div
class=
"detail"
style=
"width:100%"
>
<img
class=
"lazy"
data-original=
"
{{
img
}}
"
alt=
""
>
</div>
</div>
{{/
measurementMethod
}}
{{#
reference
}}
<div
class=
"size-info page-block"
>
<h1
class=
"title"
>
{{
title
}}
<span
class=
"en-title"
>
{{
enTitle
}}
</span>
</h1>
{{#
detail
}}
<div
class=
"detail"
>
<div
class=
"swiper-container detail-swiper"
id=
"reference-swiper-container"
>
<div
class=
"swiper-wrapper"
>
{{#
list
}}
{{#if
@first
}}
<div
class=
"swiper-slide first-group"
>
{{#
params
}}
{{#if
@first
}}
{{else}}
<div>
<img
class=
"avatar lazy"
data-original=
"
{{
param
}}
"
alt=
""
>
</div>
{{/if}}
{{/
params
}}
</div>
{{else}}
<div
class=
"swiper-slide"
>
{{#
params
}}
<div
class=
" cell"
>
{{
param
}}
</div>
{{/
params
}}
</div>
{{/if}}
{{/
list
}}
</div>
</div>
<p
class=
"tips"
>
提示:左滑查看完整表格信息
</p>
</div>
{{/
detail
}}
</div>
{{/
reference
}}
{{#
materials
}}
<div
class=
"materials page-block"
>
<h1
class=
"title"
>
{{
title
}}
<span
class=
"en-title"
>
{{
enTitle
}}
</span>
</h1>
<div
class=
"detail"
>
{{#
list
}}
<div
class=
"material-item"
>
<!-- <img class="lazy" data-original="
{{
img
}}
" alt="">
<p class="material-desc">
{{
desc
}}
</p>-->
<div
class=
"material-image"
>
<img
src=
"
{{
img
}}
"
alt=
"材质图"
>
</div>
<div
class=
"material-desc"
>
{{
desc
}}
</div>
</div>
{{/
list
}}
</div>
</div>
{{/
materials
}}
{{#
washTips
}}
<div
class=
"wash-tips page-block"
>
<div
class=
"detail table clearfix"
>
{{#
list
}}
<div
class=
"tip"
>
<img
src=
"
{{
img
}}
"
alt=
""
>
<span
class=
"caption"
>
{{
caption
}}
</span>
</div>
{{/
list
}}
</div>
</div>
{{/
washTips
}}
{{#
productDetail
}}
<div
class=
"product-detail page-block"
>
<h1
class=
"title"
>
{{{
title
}}}
<span
class=
"en-title"
>
{{{
enTitle
}}}
</span>
</h1>
<div
class=
"pro-detail"
>
<p>
{{{
desc
}}}
</p>
{{#
list
}}
<img
class=
"lazy"
data-original=
"
{{
img
}}
"
alt=
""
>
{{/
list
}}
</div>
</div>
{{/
productDetail
}}
{{/
result
}}
...
...
apps/product/views/action/detail/preference.hbs
View file @
3e6d0dd
{{>
product
/
detail
/
recommend-content
}}
\ No newline at end of file
<div
class=
"title"
>
为您优选新品
</div>
<div
id=
"swiper-recommend"
class=
"swiper-container"
>
<div
class=
"swiper-wrapper swiper-wrapper-recommend"
>
{{#
recommendList
}}
<a
class=
"swiper-slide"
href=
"
{{
url
}}
"
>
<img
class=
"swiper-lazy img-box"
data-src=
"
{{
image
thumb
299
388
}}
"
>
<div
class=
"sale-name"
>
{{
name
}}
</div>
<div
class=
"price"
>
<span
class=
"sale-price
{{^
price
}}
no-price
{{/
price
}}
"
>
¥
{{
salePrice
}}
</span>
{{#
price
}}
<span
class=
"old-price"
>
¥
{{
.
}}
</span>
{{/
price
}}
</div>
<div
class=
"swiper-lazy-preloader"
></div>
</a>
{{/
recommendList
}}
</div>
</div>
...
...
apps/product/views/partial/product/banner-swipe-and-single.hbs
deleted
100644 → 0
View file @
52b0898
{{#if
list
}}
<div
class=
"banner-top"
>
<div
class=
"banner-swiper swiper-container"
>
<ul
class=
"swiper-wrapper"
>
{{#
list
}}
<li
class=
"swiper-slide"
>
<a
href=
"
{{
url
}}
"
>
<img
class=
"swiper-lazy"
data-src=
"
{{
src
}}
"
>
</a>
<div
class=
"swiper-lazy-preloader"
></div>
</li>
{{/
list
}}
</ul>
</div>
<div
class=
"swiper-pagination"
>
<div
class=
"pagination-inner"
>
</div>
</div>
</div>
{{else}}
<div
class=
"banner-top-single"
>
<a
href=
{{
url
}}
>
<img
class=
"img"
src=
"
{{
img
}}
"
>
</a>
</div>
{{/if}}
apps/product/views/partial/product/banner-swiper-arrow.hbs → apps/product/views/partial/product/
detail/
banner-swiper-arrow.hbs
View file @
3e6d0dd
...
...
@@ -19,10 +19,10 @@
<div
class=
"my-swiper-button-prev prev-grey"
></div>
<div
class=
"my-swiper-button-next next-grey"
></div>
</div>
{{^}}
<div
class=
"banner-top-single"
>
<a
href=
{{
url
}}
>
<img
class=
"img"
src=
"
{{
image
img
450
600
}}
"
>
</a>
</div>
{{/if}}
\ No newline at end of file
{{^}}
<div
class=
"banner-top-single"
>
<a
href=
{{
url
}}
>
<img
class=
"img"
src=
"
{{
image
img
450
600
}}
"
>
</a>
</div>
{{/if}}
...
...
apps/product/views/partial/product/detail/product-description.hbs
deleted
100644 → 0
View file @
52b0898
{{#
goodsDescription
}}
<div
class=
"goods-desc page-block"
>
<div
class=
"service"
></div>
<h1
class=
"title"
>
{{
title
}}
<span
class=
"en-title"
>
{{
enTitle
}}
</span>
</h1>
{{#
detail
}}
<div
class=
"detail table"
>
{{#
list
}}
<div
class=
"column"
>
{{
param
}}
</div>
{{/
list
}}
</div>
{{/
detail
}}
{{#if
desc
}}
<div
class=
"desc-text"
>
{{
desc
}}
</div>
{{/if}}
</div>
{{/
goodsDescription
}}
{{#
sizeInfo
}}
<div
class=
"size-info page-block"
>
<h1
class=
"title"
>
{{
title
}}
<span
class=
"en-title"
>
{{
enTitle
}}
</span>
</h1>
{{#
detail
}}
<div
class=
"detail"
>
<div
class=
"swiper-container detail-swiper"
id=
"size-swiper-container"
>
<div
class=
"swiper-wrapper"
>
{{#
list
}}
<div
class=
"swiper-slide "
>
{{#
params
}}
<div
class=
"cell"
>
{{
param
}}
</div>
{{/
params
}}
</div>
{{/
list
}}
</div>
</div>
<p
class=
"tips"
>
提示:左滑查看完整表格信息
</p>
</div>
{{/
detail
}}
</div>
{{/
sizeInfo
}}
{{#
measurementMethod
}}
<div
class=
"measurement-method page-block"
>
<h1
class=
"title"
>
{{
title
}}
<span
class=
"en-title"
>
{{
enTitle
}}
</span>
</h1>
<div
class=
"detail"
style=
"width:100%"
>
<img
class=
"lazy"
data-original=
"
{{
img
}}
"
alt=
""
>
</div>
</div>
{{/
measurementMethod
}}
{{#
reference
}}
<div
class=
"size-info page-block"
>
<h1
class=
"title"
>
{{
title
}}
<span
class=
"en-title"
>
{{
enTitle
}}
</span>
</h1>
{{#
detail
}}
<div
class=
"detail"
>
<div
class=
"swiper-container detail-swiper"
id=
"reference-swiper-container"
>
<div
class=
"swiper-wrapper"
>
{{#
list
}}
{{#if
@first
}}
<div
class=
"swiper-slide first-group"
>
{{#
params
}}
{{#if
@first
}}
{{else}}
<div>
<img
class=
"avatar lazy"
data-original=
"
{{
param
}}
"
alt=
""
>
</div>
{{/if}}
{{/
params
}}
</div>
{{else}}
<div
class=
"swiper-slide"
>
{{#
params
}}
<div
class=
" cell"
>
{{
param
}}
</div>
{{/
params
}}
</div>
{{/if}}
{{/
list
}}
</div>
</div>
<p
class=
"tips"
>
提示:左滑查看完整表格信息
</p>
</div>
{{/
detail
}}
</div>
{{/
reference
}}
{{#
materials
}}
<div
class=
"materials page-block"
>
<h1
class=
"title"
>
{{
title
}}
<span
class=
"en-title"
>
{{
enTitle
}}
</span>
</h1>
<div
class=
"detail"
>
{{#
list
}}
<div
class=
"material-item"
>
<!-- <img class="lazy" data-original="
{{
img
}}
" alt="">
<p class="material-desc">
{{
desc
}}
</p>-->
<div
class=
"material-image"
>
<img
src=
"
{{
img
}}
"
alt=
"材质图"
>
</div>
<div
class=
"material-desc"
>
{{
desc
}}
</div>
</div>
{{/
list
}}
</div>
</div>
{{/
materials
}}
{{#
washTips
}}
<div
class=
"wash-tips page-block"
>
<div
class=
"detail table clearfix"
>
{{#
list
}}
<div
class=
"tip"
>
<img
src=
"
{{
img
}}
"
alt=
""
>
<span
class=
"caption"
>
{{
caption
}}
</span>
</div>
{{/
list
}}
</div>
</div>
{{/
washTips
}}
{{#
productDetail
}}
<div
class=
"product-detail page-block"
>
<h1
class=
"title"
>
{{{
title
}}}
<span
class=
"en-title"
>
{{{
enTitle
}}}
</span>
</h1>
<div
class=
"pro-detail"
>
<p>
{{{
desc
}}}
</p>
{{#
list
}}
<img
class=
"lazy"
data-original=
"
{{
img
}}
"
alt=
""
>
{{/
list
}}
</div>
</div>
{{/
productDetail
}}
apps/product/views/partial/product/detail/recommend-content.hbs
deleted
100644 → 0
View file @
52b0898
<div
class=
"title"
>
为您优选新品
</div>
<div
id=
"swiper-recommend"
class=
"swiper-container"
>
<div
class=
"swiper-wrapper swiper-wrapper-recommend"
>
{{#
recommendList
}}
<a
class=
"swiper-slide"
href=
"
{{
url
}}
"
>
<img
class=
"swiper-lazy img-box"
data-src=
"
{{
image
thumb
299
388
}}
"
>
<div
class=
"sale-name"
>
{{
name
}}
</div>
<div
class=
"price"
>
<span
class=
"sale-price
{{^
price
}}
no-price
{{/
price
}}
"
>
¥
{{
salePrice
}}
</span>
{{#
price
}}
<span
class=
"old-price"
>
¥
{{
.
}}
</span>
{{/
price
}}
</div>
<div
class=
"swiper-lazy-preloader"
></div>
</a>
{{/
recommendList
}}
</div>
</div>
\ No newline at end of file
config/common.js
View file @
3e6d0dd
...
...
@@ -15,8 +15,8 @@ module.exports = {
port
:
6001
,
siteUrl
:
'//m.yohobuy.com'
,
domains
:
{
api
:
'http://testapi.yoho.cn:28078/'
,
service
:
'http://testservice.yoho.cn:28077/'
api
:
'http://api.yoho.yohoops.org/'
,
service
:
'http://service.yoho.yohoops.org/'
// api: 'http://devapi.yoho.cn:58078/',
// service: 'http://devservice.yoho.cn:58077/'
...
...
Please
register
or
login
to post a comment