Showing
2 changed files
with
34 additions
and
4 deletions
@@ -4,7 +4,11 @@ | @@ -4,7 +4,11 @@ | ||
4 | <div class="articles-container"> | 4 | <div class="articles-container"> |
5 | <p class="title">推荐搭配({{articleTotal}})</p> | 5 | <p class="title">推荐搭配({{articleTotal}})</p> |
6 | <ul> | 6 | <ul> |
7 | - <li v-for="item in articleList" @click="showAricleImages" :data-id="item.articleId" :data-index="item.imageindex"> | 7 | + <li v-for="(item, index) in articleList" |
8 | + @click="showAricleImages" | ||
9 | + :data-id="item.articleId" | ||
10 | + :data-index="item.imageindex" | ||
11 | + :data-idx="index"> | ||
8 | <img v-lazy="item.coverImage"> | 12 | <img v-lazy="item.coverImage"> |
9 | </li> | 13 | </li> |
10 | </ul> | 14 | </ul> |
@@ -44,9 +48,6 @@ export default { | @@ -44,9 +48,6 @@ export default { | ||
44 | return this.listdata.list; | 48 | return this.listdata.list; |
45 | } | 49 | } |
46 | }, | 50 | }, |
47 | - activated() { | ||
48 | - | ||
49 | - }, | ||
50 | methods: { | 51 | methods: { |
51 | ...mapActions(['fetchGrassArticleImages']), | 52 | ...mapActions(['fetchGrassArticleImages']), |
52 | showAricleImages(e) { // 点击推荐小图展示文章内大图 | 53 | showAricleImages(e) { // 点击推荐小图展示文章内大图 |
@@ -61,6 +62,29 @@ export default { | @@ -61,6 +62,29 @@ export default { | ||
61 | this.initialIndex = i; | 62 | this.initialIndex = i; |
62 | } | 63 | } |
63 | }).show(); | 64 | }).show(); |
65 | + | ||
66 | + // yas | ||
67 | + /** | ||
68 | + * 图片点击时 | ||
69 | + * XY_GDS_DT_ARTICLE_C | ||
70 | + * 1.PRD_SKN:商品SKN | ||
71 | + * 2.ARTICLE:文章ID | ||
72 | + * 3.I_INDEX:顺序号 | ||
73 | + */ | ||
74 | + let articleId = e.currentTarget.dataset.id; | ||
75 | + let index = e.currentTarget.dataset.idx; | ||
76 | + let param = { | ||
77 | + PRD_SKN: this.productId, | ||
78 | + ARTICLE: articleId, | ||
79 | + I_INDEX: +index + 1 | ||
80 | + }; | ||
81 | + | ||
82 | + this.$store.dispatch('reportYas', { | ||
83 | + params: { | ||
84 | + appop: 'XY_GDS_DT_ARTICLE_C', | ||
85 | + param, | ||
86 | + } | ||
87 | + }); | ||
64 | }, | 88 | }, |
65 | } | 89 | } |
66 | }; | 90 | }; |
-
Please register or login to post a comment