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
1a5f1924307c3326b8df245bdf264f2ea8f54892
2 parents
b7008f2d
5ce9692d
Merge branch 'feature/shareBuy2' into 'release/5.9.1'
Feature/share buy2 See merge request
!718
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
12 deletions
apps/activity/models/share-buy.js
apps/activity/views/action/share-buy/share-detail.hbs
public/js/activity/share-detail.page.js
apps/activity/models/share-buy.js
View file @
1a5f192
...
...
@@ -36,6 +36,8 @@ module.exports = class extends global.yoho.BaseModel {
val
.
couponDescribe
=
'任意商品使用'
;
}
else
if
(
val
.
shopNames
)
{
val
.
couponDescribe
=
'限'
+
val
.
shopNames
+
'使用'
;
}
else
if
(
val
.
shareCoupon
===
'商品券'
){
val
.
couponDescribe
=
'指定商品可用'
;
}
val
.
detailUrl
=
helpers
.
urlFormat
(
'/activity/share-buy/detail'
,
{
...
...
@@ -145,7 +147,8 @@ module.exports = class extends global.yoho.BaseModel {
code
:
200
}).
then
((
result
)
=>
{
let
moreUrl
,
detailData
;
detailData
,
couponDetail
=
_
.
get
(
result
,
'data.userCouponBoList[0]'
,
{});
if
(
result
&&
result
.
code
===
200
&&
result
.
data
)
{
detailData
=
_
.
assign
(
detailData
,
param
);
...
...
@@ -166,14 +169,17 @@ module.exports = class extends global.yoho.BaseModel {
detailData
.
finish
=
parseInt
(
result
.
data
.
expiredTime
,
10
)
>
0
?
false
:
true
;
if
(
result
.
data
.
userCouponBoList
[
0
]
.
sortNames
)
{
if
(
couponDetail
.
sortNames
)
{
detailData
.
detailDes
=
'限品类: '
+
result
.
data
.
userCouponBoList
[
0
].
sortNames
;
}
else
if
(
result
.
data
.
userCouponBoList
[
0
]
.
brandNames
)
{
}
else
if
(
couponDetail
.
brandNames
)
{
detailData
.
detailDes
=
'限品牌: '
+
result
.
data
.
userCouponBoList
[
0
].
brandNames
;
}
else
if
(
result
.
data
.
userCouponBoList
[
0
]
.
shareCoupon
===
'全场通用'
)
{
}
else
if
(
couponDetail
.
shareCoupon
===
'全场通用'
)
{
detailData
.
detailDes
=
result
.
data
.
userCouponBoList
[
0
].
shareCoupon
;
}
else
if
(
result
.
data
.
userCouponBoList
[
0
].
shopNames
)
{
detailData
.
detailDes
=
result
.
data
.
userCouponBoList
[
0
].
shopNames
;
}
else
if
(
couponDetail
.
shopNames
)
{
detailData
.
detailDes
=
'限店铺:'
+
result
.
data
.
userCouponBoList
[
0
].
shopNames
;
}
else
if
(
couponDetail
.
shareCoupon
===
'商品券'
)
{
detailData
.
detailDes
=
'限商品:指定商品可用'
;
detailData
.
goodsCoupon
=
true
;
}
detailData
=
_
.
assign
(
detailData
,
{
...
...
apps/activity/views/action/share-buy/share-detail.hbs
View file @
1a5f192
...
...
@@ -40,7 +40,13 @@
</div>
<div
class=
"info-bottom"
>
<span
class=
"share-coupon"
>
{{
detailDes
}}
</span>
<span
class=
"coupon-tip"
>
特列商品(秒杀、限定、境外、预售等)暂不支持使用优惠券。
</span>
<span
class=
"coupon-tip"
>
{{#if
goodsCoupon
}}
下方为优惠劵适用商品,也可兑换劵码后到优惠券列表产看指定商品。
{{else}}
特列商品(秒杀、限定、境外、预售等)暂不支持使用优惠券。
{{/if}}
</span>
<span
class=
"validity"
>
有效期:
{{
couponValidity
}}
</span>
</div>
...
...
public/js/activity/share-detail.page.js
View file @
1a5f192
...
...
@@ -20,14 +20,13 @@ let params = {
endTime
:
[
endTime
]
// 时间差数组
};
let
noResultHbs
=
require
(
'product/search/no-result-new.hbs'
);
let
couponSum
=
$
(
'.coupon-money'
).
find
(
'span'
).
text
(
);
let
shareData
=
{
title
:
'
发福利啦!专享优惠
速来领~'
,
title
:
'
【YOHO!BUY有货】送你'
+
couponSum
+
'元专享福利啦!
速来领~'
,
link
:
location
.
href
,
desc
:
'
来YOHO玩潮流~甄选好货等你来BUY~
'
,
desc
:
'
400+潮流品牌每日上新,等你来BUY!
'
,
imgUrl
:
'http://img11.static.yhbimg.com/yhb-img01/2017/05/10/16/011568a808f9b10e098b6542d3a8cb3d6b.png'
};
let
appVersion
,
link
;
...
...
@@ -136,7 +135,7 @@ function productData() {
success
:
function
(
data
)
{
if
(
data
===
''
||
(
data
.
list
&&
data
.
list
.
length
<=
0
))
{
$container
.
html
(
noResultHbs
())
;
return
false
;
}
else
{
$container
.
append
(
data
);
}
...
...
Please
register
or
login
to post a comment