1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0a3ec8"],{"03f5":function(t,e,o){"use strict";o.r(e);var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"pt-28 p-4",staticStyle:{background:"url('https://mms0.baidu.com/it/u=2847927325,3886665253&fm=15&gp=0.jpg&fmt=auto') 100% no-repeat","background-repeat":"no-repeat","background-position":"center","background-size":"cover",height:"100vh"}},[e("div",{staticClass:"text-center"},[e("van-image",{attrs:{width:"6rem",height:"6rem",src:this.$settings.logo}}),t._m(0)],1),e("van-form",{on:{submit:t.onSubmit}},[e("van-field",{attrs:{clearable:"",label:"手机号",placeholder:"请输入手机号",type:"tel",rules:[{required:!0}]},model:{value:t.loginForm.phone,callback:function(e){t.$set(t.loginForm,"phone",e)},expression:"loginForm.phone"}}),e("van-field",{attrs:{clearable:"",type:"password",label:"密码",placeholder:"请输入密码",rules:[{required:!0}]},model:{value:t.loginForm.password,callback:function(e){t.$set(t.loginForm,"password",e)},expression:"loginForm.password"}}),e("div",{staticClass:"mt-8"},[e("van-button",{attrs:{loading:t.loginLoading,block:"",type:"info","loading-text":"加载中...","native-type":"submit"}},[t._v("登录")])],1)],1)],1)},r=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"mt-5 mb-12"},[e("p",{staticClass:"text-2xl"},[t._v("志远办公平台")])])}],i=(o("7bb1"),o("a181"),o("933e"),o("ca0b"),{data:function(){return{loginLoading:!1,sendLoading:!1,loginForm:{phone:"",code:""}}},watch:{$route:{handler:function(t){var e=t.query;console.log(t.query),e&&(this.redirect=e.redirect,this.otherQuery=this.getOtherQuery(e))},immediate:!0}},methods:{onSubmit:function(){var t=this;this.loginLoading=!0,this.$store.dispatch("user/login",this.loginForm).then((function(){t.$router.push({path:t.redirect||"/",query:t.otherQuery}),t.loginLoading=!1})).catch((function(){t.loginLoading=!1}))},getOtherQuery:function(t){return Object.keys(t).reduce((function(e,o){return"redirect"!==o&&(e[o]=t[o]),e}),{})}}}),a=i,s=o("e607"),l=Object(s["a"])(a,n,r,!1,null,null,null);e["default"]=l.exports}}]);
|