/
home
/
maktab
/
admin
/
js
/
File Upload :
llllll
Current File: /home/maktab/admin/js/chunk-40cd612d.495a6aef.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-40cd612d"],{"017b":function(t,e,n){},5326:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"h-screen flex w-full bg-img vx-row no-gutter items-center justify-center",attrs:{id:"page-login"}},[i("div",{staticClass:"vx-col",staticStyle:{width:"30rem",margin:"2rem"}},[i("vx-card",[i("img",{staticClass:"mb-5 mx-auto",attrs:{src:n("ed29"),width:"175px"}}),1===t.step?i("div",{staticStyle:{margin:"4rem 0"}},[i("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 numhov",staticStyle:{width:"70%"},attrs:{id:"phone","data-vv-validate-on":"blur",name:"phone","icon-no-border":"",type:"number",icon:"icon icon-phone","icon-pack":"feather","label-placeholder":"شماره تلفن همراه"},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.loginJWT.apply(null,arguments)}},model:{value:t.phone,callback:function(e){t.phone=e},expression:"phone"}}),i("span",{staticClass:"text-danger text-sm",staticStyle:{"margin-right":"5rem"}},[t._v(t._s(t.errors.first("phone")))]),i("div",{staticClass:"mt-5 text-center"},[i("vs-button",{staticStyle:{width:"130px"},on:{click:t.loginJWT}},[t._v("\n "+t._s(t.$t("Login"))+"\n ")])],1)],1):t._e(),2==t.step?i("div",{staticStyle:{margin:"4rem 0"}},[i("vs-input",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"}],staticClass:"mt-5 mx-auto numhov",staticStyle:{width:"70%"},attrs:{"data-vv-validate-on":"blur",name:"sms_token","icon-no-border":"",type:"number",icon:"icon icon-phone","icon-pack":"feather","label-placeholder":"کد ارسال شده"},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.verifiyToekn.apply(null,arguments)}},model:{value:t.token,callback:function(e){t.token=e},expression:"token"}}),i("span",{staticClass:"text-danger text-sm",staticStyle:{"margin-right":"5rem"}},[t._v(t._s(t.errors.first("sms_token")))]),i("div",{staticClass:"text-center"},[i("a",{attrs:{href:""},on:{click:function(e){return e.preventDefault(),t.reset()}}},[t._v("تغییر شماره همراه")]),t._v(" / "),i("a",{attrs:{href:""},on:{click:function(e){return e.preventDefault(),t.reSendCode()}}},[t._v("ارسال مجدد کد تایید (00:"+t._s(t.countDown)+")")])]),i("div",{staticClass:"mt-5 text-center"},[i("vs-button",{staticStyle:{width:"138px"},on:{click:function(e){return t.verifiyToekn()}}},[t._v("\n ارسال کد تایید\n ")])],1)],1):t._e()])],1)])},r=[],s=(n("96cf"),n("1da1")),o=n("bb36"),a={data:function(){return{phone:"",step:1,id:null,token:"",countDown:59,countDownInterval:null,isPressed:!1}},watch:{token:function(t,e){4===t.length&&this.verifiyToekn()},phone:function(t,e){}},computed:{validateForm:function(){return!this.errors.any()&&""!==this.phone}},methods:{startCountDown:function(){var t=this;clearInterval(this.countDownInterval),this.countDownInterval=setInterval((function(){0!==t.countDown?t.countDown--:clearInterval(t.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 t=Object(s["a"])(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.isPressed){t.next=23;break}if(this.validateForm){t.next=4;break}return this.$vs.notify({title:"",text:"شماره تلفن همراه را وارد نمایید",iconPack:"feather",icon:"icon-alert-circle",color:"#836447"}),t.abrupt("return");case 4:return t.prev=4,this.$vs.loading(),this.isPressed=!0,t.next=9,o["b"].post("/auth/login",{mobile:this.phone,provider:"user"});case 9:e=t.sent,n=e.data,this.id=n.id,this.step=2,this.startCountDown(),t.next=19;break;case 16:t.prev=16,t.t0=t["catch"](4),this.$vs.notify({title:"",text:"حساب کاربری با این مشخصات وجود ندارد . ثبت نام کنید",iconPack:"feather",icon:"icon-alert-circle",color:"#836447"});case 19:return t.prev=19,this.$vs.loading.close(),this.isPressed=!1,t.finish(19);case 23:case"end":return t.stop()}}),t,this,[[4,16,19,23]])})));function e(){return t.apply(this,arguments)}return e}(),verifiyToekn:function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.isPressed){t.next=23;break}if(""!==this.token){t.next=4;break}return this.$vs.notify({title:"",text:"کد تایید را وارد نمایید",iconPack:"feather",icon:"icon-alert-circle",color:"#836447"}),t.abrupt("return");case 4:return t.prev=4,this.$vs.loading(),this.isPressed=!0,t.next=9,o["b"].post("/auth/verify",{id:this.id,mobile:this.phone,provider:"user",token:this.token});case 9:e=t.sent,n=e.data,localStorage.setItem("token",n.access_token),this.$router.push({name:"dashboard"}).catch((function(){})),t.next=19;break;case 15:t.prev=15,t.t0=t["catch"](4),this.$vs.notify({title:"",text:"کد تایید وارد شده اشتباه است",iconPack:"feather",icon:"icon-alert-circle",color:"#836447"}),console.log(t.t0);case 19:return t.prev=19,this.$vs.loading.close(),this.isPressed=!1,t.finish(19);case 23:case"end":return t.stop()}}),t,this,[[4,15,19,23]])})));function e(){return t.apply(this,arguments)}return e}()}},c=a,l=(n("8a08"),n("2877")),u=Object(l["a"])(c,i,r,!1,null,null,null);e["default"]=u.exports},"8a08":function(t,e,n){"use strict";n("017b")},ed29:function(t,e,n){t.exports=n.p+"img/logo.64a9702b.svg"}}]); //# sourceMappingURL=chunk-40cd612d.495a6aef.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure