Authored by 周少峰

add pinyou

... ... @@ -18,6 +18,16 @@ var _gaq = _gaq || [];
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
// 新品友代码
(function(w,d,s,l,a){
w._CommandName_=l;w[l]=w[l]||function(){(w[l].q=w[l].q||[]).push(arguments);
w[l].track = function(){(w[l].q[w[l].q.length-1].t=[]).push(arguments)};return w[l]},w[l].a=a,w[l].l=1*new Date();
var c = d.createElement(s);c.async=1;
c.src='//fm.ipinyou.com/j/t/a.js';
var h = d.getElementsByTagName(s)[0];h.parentNode.insertBefore(c, h);
})(window,document,'script','py','MC..o8vMMWxEXDCiqYckD81lUX');
py('set','user',{'id':'0'});
py('event','viewPage');
}
if (window.addEventListener) {
window.addEventListener('load', async_load, false);
... ...
... ... @@ -215,6 +215,16 @@ function isLogin() {
}
}
// 品友
function addPyEvent(eventName, val) {
if (typeof window.py === 'function') {
window.py('event', eventName, val);
} else {
setTimeout(function() {
addPyEvent(eventName, val);
}, 3000);
}
}
window.cookie = cookie;
window.setCookie = setCookie;
... ... @@ -238,6 +248,7 @@ window.registerUrl = registerUrl;
window.jumpUrl = jumpUrl;
window.once = once;
window.addPyEvent = addPyEvent;
require('./header');
require('./footer');
... ...
... ... @@ -88,6 +88,8 @@ $(function() {
// 关键词搜索结果页展示时
yas.givePoint(opt, loadYas);
// 品友
window.addPyEvent('viewSearch', qs.query || '');
});
// 点击搜索列表商品
... ...