Files
servicio_social_front/dist/_nuxt/efdb3e4.js
T
Lemuel Marquez 0f7da140c3 tomy merge
2020-12-08 14:05:07 -06:00

1 line
3.8 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{380:function(t,o){t.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},385:function(t,o,e){var r=e(15),n="["+e(380)+"]",c=RegExp("^"+n+n+"*"),l=RegExp(n+n+"*$"),d=function(t){return function(o){var e=String(r(o));return 1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(l,"")),e}};t.exports={start:d(1),end:d(2),trim:d(3)}},404:function(t,o,e){var content=e(502);"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,e(30).default)("43717a7f",content,!0,{sourceMap:!1})},499:function(t,o,e){"use strict";var r=e(2),n=e(385).trim;r({target:"String",proto:!0,forced:e(500)("trim")},{trim:function(){return n(this)}})},500:function(t,o,e){var r=e(5),n=e(380);t.exports=function(t){return r((function(){return!!n[t]()||"​…᠎"!="​…᠎"[t]()||n[t].name!==t}))}},501:function(t,o,e){"use strict";e(404)},502:function(t,o,e){(o=e(29)(!1)).push([t.i,"footer[data-v-cf943d08][data-v-01e678cd]{display:none!important}.fix[data-v-01e678cd]{height:90vh;display:flex;justify-content:center;align-items:center}.cont[data-v-01e678cd]{height:auto;padding:0 1rem}.cont *[data-v-01e678cd]{margin:1rem 0}.center[data-v-01e678cd]{text-align:center}.columns[data-v-01e678cd]{margin:0}",""]),t.exports=o},516:function(t,o,e){"use strict";e.r(o);e(499);var r=e(375),n=e.n(r),c=e(43),l=e.n(c),d={data:function(){return{usuario:"",password:"",error:!1,isFullPage:!0}},methods:{usuarioValido:function(){return this.usuario||(console.log("esta vacio"),this.error=!0),n.a.isNumeric(this.usuario,{no_symbols:!0})?(10===this.usuario.length&&console.log("es numero de cuenta"),""):n.a.isEmail(this.usuario)?(console.log("es correo"),""):n.a.isAlpha(this.usuario)?(console.log("es texto"),""):void(this.error=!0)},enviar:function(){var t=this,o=this.$buefy.loading.open({container:this.isFullPage?null:this.$refs.element.$el}),data={usuario:this.usuario.trim(),password:this.password};l.a.post("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/usuario/login"),data).then((function(e){o.close(),localStorage.clear(),window.localStorage.setItem("idUsuario",e.data.Usuario.idUsuario),window.localStorage.setItem("token",e.data.token),window.localStorage.setItem("nombre",e.data.Usuario.nombre),window.localStorage.setItem("idTipoUsuario",e.data.Usuario.TipoUsuario.idTipoUsuario),window.localStorage.setItem("tipoUsuario",e.data.Usuario.TipoUsuario.tipoUsuario),window.localStorage.setItem("usuario",e.data.Usuario.usuario),t.$router.push("/".concat(e.data.Usuario.TipoUsuario.tipoUsuario))})).catch((function(e){o.close(),t.$buefy.dialog.alert({title:"Error",message:e.response.data.message,type:"is-danger",hasIcon:!0,icon:"alert-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0})}))}},watch:{usuario:function(){this.error=!1}},layout:"login"},f=(e(501),e(8)),component=Object(f.a)(d,(function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("section",{staticClass:"container p-2 log"},[e("div",{staticClass:"fix columns is-mobile"},[e("div",{staticClass:"container column is-12-mobile is-6-desktop is-6-tablet cont"},[e("b-field",{attrs:{label:"Usuario",message:"This email is invalid",type:t.usuarioValido()}},[e("b-input",{model:{value:t.usuario,callback:function(o){t.usuario=o},expression:"usuario"}})],1),t._v(" "),e("b-field",{attrs:{label:"Contraseña"}},[e("b-input",{attrs:{type:"password","password-reveal":""},model:{value:t.password,callback:function(o){t.password=o},expression:"password"}})],1),t._v(" "),e("b-field",{staticClass:"center"},[e("button",{staticClass:"button is-success is-medium",attrs:{disabled:""==t.usuario||""==t.password&&1==t.error},on:{click:function(o){return t.enviar()}}},[t._v("\n Iniciar sesion\n ")])])],1)])])}),[],!1,null,"01e678cd",null);o.default=component.exports}}]);