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
Plain Diff
Browse Files
Authored by
毕凯
8 years ago
Commit
d8025e5284d1eddad2bd05e79f5caa465604448b
2 parents
b71d2720
284dee37
Merge branch 'feature/bundle-phrase' into 'release/5.4'
套餐立省价格为0不显示 See merge request
!127
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
apps/product/models/bundle.js
apps/product/models/new-detail.js
apps/product/views/action/bundle/detail.hbs
public/hbs/product/detail/bundle.hbs
apps/product/models/bundle.js
View file @
d8025e5
...
...
@@ -31,10 +31,6 @@ const detail = (params) => {
}
return
getBundleBySkn
(
params
.
skn
).
then
(
result
=>
{
// let discountPrice = (_.get(result, 'data.bundleInfo.salesPrice', 0) -
// _.get(result, 'data.bundleInfo.discountPrice', 0));
// let priceShow = _.split(discountPrice + '', '.')[0];
return
{
bundleInfo
:
_
.
get
(
result
,
'data.bundleInfo'
,
{}),
productList
:
productProcess
.
processProductList
(
_
.
get
(
result
,
'data.productList'
,
[]))
...
...
apps/product/models/new-detail.js
View file @
d8025e5
...
...
@@ -218,14 +218,12 @@ const tool = {
* @returns {{}}
*/
processBundle
(
bundleData
,
skn
,
gid
)
{
// let discountPrice = (_.get(bundleData, 'bundleInfo.salesPrice', 0) -
// _.get(bundleData, 'bundleInfo.discountPrice', 0));
// let priceShow = _.split(discountPrice + '', '.')[0];
let
subPrice
=
_
.
get
(
bundleData
,
'bundleInfo.subPrice'
,
0
);
return
{
title
:
'优惠套装'
,
href
:
helpers
.
urlFormat
(
'/product/bundle/detail'
,
{
skn
:
skn
,
gid
:
gid
}),
description
:
'立省¥'
+
_
.
get
(
bundleData
,
'bundleInfo.subPrice'
,
0
)
,
description
:
subPrice
?
'立省¥'
+
subPrice
:
0
,
productList
:
productProcess
.
processProductList
(
bundleData
&&
bundleData
.
productList
)
};
},
...
...
apps/product/views/action/bundle/detail.hbs
View file @
d8025e5
...
...
@@ -18,7 +18,9 @@
<div
class=
"bundle-bar clearfix"
>
<div
class=
"bundle-bar-md"
>
<div
class=
"bundle-price"
>
{{#if
subPrice
}}
<span
class=
"bundle-discount"
>
立省¥
{{
subPrice
}}
</span>
{{/if}}
<span>
套餐价:
{{
discountPriceStr
}}
</span>
</div>
<div
class=
"sale-price"
>
销售价:
{{
salesPriceStr
}}
</div>
...
...
public/hbs/product/detail/bundle.hbs
View file @
d8025e5
...
...
@@ -4,7 +4,9 @@
<div
class=
"bundle-title"
>
{{
title
}}
</div>
<div
class=
"bundle-right"
>
<a
href=
"
{{
href
}}
"
>
<span
class=
"bundle-desc"
>
{{
description
}}
</span>
{{#if
description
}}
<span
class=
"bundle-desc"
>
{{
description
}}
</span>
{{/if}}
<span
class=
"iconfont"
>

</span>
</a>
</div>
...
...
Please
register
or
login
to post a comment