PageSourceSearch

https://gazprom.kg/assets/MbankPaymentModal-B015bGIj.js

js gazprom.kg collected 2026-10-07 03:01:16 UTC 5,151 bytes, 1 lines download raw bytes

1import{_ as g}from"./OTPInputs-DpMThxoZ.js";import{T as v,U as B,A as w,J as V,K as x,a2 as f,_ as S,t as k,M as A,c as i,o as r,u as c,d as u,b as o,G as I,x as l,v as t,w as _,N,L as O,e as q}from"./index-ae80RWzP.js";import E from"./left-arrow-back-0kXqCHui.js";import T from"./success-8oMSbSUU.js";const D={components:{Arrow:E,BaseAuthInput:f,OTPInputs:g,SuccessIcon:T},directives:{maska:x},props:{sum:{type:Number,required:!0},account:{type:String,required:!0}},data(){return{phone:"+996 ",step:"checkPhone",data:{},otp:"",unmaskedValue:"",errorMsg:"",loading:!1,quid:""}},computed:{...w(V,["userProfile"]),formattedPhone(){return"996"+this.unmaskedValue},isBackVisible(){return this.step==="confirmPhone"||this.step==="sendSMS"}},methods:{...v(B,["close"]),handleBackClick(){this.step=this.step==="confirmPhone"?"checkPhone":""},validatePhone(){const e=/^\+996\s\(\d{3}\)-\d{3}-\d{3}$/;return!this.phone||!e.test(this.phone)?(this.errorMsg="Введите корректный номер телефона.",!1):(this.errorMsg="",!0)},async checkPhone(){if(this.validatePhone()){this.loading=!0;try{const{data:e}=await this.$axiosApi.post("/mbank/check",{phone:this.formattedPhone});e&&(this.step="confirmPhone",this.data=e,this.errorMsg="")}catch(e){console.error(e),this.errorMsg=e.response.data.message}this.loading=!1}},async sendOTP(){this.loading=!0;try{const{data:e}=await this.$axiosApi.post("/mbank/create",{phone:this.formattedPhone,amount:this.sum,account:this.account});e.success===!0?(this.quid=e.quid,this.step="otp",this.errorMsg=""):this.errorMsg=e.message}catch(e){console.error(e),this.errorMsg=e.response.data.message}this.loading=!1},async handleOtp(e){this.verifyCode(e).then(n=>{if(n)this.step="success";else return}).catch(n=>{console.error("Ошибка при проверке кода:",n)})},async verifyCode(e){try{const n=await this.$axiosApi.post("/mbank/confirm",{quid:this.quid,otp:e});return n.data.success===!0?!0:(this.errorMsg=n.data.message,!1)}catch(n){return console.log(n),!1}},closeModal(){this.close(),this.$router.push("/")}},mounted(){this.userProfile&&this.userProfile.contactNumber&&(this.phone=this.userProfile.contactNumber)}},U={class:"wrap"},L={key:0,class:"check-phone"},W={class:"main-text"},F={class:"error-msg"},G={key:1,class:"check-phone"},H={class:"main-text"},J={class:"information"},K={class:"error-msg"},j={class:"comment"},z={key:2,class:"check-phone"},Q={class:"main-text"},R={class:"subtitle"},X={key:1,class:"error-msg"},Y={key:3,class:"check-phone"},Z={class:"success-title"};function $(e,n,p,ee,s,a){const h=k("Arrow"),b=f,d=N,m=O,y=g,P=k("SuccessIcon"),C=A("maska");return r(),i("div",U,[s.step==="checkPhone"?(r(),i("div",L,[a.isBackVisible?(r(),u(h,{key:0,onClick:a.handleBackClick,class:"arrow-back"},null,8,["onClick"])):c("",!0),o("span",W,t(e.$t("modals.mbankPayment.title")),1),o("span",F,t(s.errorMsg),1),I(l(b,{ref:"phoneInput",error:!!s.errorMsg,appendIcon:"@/assets/images/phone.svg",modelValue:s.phone,"onUpdate:modelValue":n[0]||(n[0]=M=>s.phone=M),placeholder:"Введите телефон",label:e.$t("modals.mbankPayment.inputs.phone"),style:{"align-self":"stretch"}},null,8,["error","modelValue","label"]),[[C,"+996 (###)-###-###","unmaskedValue",{unmasked:!0}]]),l(m,{onClick:a.checkPhone,text:s.loading?"":e.$t("modals.mbankPayment.buttons.next"),bgColor:"#1852E0",style:{"margin-top":"30px !important","align-self":"stretch"}},{btnContent:_(()=>[s.loading?(r(),u(d,{key:0,loaderWidth:"10px",color:"white"})):c("",!0)]),_:1}
1,8,["onClick","text"])])):s.step==="confirmPhone"?(r(),i("div",G,[a.isBackVisible?(r(),u(h,{key:0,onClick:a.handleBackClick,class:"arrow-back"},null,8,["onClick"])):c("",!0),o("span",H,t(e.$t("modals.confirmMbankPayment.title")),1),o("div",J,[o("span",K,t(s.errorMsg),1),o("div",j,t(s.data.comment),1),o("div",null,t(s.phone)+" "+t(s.data.displayName),1),o("div",null,t(e.$t("common.accountShort"))+":"+t(p.account),1),o("div",null,[q(t(e.$t("common.amountForPayment"))+": ",1),o("b",null,t(p.sum)+" сом",1)])]),l(m,{onClick:a.sendOTP,text:s.loading?"":e.$t("modals.confirmMbankPayment.buttons.submit"),bgColor:"#1852E0",style:{"margin-top":"30px !important","align-self":"stretch"}},{btnContent:_(()=>[s.loading?(r(),u(d,{key:0,loaderWidth:"10px",color:"white"})):c("",!0)]),_:1},8,["onClick","text"])])):s.step==="otp"?(r(),i("div",z,[a.isBackVisible?(r(),u(h,{key:0,onClick:a.handleBackClick,class:"arrow-back"},null,8,["onClick"])):c("",!0),o("span",Q,t(e.$t("modals.confirmMbankOtp.title")),1),o("div",R,t(e.$t("modals.confirmMbankOtp.description").replace("$__PHONE",s.phone??"")),1),l(y,{error:!!s.errorMsg,numDigits:4,onComplete:a.handleOtp},null,8,["error","onComplete"]),s.errorMsg?(r(),i("span",X,t(s.errorMsg),1)):c("",!0)])):s.step==="success"?(r(),i("div",Y,[l(P),o("div",Z,t(e.$t("modals.successfullyMbankPayment.title")),1),l(m,{onClick:a.closeModal,text:e.$t("modals.successfullyMbankPayment.buttons.submit"),bgColor:"#1852E0",style:{"margin-top":"30px !important","align-self":"stretch"}},null,8,["onClick","text"])])):c("",!0)])}const re=S(D,[["render",$],["__scopeId","data-v-64817a39"]]);export{re 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.