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
Email Patches
Plain Diff
Browse Files
Authored by
htoooth
8 years ago
Commit
0209addff022bc56dd6b3804560c6c7874a3fe34
1 parent
e5565679
fix css
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
apps/product/models/detail-service.js
apps/product/models/detail-service.js
View file @
0209add
...
...
@@ -1142,8 +1142,7 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
addition
:
_getProductAdditionInfoAsync
(
origin
),
// 预处理所有的数据
fav
:
_getProductFavoriteDataAsync
(
uid
,
result
.
productId
),
// 处理收藏喜欢数据
promotion
:
productAPI
.
getPromotionAsync
(
result
.
skn
),
// 打折信息
coupon
:
couponService
.
listAsync
(
propOrigin
(
'brand_info.brand_id'
),
result
.
skn
,
uid
),
// 优惠券
bundle
:
productAPI
.
getBundleAsync
(
result
.
skn
)
// 量贩
coupon
:
couponService
.
listAsync
(
propOrigin
(
'brand_info.brand_id'
),
result
.
skn
,
uid
)
// 优惠券
};
if
(
propOrigin
(
'isLimitBuy'
,
false
)
&&
propOrigin
(
'limitProductCode'
,
''
))
{
...
...
@@ -1161,6 +1160,10 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
brandService
.
getBrandByDomainAsync
(
propOrigin
(
'brand_info.brand_domain'
));
// 品牌信息
}
if
(
propOrigin
(
'bundle_type'
)
===
BUNDLE_PRODUCE
)
{
requestApi
.
bundle
=
productAPI
.
getBundleAsync
(
result
.
skn
);
// 量贩
}
let
requestData
=
yield
Promise
.
props
(
requestApi
);
let
additionalData
=
requestData
.
addition
;
...
...
@@ -1337,12 +1340,13 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
result
.
addToCart
=
false
;
}
// 量贩
result
.
bundle
=
_getBundleAsync
(
bundle
);
if
(
result
.
bundle
.
type
===
BUNDLE_PRODUCE
)
{
// 量贩商品
if
(
bundle
)
{
result
.
bundle
=
_getBundleAsync
(
bundle
);
result
.
activity
.
unshift
({
type
:
'量贩销售'
,
des
:
`
$
{
result
.
bundle
.
count
}
件起购享
$
{
result
.
bundle
.
discount
}
折优惠`
des
:
result
.
bundle
.
phrase
});
// 重新判断商品的默认图和选中状态
...
...
Please
register
or
login
to post a comment