PageSourceSearch

https://gazprom.kg/assets/AllNewsPage-CI4l4bLA.js

js gazprom.kg collected 2026-10-07 02:59:30 UTC 3,186 bytes, 1 lines download raw bytes

1import{A as v,B as x,_ as w,t as k,c as s,o as n,x as c,b as l,w as p,e as u,v as g,C as B,F as d,D as m,E as I}from"./index-ae80RWzP.js";import{_}from"./PaginationComponent-BN3bFUGt.js";import{_ as f}from"./CategoriesBar-Dlopdj45.js";import{_ as $}from"./no-img-CqhCjtuT.js";import"./arrow-right-CsnO2xBg.js";const D={components:{CategoriesBar:f,PaginationComponent:_},data(){return{loading:!0,items:[],currentPage:1,pageSize:10,totalPages:1,totalItems:0}},computed:{...v(x,["currentLang"]),filterParams(){const t={};return this.currentPage&&(t.offset=(this.currentPage-1)*this.pageSize),this.pageSize&&(t.limit=this.pageSize),t.sort="created",t.lang=this.currentLang,t}},watch:{filterParams(){this.fetchItems(),this.fetchCount()}},methods:{init(){this.loading=!0;const t=Number(this.$route.query.page)||1;this.currentPage=t;const e=[];e.push(this.fetchItems(),this.fetchCount()),Promise.all(e).finally(()=>{this.loading=!1})},fetchCount(){return this.$axiosApi.get("gazprom-app/content/news/count",{params:this.filterParams}).then(t=>{const{total:e,pages:i}=t.data;this.totalItems=e,this.totalPages=i}).catch(t=>{console.log(t)}).finally(()=>{this.loading=!1})},fetchItems(){return this.loading=!0,this.$axiosApi.get("gazprom-app/content/news",{params:this.filterParams}).then(t=>{this.items=t.data}).catch(t=>{console.log(t)}).finally(()=>{this.loading=!1})},findCover(t){if(!t)return;const e=t.find(i=>i.tag==="COVER");return e||null},formatDate(t){const e=new Date(t),i=String(e.getDate()).padStart(2,"0"),h=String(e.getMonth()+1).padStart(2,"0"),o=e.getFullYear();return`${i}.${h}.${o}`},onPageChanged(t){this.currentPage=t,this.$router.push({path:this.$route.path,query:{...this.$route.query,page:String(t)}})},onPageSizeChanged(t){this.pageSize=t,this.currentPage=1}},created(){this.init()}},b={class:"container"},A={style:{width:"100%"}},N={key:0,class:"all-news"},q={class:"article-image"},F=["src","alt"],V={key:1,class:"article-image-inner",src:$},E={class:"news-date"},L={key:1,style:{display:"flex","flex-direction":"column",gap:"20px"}};function T(t,e,i,h,o,r){const P=f,C=B,y=k("router-link"),S=_,z=I;return n(),s("div",b,[c(P),l("div",A,[c(C,{tag:"h2",size:"small",style:{margin:"33px 0 30px 0"}},{default:p(()=>[u(g(t.$t("news.title")),1)]),_:1}),o.loading?(n(),s("div",L,[(n(),s(d,null,m(6,a=>c(z,{key:a,style:{height:"200px",width:"100%","border-radius":"32px","margin-bottom":"30px"}})),64))])):(n(),s("div",N,[(n(!0),s(d,null,m(o.items,a=>(n(),s("div",{key:a.id,class:"article"},[l("div",q,[r.findCover(a.images)?(n(),s("img",{key:0,class:"article-image-inner",src:"https://files.gazprom.kg/"+r.findCover(a.images).path,alt:a.title},null,8,F)):(n(),s("img",V))]),l("div",null,[c(y,{to:`/consumers/news/${a.id}`,class:"news-title"},{default:p(()=>[u(g(a.title),1)]),_:2},1032,["to"]),l("div",E,g(r.formatDate(a.created)),1)])]))),128)),c(S,{"current-page":o.currentPage,"total-items":o.totalItems,"page-size":o.pageSize,onPageChanged:r.onPageChanged,onPageSizeChanged:r.onPageSizeChanged},null,8,["current-page","total-items","page-size","onPageChanged","onPageSizeChanged"])]))])])}const G=w(D,[["render",T],["__scopeId","data-v-d35b0d3d"]]);export{G as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.