Authored by zhangxiaoru

关闭猜你想找

... ... @@ -262,19 +262,20 @@ const getAllBrandNames = () => {
* 获取猜你想找
**/
const getWantSearch = (uid) => {
return api.get('', {
method: 'app.search.getSomeTerms',
uid: uid
}, {
cache: true
}).then((result) => {
if (result && result.code === 200) {
return result.data;
} else {
logger.error('Hot Search return code is not 200');
return {};
}
});
return [];
// return api.get('', {
// method: 'app.search.getSomeTerms',
// uid: uid
// }, {
// cache: true
// }).then((result) => {
// if (result && result.code === 200) {
// return result.data;
// } else {
// logger.error('Hot Search return code is not 200');
// return {};
// }
// });
};
/**
... ...
... ... @@ -131,41 +131,41 @@ function inputAction() {
C_ID = window._ChannelVary[window.cookie('_Channel')];
function yasRequest(PRD_ID, PRD_NUM, ACTION_ID) {
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_CHOOSE_FOR_YOU_Y',
param: JSON.stringify({
REC_POSE: 100016,
REC_ID: RECID,
PRD_ID: PRD_ID,
PRD_NUM: PRD_NUM,
C_ID: C_ID,
ACTION_ID: ACTION_ID
})
}, true);
}
}
// function yasRequest(PRD_ID, PRD_NUM, ACTION_ID) {
// if (window._yas && window._yas.sendCustomInfo) {
// window._yas.sendCustomInfo({
// op: 'YB_CHOOSE_FOR_YOU_Y',
// param: JSON.stringify({
// REC_POSE: 100016,
// REC_ID: RECID,
// PRD_ID: PRD_ID,
// PRD_NUM: PRD_NUM,
// C_ID: C_ID,
// ACTION_ID: ACTION_ID
// })
// }, true);
// }
// }
// 猜你想找展示时埋点
$('.want-search').find('li').each(function() {
// $('.want-search').find('li').each(function() {
querys = $(this).find('a').html();
// querys = $(this).find('a').html();
if (querys) {
prdids.push(querys);
}
});
// if (querys) {
// prdids.push(querys);
// }
// });
prdLoad = JSON.stringify(prdids).replace(/\[|\]|\"|/g, '');
// prdLoad = JSON.stringify(prdids).replace(/\[|\]|\"|/g, '');
if (prdLoad) {
setTimeout(function() {
yasRequest(encodeURIComponent(prdLoad), prdids.length, 0);
}, 200);
}
// if (prdLoad) {
// setTimeout(function() {
// yasRequest(encodeURIComponent(prdLoad), prdids.length, 0);
// }, 200);
// }
// 热门搜索、最近搜索事件
$('.search-items .search-group').on('click', 'li', function(event) {
... ... @@ -185,14 +185,15 @@ $('.search-items .search-group').on('click', 'li', function(event) {
} else if ($(this).parents('.search-group').hasClass('hot-search-new')) {
POS_ID = 2;
FLR_INDEX = 2;
} else {
var PRD_NUM = $(this).index() + 1;
}
// else {
// var PRD_NUM = $(this).index() + 1;
POS_ID = 3;
FLR_INDEX = 3;
// POS_ID = 3;
// FLR_INDEX = 3;
yasRequest(query, PRD_NUM, 1);
}
// yasRequest(query, PRD_NUM, 1);
// }
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
... ...