Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
郝肖肖
9 years ago
Commit
d528ed1215d6b018943fde12fce7d23d883759d4
1 parent
96d9d6b2
为您优选公共方法
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
web-static/js/common.js
web-static/js/common.js
View file @
d528ed1
...
...
@@ -7,6 +7,8 @@ var $ = require('yoho.jquery');
var
$body
=
$
(
'body'
);
//为您优选-40位随机数指纹请求id
var
RECID
=
new
Date
().
getTime
()
+
'pc_wwwyohobuycom_'
+
Math
.
floor
(
Math
.
random
()
*
10
);
require
(
'./footer'
);
...
...
@@ -183,6 +185,53 @@ $.extend({
});
}());
//为您优选埋点 http://redmine.yoho.cn/issues/10117
function
givePoint
(
parameter
)
{
var
CID
=
1
;
if
(
!
window
.
_yas
.
sendCustomInfo
)
{
return
false
;
}
//男:1,女:2,潮童:3,创意生活:4
switch
(
cookie
(
'_Channel'
))
{
case
'boys'
:
CID
=
1
;
break
;
case
'girls'
:
CID
=
2
;
break
;
case
'kids'
:
CID
=
3
;
break
;
case
'lifestyle'
:
CID
=
4
;
break
;
}
parameter
=
$
.
extend
({
'REC_POSE'
:
120003
,
'REC_ID'
:
RECID
,
'PRD_ID'
:
''
,
'PRD_NUM'
:
0
,
'C_ID'
:
CID
,
'ACTION_ID'
:
0
,
'page_num'
:
1
},
parameter
);
console
.
log
({
'op'
:
'YB_CHOOSE_FOR_YOU_Y'
,
'uid'
:
getUid
(),
'param'
:
parameter
},
'yas==='
);
window
.
_yas
.
sendCustomInfo
({
'op'
:
'YB_CHOOSE_FOR_YOU_Y'
,
'uid'
:
getUid
(),
'param'
:
parameter
},
true
);
}
window
.
cookie
=
cookie
;
window
.
setCookie
=
setCookie
;
...
...
@@ -194,3 +243,5 @@ window.getUid = getUid;
window
.
getShoppingKey
=
getShoppingKey
;
window
.
queryString
=
queryString
;
window
.
givePoint
=
givePoint
;
...
...
Please
register
or
login
to post a comment