...
|
...
|
@@ -267,7 +267,7 @@ export default { |
|
|
|
|
|
// create watcher for list data
|
|
|
this.watchList = [];
|
|
|
['resource.url', 'topList', 'recommend'].forEach(key => {
|
|
|
['videoResource.url', 'resource.url', 'topList', 'recommend'].forEach(key => {
|
|
|
this.watchList.push(this.$watch(key, val => {
|
|
|
if (val) {
|
|
|
this.listDataDirty = true;
|
...
|
...
|
@@ -432,18 +432,53 @@ export default { |
|
|
* 2.P_PARAM:当前页面资源位code;
|
|
|
* 3.PRD_ID:商品ID;
|
|
|
* 4.ACTION_URL:资源位跳转URL;
|
|
|
* 5.F_ID:楼层唯一id;
|
|
|
* 6.F_NAME:楼层名称;
|
|
|
* 7.F_INDEX:楼层顺序号,从1开始递增;
|
|
|
* 8.I_INDEX:楼层内部顺序号,从1开始递增;
|
|
|
*/
|
|
|
const { template_id, template_name } = this.resource;
|
|
|
let yasParams = {
|
|
|
P_NAME: 'XY_UFOProductDetail',
|
|
|
P_PARAM: this.resourceContentCode,
|
|
|
PRD_ID: this.productId,
|
|
|
ACTION_URL: this.resource.url,
|
|
|
};
|
|
|
|
|
|
if (template_id) {
|
|
|
yasParams = {...yasParams, F_ID: template_id, F_NAME: template_name, F_INDEX: 1, I_INDEX: 1};
|
|
|
}
|
|
|
this.yasTargets.banner = {
|
|
|
el: {
|
|
|
offsetTop: this.$refs.resourceImg.offsetTop,
|
|
|
offsetHeight: this.$refs.resourceImg.offsetHeight,
|
|
|
},
|
|
|
yasParams: {
|
|
|
yasParams
|
|
|
};
|
|
|
}
|
|
|
|
|
|
if (this.$refs.videoResourceImg && this.videoResource.url && (!this.yasTargets.banner || force)) {
|
|
|
const { template_id, template_name } = this.videoResource;
|
|
|
let yasParams = {
|
|
|
P_NAME: 'XY_UFOProductDetail',
|
|
|
P_PARAM: this.resourceContentCode,
|
|
|
PRD_ID: this.productId,
|
|
|
ACTION_URL: this.resource.url,
|
|
|
ACTION_URL: this.videoResource.url,
|
|
|
};
|
|
|
|
|
|
if (template_id) {
|
|
|
yasParams = {...yasParams,
|
|
|
F_ID: template_id,
|
|
|
F_NAME: template_name,
|
|
|
F_INDEX: 2,
|
|
|
I_INDEX: 2,
|
|
|
P_PARAM: this.resourceContentCode};
|
|
|
}
|
|
|
this.yasTargets.bannerVideo = {
|
|
|
el: {
|
|
|
offsetTop: this.$refs.videoResourceImg.offsetTop,
|
|
|
offsetHeight: this.$refs.videoResourceImg.offsetHeight,
|
|
|
},
|
|
|
yasParams
|
|
|
};
|
|
|
}
|
|
|
|
...
|
...
|
@@ -843,13 +878,17 @@ export default { |
|
|
return;
|
|
|
}
|
|
|
|
|
|
const url = this.resource.url;
|
|
|
const {url, template_id, template_name} = this.resource;
|
|
|
|
|
|
/**
|
|
|
* 商品详情页中的资源位点击
|
|
|
* XY_UFO_GDS_DT_BANNER_C
|
|
|
* 1.PRD_ID:商品ID
|
|
|
* 2.ACTION_URL:跳转的URL
|
|
|
* 3.F_ID:楼层唯一id;
|
|
|
* 4.F_NAME:楼层名称;
|
|
|
* 5.F_INDEX:楼层顺序号,从1开始递增;
|
|
|
* 6.I_INDEX:楼层内部顺序号,从1开始递增;
|
|
|
*/
|
|
|
this.$store.dispatch('reportYas', {
|
|
|
params: {
|
...
|
...
|
@@ -857,6 +896,10 @@ export default { |
|
|
param: {
|
|
|
PRD_ID: this.productId,
|
|
|
ACTION_URL: url,
|
|
|
F_ID: template_id,
|
|
|
F_NAME: template_name,
|
|
|
F_INDEX: 1,
|
|
|
I_INDEX: 1
|
|
|
},
|
|
|
}
|
|
|
});
|
...
|
...
|
@@ -928,6 +971,27 @@ export default { |
|
|
},
|
|
|
onVideoPlay() {
|
|
|
this.$refs.videoPlayer.parentHandleclick();
|
|
|
|
|
|
const {url, template_id, template_name} = this.videoResource;
|
|
|
let param = {
|
|
|
PRD_ID: this.productId,
|
|
|
ACTION_URL: url,
|
|
|
};
|
|
|
|
|
|
if (template_id) {
|
|
|
param = {...param,
|
|
|
F_ID: template_id,
|
|
|
F_NAME: template_name,
|
|
|
F_INDEX: 2,
|
|
|
I_INDEX: 2
|
|
|
};
|
|
|
}
|
|
|
this.$store.dispatch('reportYas', {
|
|
|
params: {
|
|
|
appop: 'XY_UFO_GDS_DT_BANNER_C',
|
|
|
param,
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
|
...
|
...
|
|