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
lijing
8 years ago
Commit
03657915f44ce48c704d3575e211ecd9cffd962b
1 parent
b4f27729
增加埋点
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
doraemon/views/partial/resources/banner.hbs
doraemon/views/partial/resources/thumb-row.hbs
public/js/home/index.page.js
doraemon/views/partial/resources/banner.hbs
View file @
0365791
{{#if
singleOne
}}
{{#
data
}}
<div
class=
"banner-list"
>
<a
href=
"
{{
url
}}
"
>
<a
href=
"
{{
url
}}
"
id=
"
{{
..
/
template_id
}}
"
name=
"
{{
..
/
template_intro
}}
"
>
<img
src=
"
{{
image2
src
w
=
640
h
=
200
q
=
60
mode
=
3
}}
"
alt=
""
>
</a>
</div>
...
...
@@ -11,7 +11,7 @@
<ul
class=
"banner-list swiper-wrapper clearfix"
>
{{#
data
}}
<li
class=
"swiper-slide"
>
<a
href=
"
{{
url
}}
"
>
<a
href=
"
{{
url
}}
"
id=
"
{{
..
/
template_id
}}
"
name=
"
{{
..
/
template_intro
}}
"
>
<img
src=
"
{{
image2
src
w
=
640
h
=
200
q
=
60
mode
=
3
}}
"
alt=
""
>
</a>
</li>
...
...
doraemon/views/partial/resources/thumb-row.hbs
View file @
0365791
<div
class=
"thumb-row"
>
{{#
data
}}
<a
href=
"
{{
url
}}
"
>
<a
href=
"
{{
url
}}
"
id=
"
{{
..
/
template_id
}}
"
name=
"
{{
..
/
template_intro
}}
"
>
<div
class=
"thumb-row-box"
style=
"background-image:url(
{{
image2
src
w
=
275
h
=
160
q
=
60
}}
)"
></div>
</a>
{{/
data
}}
...
...
public/js/home/index.page.js
View file @
0365791
...
...
@@ -43,15 +43,18 @@ $('.yoho-page').on('touchstart', '.list-item, .type-item, .order-title', functio
// 埋点
$
(
'.res-c'
).
on
(
'click'
,
'a'
,
function
()
{
var
$this
=
$
(
this
);
var
index
=
$this
.
index
()
+
1
;
var
pIndex
=
$this
.
parent
(
'div'
).
index
()
+
1
;
var
url
=
$this
.
attr
(
'href'
);
var
name
=
$this
.
attr
(
'name'
);
var
id
=
$this
.
attr
(
'id'
);
window
.
_yas
.
sendCustomInfo
({
// op: 'YB_CHOOSE_FOR_YOU_Y',
// appop: isAppOp ? 'YB_CHOOSE_FOR_YOU' : '', // app内打开wap的埋点场合
// param: JSON.stringify(parameter),
// REC_POSE: RECPOSE,
// PRD_ID: $(this).closest('.good-info').data('id'),
// PRD_NUM: index % pageNum === 0 ? pageNum : index % pageNum,
// ACTION_ID: 1,
// PAGE_NUM: Math.ceil(index / pageNum)
I_INDEX
:
index
,
F_URL
:
encodeURIComponent
(
url
),
F_NAME
:
name
,
F_INDEX
:
pIndex
,
F_ID
:
id
},
true
);
});
...
...
Please
register
or
login
to post a comment