/
home
/
henzagold
/
admin_report
/
js
/
File Upload :
llllll
Current File: /home/henzagold/admin_report/js/chunk-01279b55.d64b8e5a.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-01279b55"],{2663:function(e,t,n){"use strict";n("411f")},"411f":function(e,t,n){},5326:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"h-screen flex w-full bg-img vx-row no-gutter items-center justify-center",attrs:{id:"page-login"}},[t("div",{staticClass:"w-screen flex justify-center"},[t("vx-card",{staticStyle:{width:"30rem",margin:"2rem"}},[t("h4",{staticClass:"mb-10 mt-5 text-center"},[e._v("به گزارش خوش آمدید")]),1==e.step?t("div",{staticStyle:{margin:"4rem 0"}},[t("vs-input",{directives:[{name:"validate",rawName:"v-validate",value:{required:!0,regex:/^(?:0|98|\+98|\+980|0098|098|00980)?(9\d{9})$/},expression:"{required:true,regex: /^(?:0|98|\\+98|\\+980|0098|098|00980)?(9\\d{9})$/ }"}],staticClass:"mt-5 mx-auto",staticStyle:{width:"70%"},attrs:{"data-vv-validate-on":"blur",name:"phone","icon-no-border":"",icon:"icon icon-phone","icon-pack":"feather","label-placeholder":"شماره تلفن همراه"},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.loginJWT.apply(null,arguments)}},model:{value:e.phone,callback:function(t){e.phone=t},expression:"phone"}}),t("span",{staticClass:"text-danger text-sm",staticStyle:{"margin-right":"5rem"}},[e._v(e._s(e.errors.first("phone")))]),t("div",{staticClass:"mt-5 text-center"},[t("vs-button",{staticStyle:{width:"130px"},on:{click:e.loginJWT}},[e._v("\n "+e._s(e.$t("Login"))+"\n ")])],1)],1):e._e(),2===e.step?t("div",{staticStyle:{margin:"4rem 0"}},[t("VerifyInput",{on:{code:e.verifiyToekn}}),t("span",{staticClass:"text-danger text-sm",staticStyle:{"margin-right":"5rem"}},[e._v(e._s(e.errors.first("sms_token")))]),t("div",{staticClass:"text-center"},[t("a",{attrs:{href:""},on:{click:function(t){return t.preventDefault(),e.reset()}}},[e._v("تغییر شماره همراه")]),e._v(" / "),t("a",{attrs:{href:""},on:{click:function(t){return t.preventDefault(),e.reSendCode()}}},[e._v("ارسال مجدد کد تایید (00:"+e._s(e.countDown)+")")])]),t("div",{staticClass:"mt-5 text-center"},[t("vs-button",{staticStyle:{width:"138px"},on:{click:function(t){return e.verifiyToekn()}}},[e._v("\n ارسال کد تایید\n ")])],1)],1):e._e()])],1)])},i=[],s=(n("96cf"),n("1da1")),r=n("bb36"),o=function(){var e=this,t=e._self._c;return t("div",{staticClass:"flex w-auto justify-content-center gap-2 md:gap-5 justify-center",staticStyle:{direction:"initial"}},[t("a-input",{staticClass:"input-style",attrs:{maxLength:1,id:"input1",type:"tel"},on:{click:function(e){},keydown:function(t){return e.handleKeyDown(t,1)},keypress:function(t){return e.validateNumber(t,1)},keyup:function(t){return e.handleKey(t,1)},focus:e.handleFocus},model:{value:e.val1,callback:function(t){e.val1=t},expression:"val1"}}),t("a-input",{staticClass:"input-style",attrs:{maxLength:1,id:"input2",type:"tel",disabled:1!==e.val1.length},on:{keydown:function(t){return e.handleKeyDown(t,2)},keypress:function(t){return e.validateNumber(t,2)},keyup:function(t){return e.handleKey(t,2)},focus:e.handleFocus},model:{value:e.val2,callback:function(t){e.val2=t},expression:"val2"}}),t("a-input",{staticClass:"input-style",attrs:{maxLength:1,id:"input3",type:"tel",disabled:1!==e.val2.length},on:{keydown:function(t){return e.handleKeyDown(t,3)},keypress:function(t){return e.validateNumber(t,3)},keyup:function(t){return e.handleKey(t,3)},focus:e.handleFocus},model:{value:e.val3,callback:function(t){e.val3=t},expression:"val3"}}),t("a-input",{staticClass:"input-style",attrs:{maxLength:1,id:"input4",type:"tel",disabled:1!==e.val3.length},on:{keydown:function(t){return e.handleKeyDown(t,4)},keypress:function(t){return e.validateNumber(t,4)},keyup:function(t){return e.handleKey(t,4)},focus:e.handleFocus},model:{value:e.val4,callback:function(t){e.val4=t},expression:"val4"}}),t("a-input",{staticClass:"input-style",attrs:{maxLength:1,id:"input5 ",type:"tel",disabled:1!==e.val4.length},on:{keydown:function(t){return e.handleKeyDown(t,5)},keypress:function(t){return e.validateNumber(t,5)},keyup:function(t){return e.handleKey(t,5)},focus:e.handleFocus},model:{value:e.val5,callback:function(t){e.val5=t},expression:"val5"}})],1)},l=[],c=(n("28a5"),{name:"VerifyInputTest",data:function(){return{val1:"",val2:"",val3:"",val4:"",val5:""}},methods:{handleNextValue:function(e,t){(e.keyCode<=65||e.keyCode>=90)&&this.$nextTick((function(){e.target.nextElementSibling.focus()}))},handleNext:function(e){this.$nextTick((function(){e.target.nextElementSibling.focus()}))},handleKeyDown:function(e,t){if(8===e.keyCode)switch(t){case 5:""===this.val5&&(this.val4="",document.getElementById("input4").focus());break;case 4:""===this.val4&&(this.val3="",document.getElementById("input3").focus());break;case 3:""===this.val3&&(this.val2="",document.getElementById("input2").focus());break;case 2:""===this.val2&&(this.val1="",document.getElementById("input1").focus());break;default:}e.keyCode>=65&&e.keyCode<=90&&e.preventDefault(),37!==e.keyCode&&39!==e.keyCode&&40!==e.keyCode&&38!==e.keyCode||e.preventDefault()},handleKey:function(e,t){switch(e.keyCode>=65&&e.keyCode<=90&&e.preventDefault(),e.keyCode){case 8:switch(t){case 1:this.handleHide();break;case 2:this.handleDelete("input1");break;case 3:this.handleDelete("input2");break;case 4:this.handleDelete("input3");break;case 5:this.handleDelete("input4");break}break;case 40:e.preventDefault();break;case 38:e.preventDefault();break;case 39:e.preventDefault();break;case 37:e.preventDefault();break;default:switch(t){case 1:1===this.val1.length&&this.handleNextValue(e,1);break;case 2:1===this.val2.length&&this.handleNextValue(e,2);break;case 3:1===this.val3.length&&this.handleNextValue(e,3);break;case 4:1===this.val3.length&&this.handleNextValue(e,4);break;case 5:1===this.val4.length&&this.handleFinish();break}}},handleBack:function(e){window.setTimeout((function(){document.getElementById(e).focus()}),0)},handleDelete:function(e){window.setTimeout((function(){document.getElementById(e).focus()}),0),"input1"===e&&(this.val2=this.val3=this.val4=this.val5=""),"input2"===e&&(this.val3=this.val4=this.val5=""),"input3"===e&&(this.val4=this.val5=""),"input4"===e&&(this.val5="")},handleFinish:function(){1===this.val1.length&&1===this.val2.length&&1===this.val3.length&&1===this.val4.length&&1===this.val4.length&&this.$emit("code",this.val1+this.val2+this.val3+this.val4+this.val5)},handleHide:function(){this.val2=this.val3=this.val4=this.val5=""},validateNumber:function(e,t){var n=window.event?e.keyCode:e.which;return 8===e.keyCode||46===e.keyCode||(!(n<48||n>57||39===n||38===n||37===n||40===n)||(e.preventDefault(),!1))},handleFocus:function(e){e.target.select(e)}},mounted:function(){document.getElementById("input1").focus(),"OTPCredential"in window&&window.addEventListener("DOMContentLoaded",(function(){navigator.credentials.get({otp:{transport:["sms"]}}).then((function(e){if(e)e.code.split("")})).catch((function(e){}))}))}}),u=c,h=(n("be1f"),n("2877")),d=Object(h["a"])(u,o,l,!1,null,null,null),v=d.exports,f={components:{VerifyInput:v},data:function(){return{phone:"",step:1,id:null,token:"",countDown:59,countDownInterval:null,isPressed:!1}},created:function(){localStorage.getItem("report_token")&&this.$router.push("/dashboard")},watch:{token:function(e,t){5===e.length&&this.verifiyToekn()},phone:function(e,t){}},computed:{validateForm:function(){return!this.errors.any()&&""!=this.phone}},methods:{startCountDown:function(){var e=this;clearInterval(this.countDownInterval),this.countDownInterval=setInterval((function(){0!=e.countDown?e.countDown--:clearInterval(e.countDownInterval)}),1e3)},reset:function(){clearInterval(this.countDownInterval),this.countDown=59,this.step=1},reSendCode:function(){0==this.countDown&&(this.loginJWT(),this.countDown=59)},loginJWT:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.isPressed){e.next=23;break}if(this.validateForm){e.next=4;break}return this.$vs.notify({title:"",text:"شماره تلفن همراه را وارد نمایید",iconPack:"feather",icon:"icon-alert-circle",color:"#836447"}),e.abrupt("return");case 4:return e.prev=4,this.$vs.loading(),this.isPressed=!0,e.next=9,r["b"].post("auth/login",{mobile:this.phone,login:"admin"});case 9:t=e.sent,n=t.data,this.id=n.id,this.step=2,this.startCountDown(),e.next=19;break;case 16:e.prev=16,e.t0=e["catch"](4),this.$vs.notify({title:"",text:"حساب کاربری با این مشخصات وجود ندارد . ثبت نام کنید",iconPack:"feather",icon:"icon-alert-circle",color:"#836447"});case 19:return e.prev=19,this.$vs.loading.close(),this.isPressed=!1,e.finish(19);case 23:case"end":return e.stop()}}),e,this,[[4,16,19,23]])})));function t(){return e.apply(this,arguments)}return t}(),verifiyToekn:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(t){var n,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t&&(this.token=t),this.isPressed){e.next=26;break}if(""!=this.token){e.next=5;break}return this.$vs.notify({title:"",text:"کد تایید را وارد نمایید",iconPack:"feather",icon:"icon-alert-circle",color:"#836447"}),e.abrupt("return");case 5:return e.prev=5,this.$vs.loading(),this.isPressed=!0,e.next=10,r["b"].post("auth/verify",{id:this.id,token:this.token});case 10:return n=e.sent,a=n.data,localStorage.setItem("report_token",a.accsess_token),e.next=15,this.getUserData();case 15:this.$router.push({name:"dashboard"}).catch((function(){})),e.next=22;break;case 18:e.prev=18,e.t0=e["catch"](5),this.$vs.notify({title:"",text:"کد تایید وارد شده اشتباه است",iconPack:"feather",icon:"icon-alert-circle",color:"#836447"}),console.log(e.t0);case 22:return e.prev=22,this.$vs.loading.close(),this.isPressed=!1,e.finish(22);case 26:case"end":return e.stop()}}),e,this,[[5,18,22,26]])})));function t(t){return e.apply(this,arguments)}return t}(),getUserData:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r["b"].get("user/me");case 3:t=e.sent,n=t.data,localStorage.setItem("userData",JSON.stringify(n)),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),console.log(e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}()}},p=f,k=(n("2663"),Object(h["a"])(p,a,i,!1,null,null,null));t["default"]=k.exports},"94b1":function(e,t,n){},be1f:function(e,t,n){"use strict";n("94b1")}}]); //# sourceMappingURL=chunk-01279b55.d64b8e5a.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure