|
@@ -267,7 +267,7 @@ export default { |
|
@@ -267,7 +267,7 @@ export default { |
267
|
|
267
|
|
268
|
// create watcher for list data
|
268
|
// create watcher for list data
|
269
|
this.watchList = [];
|
269
|
this.watchList = [];
|
270
|
- ['resource.url', 'topList', 'recommend'].forEach(key => {
|
270
|
+ ['videoResource.url', 'resource.url', 'topList', 'recommend'].forEach(key => {
|
271
|
this.watchList.push(this.$watch(key, val => {
|
271
|
this.watchList.push(this.$watch(key, val => {
|
272
|
if (val) {
|
272
|
if (val) {
|
273
|
this.listDataDirty = true;
|
273
|
this.listDataDirty = true;
|
|
@@ -432,18 +432,53 @@ export default { |
|
@@ -432,18 +432,53 @@ export default { |
432
|
* 2.P_PARAM:当前页面资源位code;
|
432
|
* 2.P_PARAM:当前页面资源位code;
|
433
|
* 3.PRD_ID:商品ID;
|
433
|
* 3.PRD_ID:商品ID;
|
434
|
* 4.ACTION_URL:资源位跳转URL;
|
434
|
* 4.ACTION_URL:资源位跳转URL;
|
|
|
435
|
+ * 5.F_ID:楼层唯一id;
|
|
|
436
|
+ * 6.F_NAME:楼层名称;
|
|
|
437
|
+ * 7.F_INDEX:楼层顺序号,从1开始递增;
|
|
|
438
|
+ * 8.I_INDEX:楼层内部顺序号,从1开始递增;
|
435
|
*/
|
439
|
*/
|
|
|
440
|
+ const { template_id, template_name } = this.resource;
|
|
|
441
|
+ let yasParams = {
|
|
|
442
|
+ P_NAME: 'XY_UFOProductDetail',
|
|
|
443
|
+ P_PARAM: this.resourceContentCode,
|
|
|
444
|
+ PRD_ID: this.productId,
|
|
|
445
|
+ ACTION_URL: this.resource.url,
|
|
|
446
|
+ };
|
|
|
447
|
+
|
|
|
448
|
+ if (template_id) {
|
|
|
449
|
+ yasParams = {...yasParams, F_ID: template_id, F_NAME: template_name, F_INDEX: 1, I_INDEX: 1};
|
|
|
450
|
+ }
|
436
|
this.yasTargets.banner = {
|
451
|
this.yasTargets.banner = {
|
437
|
el: {
|
452
|
el: {
|
438
|
offsetTop: this.$refs.resourceImg.offsetTop,
|
453
|
offsetTop: this.$refs.resourceImg.offsetTop,
|
439
|
offsetHeight: this.$refs.resourceImg.offsetHeight,
|
454
|
offsetHeight: this.$refs.resourceImg.offsetHeight,
|
440
|
},
|
455
|
},
|
441
|
- yasParams: {
|
456
|
+ yasParams
|
|
|
457
|
+ };
|
|
|
458
|
+ }
|
|
|
459
|
+
|
|
|
460
|
+ if (this.$refs.videoResourceImg && this.videoResource.url && (!this.yasTargets.banner || force)) {
|
|
|
461
|
+ const { template_id, template_name } = this.videoResource;
|
|
|
462
|
+ let yasParams = {
|
442
|
P_NAME: 'XY_UFOProductDetail',
|
463
|
P_NAME: 'XY_UFOProductDetail',
|
443
|
- P_PARAM: this.resourceContentCode,
|
|
|
444
|
PRD_ID: this.productId,
|
464
|
PRD_ID: this.productId,
|
445
|
- ACTION_URL: this.resource.url,
|
465
|
+ ACTION_URL: this.videoResource.url,
|
|
|
466
|
+ };
|
|
|
467
|
+
|
|
|
468
|
+ if (template_id) {
|
|
|
469
|
+ yasParams = {...yasParams,
|
|
|
470
|
+ F_ID: template_id,
|
|
|
471
|
+ F_NAME: template_name,
|
|
|
472
|
+ F_INDEX: 2,
|
|
|
473
|
+ I_INDEX: 2,
|
|
|
474
|
+ P_PARAM: this.resourceContentCode};
|
446
|
}
|
475
|
}
|
|
|
476
|
+ this.yasTargets.bannerVideo = {
|
|
|
477
|
+ el: {
|
|
|
478
|
+ offsetTop: this.$refs.videoResourceImg.offsetTop,
|
|
|
479
|
+ offsetHeight: this.$refs.videoResourceImg.offsetHeight,
|
|
|
480
|
+ },
|
|
|
481
|
+ yasParams
|
447
|
};
|
482
|
};
|
448
|
}
|
483
|
}
|
449
|
|
484
|
|
|
@@ -843,13 +878,17 @@ export default { |
|
@@ -843,13 +878,17 @@ export default { |
843
|
return;
|
878
|
return;
|
844
|
}
|
879
|
}
|
845
|
|
880
|
|
846
|
- const url = this.resource.url;
|
881
|
+ const {url, template_id, template_name} = this.resource;
|
847
|
|
882
|
|
848
|
/**
|
883
|
/**
|
849
|
* 商品详情页中的资源位点击
|
884
|
* 商品详情页中的资源位点击
|
850
|
* XY_UFO_GDS_DT_BANNER_C
|
885
|
* XY_UFO_GDS_DT_BANNER_C
|
851
|
* 1.PRD_ID:商品ID
|
886
|
* 1.PRD_ID:商品ID
|
852
|
* 2.ACTION_URL:跳转的URL
|
887
|
* 2.ACTION_URL:跳转的URL
|
|
|
888
|
+ * 3.F_ID:楼层唯一id;
|
|
|
889
|
+ * 4.F_NAME:楼层名称;
|
|
|
890
|
+ * 5.F_INDEX:楼层顺序号,从1开始递增;
|
|
|
891
|
+ * 6.I_INDEX:楼层内部顺序号,从1开始递增;
|
853
|
*/
|
892
|
*/
|
854
|
this.$store.dispatch('reportYas', {
|
893
|
this.$store.dispatch('reportYas', {
|
855
|
params: {
|
894
|
params: {
|
|
@@ -857,6 +896,10 @@ export default { |
|
@@ -857,6 +896,10 @@ export default { |
857
|
param: {
|
896
|
param: {
|
858
|
PRD_ID: this.productId,
|
897
|
PRD_ID: this.productId,
|
859
|
ACTION_URL: url,
|
898
|
ACTION_URL: url,
|
|
|
899
|
+ F_ID: template_id,
|
|
|
900
|
+ F_NAME: template_name,
|
|
|
901
|
+ F_INDEX: 1,
|
|
|
902
|
+ I_INDEX: 1
|
860
|
},
|
903
|
},
|
861
|
}
|
904
|
}
|
862
|
});
|
905
|
});
|
|
@@ -928,6 +971,27 @@ export default { |
|
@@ -928,6 +971,27 @@ export default { |
928
|
},
|
971
|
},
|
929
|
onVideoPlay() {
|
972
|
onVideoPlay() {
|
930
|
this.$refs.videoPlayer.parentHandleclick();
|
973
|
this.$refs.videoPlayer.parentHandleclick();
|
|
|
974
|
+
|
|
|
975
|
+ const {url, template_id, template_name} = this.videoResource;
|
|
|
976
|
+ let param = {
|
|
|
977
|
+ PRD_ID: this.productId,
|
|
|
978
|
+ ACTION_URL: url,
|
|
|
979
|
+ };
|
|
|
980
|
+
|
|
|
981
|
+ if (template_id) {
|
|
|
982
|
+ param = {...param,
|
|
|
983
|
+ F_ID: template_id,
|
|
|
984
|
+ F_NAME: template_name,
|
|
|
985
|
+ F_INDEX: 2,
|
|
|
986
|
+ I_INDEX: 2
|
|
|
987
|
+ };
|
|
|
988
|
+ }
|
|
|
989
|
+ this.$store.dispatch('reportYas', {
|
|
|
990
|
+ params: {
|
|
|
991
|
+ appop: 'XY_UFO_GDS_DT_BANNER_C',
|
|
|
992
|
+ param,
|
|
|
993
|
+ }
|
|
|
994
|
+ });
|
931
|
}
|
995
|
}
|
932
|
},
|
996
|
},
|
933
|
|
997
|
|