123456789101112131415161718192021222324252627282930313233343536373839404142 |
- export default {
- methods: {
- getNewsItemLink(newsItem) {
- let link;
- if(newsItem.category.alias == "articles") {
- link = {
- name: 'articles-alias',
- params: { alias: newsItem.alias }
- }
- }
- else if(newsItem.category.alias == "slushay") {
- link = {
- name: 'podcasts-alias',
- params: { alias: newsItem.alias }
- }
- }
- else if(newsItem.category.parent && newsItem.category.parent.alias == "video") {
- link = {
- name: 'video-category-alias',
- params: {
- category: newsItem.category.alias,
- alias: newsItem.alias
- }
- }
- }
- else link = {
- name: 'news-category-alias',
- params: {
- category: newsItem.category.alias,
- alias: newsItem.alias
- }
- }
- if (newsItem.token !== '' && typeof newsItem.token !== 'undefined') {
- link.query = { erid: newsItem.token }
- }
- return link
- },
- }
- }
|