Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-community-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
6 years ago
Commit
e45229333e82d31bae5d758f0c77eeeec7d3fda6
1 parent
dda9768b
report
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
5 deletions
apps/entry-client.js
apps/pages/article/article-detail.vue
apps/pages/article/components/article/article-item2.vue
apps/pages/userpage/components/scroll-reveal.vue
apps/entry-client.js
View file @
e452293
...
...
@@ -149,6 +149,21 @@ router.onReady(() => {
});
}
if
(
to
.
query
.
report_yas
)
{
let
reportParam
=
to
.
query
.
report_param
||
{};
store
.
dispatch
(
'reportYas'
,
{
params
:
{
appop
:
to
.
query
.
report_yas
,
param
:
{
...
reportParam
,
FP_NAME
:
from
.
name
,
FP_PARAM
:
from
.
params
[
getReportParamsKey
(
from
.
name
)],
}
}
});
}
return
next
();
}
catch
(
e
)
{
store
.
dispatch
(
'reportError'
,
{
error
:
e
});
...
...
apps/pages/article/article-detail.vue
View file @
e452293
...
...
@@ -83,6 +83,8 @@ export default {
if (+this.$route.params.id !== this.id) {
this.id = +this.$route.params.id;
this.init();
} else {
this.reportProductShow(this.articleInfo);
}
},
async serverPrefetch() {
...
...
@@ -162,6 +164,8 @@ export default {
}, 500);
}
this.reportProductShow(get(res, 'data.detailList[0]'));
if (this.share && this.setShareData) {
this.setShareData(get(res, 'data.detailList[0]'));
}
...
...
@@ -222,6 +226,36 @@ export default {
this.$refs.detailNote && ($detail = this.$refs.detailNote);
$detail.$refs.header && $detail.$refs.header.onBack();
},
reportProductShow(article) {
const productList = article.productList || [];
if (!productList.length) {
return;
}
let name = this.$yoho.isiOS ? 'iFP_ArticleList' : 'aFP_ArticleList';
this.$store.dispatch('reportYas', {
params: {
appop: YAS.eventName.show,
param: {
DATA: [
...productList.map((p, i) => {
return {
P_NAME: name,
P_PARAM: this.id,
I_INDEX: i,
ARTICLE_ID: this.id,
PRD_SKN: p.productSkn,
ATR_TYPE: article.sort == 2 ? 1 : 2,
PRD_TYPE: p.collage_activity_id ? 'collage_info' : ''
};
})
],
}
}
});
}
},
components: {
...
...
apps/pages/article/components/article/article-item2.vue
View file @
e452293
...
...
@@ -120,6 +120,13 @@ export default {
name: 'article',
params: {
id: this.data.articleId
},
query: {
report_yas: YAS.eventName.detailShow,
report_param: {
ART_ID: this.data.articleId,
ATR_TYPE: this.data.sort === 2 ? 1 : 2
}
}
});
this.reportClickArticle();
...
...
apps/pages/userpage/components/scroll-reveal.vue
View file @
e452293
...
...
@@ -14,6 +14,7 @@
import ArticleItem from './author-article-item';
import {assign, get, forEach} from 'lodash';
import {getArticleImageSize} from 'utils/image-handler';
import YAS from 'utils/yas-constants';
export default {
data() {
...
...
@@ -159,15 +160,20 @@ export default {
}
});
},
toArticle({articleId}) {
let router = {
toArticle({articleId, sort}) {
this.$router.push({
name: 'article',
params: {
id: articleId
},
query: {
report_yas: YAS.eventName.detailShow,
report_param: {
ART_ID: articleId,
ATR_TYPE: sort === 2 ? 1 : 2
}
}
};
this.$router.push(router);
});
}
},
components: {
...
...
Please
register
or
login
to post a comment