Files
servicio_social_front/dist/_nuxt/698abeb.js
T
Lemuel Marquez 22e9516138 cosas de tomy
2020-12-09 13:51:10 -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],{381:function(t,o){t.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},388:function(t,o,e){var r=e(15),n="["+e(381)+"]",l=RegExp("^"+n+n+"*"),c=RegExp(n+n+"*$"),d=function(t){return function(o){var e=String(r(o));return 1&t&&(e=e.replace(l,"")),2&t&&(e=e.replace(c,"")),e}};t.exports={start:d(1),end:d(2),trim:d(3)}},410:function(t,o,e){var content=e(513);"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,e(30).default)("a60a3782",content,!0,{sourceMap:!1})},510:function(t,o,e){"use strict";var r=e(2),n=e(388).trim;r({target:"String",proto:!0,forced:e(511)("trim")},{trim:function(){return n(this)}})},511:function(t,o,e){var r=e(5),n=e(381);t.exports=function(t){return r((function(){return!!n[t]()||"​…᠎"!="​…᠎"[t]()||n[t].name!==t}))}},512:function(t,o,e){"use strict";e(410)},513:function(t,o,e){(o=e(29)(!1)).push([t.i,"footer[data-v-cf943d08][data-v-6dd8e568]{display:none!important}.fix[data-v-6dd8e568]{height:85vh;display:flex;justify-content:center;align-items:center}.cont[data-v-6dd8e568]{height:auto;padding:0 1rem}.cont *[data-v-6dd8e568]{margin:1rem 0}.center[data-v-6dd8e568]{text-align:center}.columns[data-v-6dd8e568]{margin:0}",""]),t.exports=o},529:function(t,o,e){"use strict";e.r(o);e(510);var r=e(375),n=e.n(r),l=e(43),c=e.n(l),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};c.a.post("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/usuario/login"),data).then((function(e){o.close(),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(512),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("h1",{staticClass:"has-text-centered is-size-1"},[t._v("IRIS")]),t._v(" "),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,"6dd8e568",null);o.default=component.exports}}]);