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
郝肖肖
2017-03-08 18:16:21 +0800
Commit
0cf9b7037e07897f9b353b37b01cd1238e7d3f52
2 parents
9b789d30
d082c73b
Merge branch 'feature/couponOptimi' into 'release/5.5'
优惠券埋点 See merge request
!350
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
10 deletions
apps/home/views/action/coupons.hbs
public/hbs/home/coupons-list.hbs
public/js/home/coupons.page.js
apps/home/views/action/coupons.hbs
View file @
0cf9b70
...
...
@@ -9,7 +9,7 @@
{{!--coupon-list start--}}
<div
class=
"coupon-list coupon-tab1"
>
{{#
each
list
}}
<div
class=
"coupon-group"
>
<div
class=
"coupon-group"
data-coupon-id=
{{
couponId
}}
>
<div
class=
"coupon-header"
>
{{
couponDetailInfomation
}}
</div>
<div
class=
"coupon-content"
>
<div
class=
"coupon-content-group1"
>
...
...
@@ -28,7 +28,7 @@
{{#if
employbg
}}
<span
class=
"employ"
></span>
{{else
if
bestowLink
}}
<a
href=
"
{{
bestowLink
}}
"
class=
"btn"
>
立即使用
</a>
<a
href=
"
javascript:void(0);"
data-link=
"
{{
bestowLink
}}
"
class=
"btn"
>
立即使用
</a>
{{/if}}
</div>
</div>
...
...
public/hbs/home/coupons-list.hbs
View file @
0cf9b70
{{#
each
list
}}
<div
class=
"coupon-group"
>
<div
class=
"coupon-group"
data-coupon-id=
{{
couponId
}}
>
<div
class=
"coupon-header"
>
{{
couponDetailInfomation
}}
</div>
<div
class=
"coupon-content"
>
<div
class=
"coupon-content-group1"
>
...
...
@@ -10,7 +10,7 @@
<div
class=
"coupon-content-group2-table"
>
<div>
{{
couponValidity
}}
{{#if
isSoonExpire
}}
<span
class=
"coupon-soon-expire"
>
(即将到期
)
</span>
{{/if}}
{{#if
overState
}}
<span
class=
"coupon-soon-expire"
>
(
{{
overState
}}
)
</span>
{{/if}}
</div>
<div>
<div
class=
"left down info-btn"
>
详细信息
<i
class=
"iconfont"
></i></div>
...
...
@@ -18,7 +18,7 @@
{{#if
employbg
}}
<span
class=
"employ"
></span>
{{else
if
bestowLink
}}
<a
href=
"
{{
bestowLink
}}
"
class=
"btn"
>
立即使用
</a>
<a
href=
"
javascript:void(0);"
data-link=
"
{{
bestowLink
}}
"
class=
"btn"
>
立即使用
</a>
{{/if}}
</div>
</div>
...
...
@@ -26,13 +26,18 @@
</div>
</div>
<div
class=
"coupon-footer hide"
>
{{#if
brandNameLimit
}}
<p>
限品牌:
{{
brandNameLimit
}}
</p>
{{else
if
sortNameLimit
}}
<p>
限品类:
{{
sortNameLimit
}}
</p>
{{else
if
isNoLimit
}}
{{#if
isNoLimit
}}
<p>
全场通用
</p>
{{/if}}
{{#if
brandNameLimits
}}
<p>
限品牌:
{{
brandNameLimits
}}
</p>
{{/if}}
{{#if
sortNameLimits
}}
<p>
限品类:
{{
sortNameLimits
}}
</p>
{{/if}}
<p>
特例商品(秒杀、限定、境外、预售
{{#if
isDiscount
}}
、3折以下
{{/if}}{{#if
isDiscount
}}
、限量
{{/if}}
等)暂不支持使用优惠券。
</p>
{{#if
explains
}}
<p>
说明:
{{
explains
}}
</p>
{{/if}}
</div>
...
...
public/js/home/coupons.page.js
View file @
0cf9b70
...
...
@@ -106,6 +106,31 @@ $('.coupon-list').on('click', '.info-btn', function() {
$this
.
removeClass
(
'up'
).
addClass
(
'down'
);
$this
.
closest
(
'.coupon-group'
).
find
(
'.coupon-footer'
).
addClass
(
'hide'
);
}
// 优惠券埋点
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
({
op
:
'YB_COUPON_DETAIL_C'
,
param
:
JSON
.
stringify
({
C_ID
:
window
.
_ChannelVary
[
window
.
cookie
(
'_Channel'
)]
||
1
,
COUPON_ID
:
$this
.
closest
(
'.coupon-group'
).
data
(
'coupon-id'
)
})
},
true
);
});
// 立即使用
$
(
'.coupon-list'
).
on
(
'click'
,
'a.btn'
,
function
()
{
var
$this
=
$
(
this
);
// 优惠券埋点
window
.
_yas
&&
window
.
_yas
.
sendCustomInfo
({
op
:
'YB_COUPON_IMMEDIATE_USE_C'
,
param
:
JSON
.
stringify
({
C_ID
:
window
.
_ChannelVary
[
window
.
cookie
(
'_Channel'
)]
||
1
,
COUPON_ID
:
$this
.
closest
(
'.coupon-group'
).
data
(
'coupon-id'
)
})
},
true
);
document
.
location
.
href
=
$this
.
data
(
'link'
);
});
// 首屏渲染无结果判断
...
...
Please
register
or
login
to post a comment