From 04e6458376143be9f8be7af5dffd91c7b7bf7a4e Mon Sep 17 00:00:00 2001 From: iriska-gri <79623434+iriska-gri@users.noreply.github.com> Date: Mon, 25 Dec 2023 17:48:01 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B0=D0=BC=D1=8B=D0=B5=20=D0=B0=D0=BA?= =?UTF-8?q?=D1=82=D0=B8=D0=B2=D0=BD=D1=8B=D0=B5=20=D0=BF=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/front/src/components/UI/news-card.vue | 5 +- src/front/src/utils/universal_functions.js | 4 +- src/front/src/views/AboutPortalPage.vue | 93 +++++++++++++++++----- 3 files changed, 76 insertions(+), 26 deletions(-) diff --git a/src/front/src/components/UI/news-card.vue b/src/front/src/components/UI/news-card.vue index 6a9b742c8..e6cdc8ea0 100644 --- a/src/front/src/components/UI/news-card.vue +++ b/src/front/src/components/UI/news-card.vue @@ -109,6 +109,7 @@ import { baseURL } from '@/utils/axios-api' import {useAccountStore} from '@/store/AccountStore' import { axiosApiInstance } from '@/utils/axios-api' +import {splitname} from '@/utils/universal_functions' const accountStore = useAccountStore() @@ -132,9 +133,7 @@ export default { return `${doc.split(' ').slice(0, 50).join(' ')} ${t.length<50?'':'...'}` } - const splitname = (name) => { - return name.familyname + ' ' + name.name[0] + '.' + name.parentname[0]+ '.' - } + const toggleIncrementLike = (newss, scores) => { axiosApiInstance.post(`api/navigation/newscrossroad/`, {news: newss, scores: scores}).then(result => { diff --git a/src/front/src/utils/universal_functions.js b/src/front/src/utils/universal_functions.js index 24dff050d..a756bc67d 100644 --- a/src/front/src/utils/universal_functions.js +++ b/src/front/src/utils/universal_functions.js @@ -58,7 +58,9 @@ export function checkremote(filecheck){ export default str; - +export function splitname (name) { + return name.familyname + ' ' + name.name[0] + '.' + name.parentname[0]+ '.' +} export function pagecounter(){ diff --git a/src/front/src/views/AboutPortalPage.vue b/src/front/src/views/AboutPortalPage.vue index 5c3be237e..58e8aad76 100644 --- a/src/front/src/views/AboutPortalPage.vue +++ b/src/front/src/views/AboutPortalPage.vue @@ -6,7 +6,7 @@ > - 1 + {{ countvis() }} @@ -25,9 +25,10 @@ + lg=9 + > - {{ countvis() }} + {{key}} : {{ val.now }} {{ val.week }} {{ val.year }} @@ -35,7 +36,11 @@ - 5 + + {{key}} : {{ val.count }} {{ val.login }} + + + @@ -46,7 +51,7 @@