PageSourceSearch

https://gazprom.kg/assets/ConsumersNewsPage-UtDTAVaF.js

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

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