Authored by 李奇

fixed:tf-goods组件修改

... ... @@ -65,12 +65,16 @@ export default {
},
methods: {
report(param) {
const prefix = this.yoho.isiOS ? 'i' : (this.yoho.isAndroid ? 'a' : '');
_.each(param, item => {
if (this.pageNameMap[item.P_NAME]) {
item.P_NAME = this.pageNameMap[item.P_NAME];
}
item.P_NAME = `${prefix}${item.P_NAME}`;
});
console.log('<<<<< report >>>>>>>', param);
this.$store.dispatch(REPORT_YAS, {
params: {
appop: 'YB_SHOW_EVENT',
... ... @@ -97,12 +101,13 @@ export default {
switch (reportData.template_name) {
case 'twoPicture':
param = [];
_.each(reportData.data.list, item => {
_.each(reportData.data.list, (item, idx) => {
param.push({
P_NAME: this.$route.name,
F_NAME: reportData.template_name,
F_ID: reportData.template_id,
F_INDEX: index,
I_INDEX: idx + 1,
ACTION_URL: item.url
});
});
... ... @@ -115,7 +120,7 @@ export default {
case 'tfGoodsList':
// 楼层内存在多个item, 交给子组件各自检测
let visible = component.checkReqFromParent(isInit);
let visible = component.checkReqFromParent();
if (visible.length) {
param = [];
_.each(visible, item => {
... ... @@ -135,6 +140,7 @@ export default {
F_NAME: reportData.template_name,
F_ID: reportData.template_id,
F_INDEX: index,
I_INDEX: 1,
ACTION_URL: reportData.data.list[0].url
};
break;
... ...
... ... @@ -140,10 +140,10 @@ export default {
// 用于检测楼层内部item的曝光状态, 暴露给父组件调用
checkReqFromParent(isInit) {
// isInit为true时重置item的显示状态重新检测
if (isInit) {
_.each(this.itemVisibleStatus, (v, k) => this.itemVisibleStatus[k] = false);
}
// 重置item的显示状态重新检测
_.each(this.itemVisibleStatus, (v, k) => {
this.itemVisibleStatus[k] = false
});
let rect;
let isVisible;
... ...