Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
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
梁志锋
9 years ago
Commit
e00b58199f82bc67fbca791f4a589ed8708827da
1 parent
5b5f2a78
yas版本升级
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
15 deletions
static/js/common.js
static/js/product/detail/like.js
static/js/product/list.js
static/js/common.js
View file @
e00b581
...
...
@@ -158,6 +158,16 @@ function reMarginFooter(fixedElement) {
$footer
.
removeClass
(
'hide'
);
}());
(
function
(
w
,
d
,
s
,
j
,
f
){
w
[
'YohoAcquisitionObject'
]
=
f
;
w
[
f
]
=
function
(){
w
[
f
].
p
=
arguments
;};
var
a
=
d
.
createElement
(
s
);
var
m
=
d
.
getElementsByTagName
(
s
)[
0
];
a
.
async
=
1
;
a
.
src
=
j
;
m
.
parentNode
.
insertBefore
(
a
,
m
);
})(
window
,
document
,
'script'
,
'http://cdn.yoho.cn/yas-jssdk/1.0.13.6.3/yas-debug.js'
,
'_yas'
);
(
function
()
{
var
uid
=
getUid
();
...
...
@@ -166,7 +176,7 @@ function reMarginFooter(fixedElement) {
window
.
_ozuid
=
uid
;
//暴露ozuid
if
(
window
.
_yas
)
{
window
.
_yas
(
1
*
new
Date
(),
'1.0.13.
2'
,
'yohobuy_m'
,
uid
,
''
);
window
.
_yas
(
1
*
new
Date
(),
'1.0.13.
6.3'
,
'yohobuy_m'
,
uid
,
''
,
''
);
}
}());
...
...
static/js/product/detail/like.js
View file @
e00b581
...
...
@@ -30,6 +30,7 @@ if (likeHammer) {
opt
=
'ok'
;
favorite
=
1
;
}
$
.
ajax
({
type
:
'POST'
,
url
:
'/product/opt/favoriteProduct'
,
...
...
@@ -51,19 +52,19 @@ if (likeHammer) {
}
else
{
tip
.
show
(
data
.
message
);
}
// 统计代码:用于统计用户加入或取消商品收藏的动作
if
(
window
.
_yas
)
{
window
.
_yas
.
sendCustomInfo
({
pd
:
productId
,
fa
:
favorite
});
}
},
error
:
function
()
{
tip
.
show
(
'网络断开连接了~'
);
}
});
// 统计代码:用于统计用户加入或取消商品收藏的动作
if
(
window
.
_yas
)
{
window
.
_yas
.
sendCustomInfo
({
pd
:
productId
,
fa
:
favorite
},
true
);
}
});
}
...
...
@@ -75,7 +76,7 @@ if (addToCartHammer) {
window
.
_yas
.
sendCustomInfo
({
pd
:
productId
,
by
:
1
});
}
,
false
);
}
});
}
...
...
static/js/product/list.js
View file @
e00b581
...
...
@@ -8,6 +8,7 @@ var $ = require('jquery'),
Hammer
=
require
(
'yoho.hammer'
),
lazyLoad
=
require
(
'yoho.lazyload'
);
//品牌页参数
var
$brandHeader
=
$
(
'#brand-header'
),
$introBox
=
$
(
'#intro-box'
);
...
...
@@ -231,6 +232,25 @@ function search(opt) {
loading
.
hideLoadingMask
();
window
.
rePosFooter
();
// 用于统计点击了商品列表的第几个商品,序号从1开始计算。
if
(
window
.
_yas
)
{
switch
(
navType
)
{
case
'newest'
:
window
.
_yas
(
1
*
new
Date
(),
'1.0.13.6.3'
,
'yohobuy_m'
,
window
.
_ozuid
,
''
,
'.new-goods .good-info .good-detail-img .good-thumb'
);
break
;
case
'price'
:
window
.
_yas
(
1
*
new
Date
(),
'1.0.13.6.3'
,
'yohobuy_m'
,
window
.
_ozuid
,
''
,
'.new-goods .good-info .good-detail-img .good-thumb'
);
break
;
case
'discount'
:
window
.
_yas
(
1
*
new
Date
(),
'1.0.13.6.3'
,
'yohobuy_m'
,
window
.
_ozuid
,
''
,
'.new-goods .good-info .good-detail-img .good-thumb'
);
break
;
}
}
}
});
...
...
@@ -455,8 +475,3 @@ $listNav.on('touchstart', 'li', function() {
$listNav
.
find
(
'li'
).
removeClass
(
'bytouch'
);
});
// 用于统计点击了商品列表的第几个商品,序号从1开始计算。
if
(
window
.
_yas
)
{
window
.
_yas
(
1
*
new
Date
(),
'1.0.13.2'
,
'yohobuy_m'
,
window
.
_ozuid
,
''
,
'#goods-container >div >div .good-thumb >img'
);
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment