1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-11160440"],{"1db7":function(e,t,o){"use strict";o("dd59")},"6a1e":function(e,t,o){"use strict";o("a18c");var i=o("5daa"),s=o("5f87");const a={};window.ajaxTimeout=2e4;var n=async(e="",t={},o="GET",n={},r=a,l)=>{const c={method:o=o.toLowerCase(),baseURL:"",url:i.a.userURL+e,data:t,params:n,processData:!0,timeout:window.ajaxTimeout,headers:r,onUploadProgress:l};return l&&"function"==typeof l&&(c.onUploadProgress=l),axios.interceptors.request.use(e=>(e.data.token||(e.data.token=Object(s.e)()),e),e=>Promise.reject(new Error("服务器异常,请联系管理员!"))),axios.interceptors.response.use(async e=>{var t;return 200!==e.status||100<=(t=e.data.code)&&t<=104&&(Object(s.i)(),Object(s.h)(),Object(s.f)()),e},e=>Promise.reject(e.response.data)),new Promise((e,t)=>{axios(c).then(t=>{e(t.data)}).catch(e=>{e.response&&e.response.data?t(e.response.data):t(e)})})};t.a={verfiy:(e,t)=>n("admin/verify_code",e,"post",t),resetpwd:(e,t)=>n("admin/passmobile",e,"post",t),resetmobile:(e,t)=>n("admin/resetmobile",e,"post",t),setpwd:(e,t)=>n("admin/passsave",e,"post",t),list:(e,t)=>n("admin/menu",e,"post",t),detail:(e,t)=>n("admin/userinfo",e,"post",t),version:(e,t)=>n("admin/lastversion",e,"post",t),prefect:(e,t)=>n("admin/prefect",e,"post",t)}},a244:function(e,t,o){},bf2a:function(e,t,o){"use strict";var i=o("61f7"),s=o("6a1e"),a=o("9f53");a={props:{mobile:{type:String,default:""}},mixins:[a.a],data(){return{num:60,title:"获取验证码",timer:null}},computed:{},methods:{getCode(){""!==this.mobile&&Object(i.g)(this.mobile)?60===this.num&&s.a.verfiy({mobile:this.mobile}).then(async e=>{e&&0===e.code?this.timer=setInterval(()=>{0!==this.num?(this.title=this.num+"s后可重发",this.num--):(clearInterval(this.timer),this.num=60,this.title="获取验证码")},1e3):e&&100<=e.code&&e.code<=104?await this.logout():this.$message.warning(e.message)}):this.$emit("mobileErr",!1)}}},o("f36d"),o=o("2877"),a=Object(o.a)(a,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("el-button",{staticClass:"send-verification-code",attrs:{type:e.num<60?"info":"primary",plain:e.num<60,disabled:e.num<60},on:{click:e.getCode}},[e._v(e._s(e.title))])}),[],!1,null,"a4e6982a",null);t.a=a.exports},dced:function(e,t,o){"use strict";o("f835")},dd59:function(e,t,o){},f36d:function(e,t,o){"use strict";o("a244")},f835:function(e,t,o){},fdb1:function(e,t,o){"use strict";o.r(t);var i=o("61f7"),s=o("bf2a"),a=o("6a1e"),n=o("9f53");n={name:"Login",components:{SocialSign:s.a},mixins:[n.a],data(){return{loginForm:{mobile:"",code:""},loginRules:{mobile:[{required:!0,trigger:"blur",validator:(e,t,o)=>{""===t?o(new Error("手机号不能为空!")):Object(i.g)(t)?o():o(new Error("手机号不正确!"))}}],code:[{required:!0,trigger:"blur",validator:(e,t,o)=>{""===t?o(new Error("验证码不能为空!")):Object(i.i)(t)&&6===t.length?o():o(new Error("验证码应为6位数字!"))}}]},loading:!1,otherQuery:{}}},mounted(){""===this.loginForm.mobile&&this.$refs.mobile.focus(),""===this.loginForm.code&&this.$refs.code.focus()},methods:{async handleLogin(){this.$refs.loginForms.validate(async e=>!!e&&void(this.loading||(this.loading=!0,a.a.resetmobile(this.loginForm).then(async e=>{e&&0===e.code?(this.loading=!1,this.$message.success(e.message),await this.logout()):e&&100<=e.code&&e.code<=104?await this.logout():(this.$message.warning(e.message),this.loading=!1)}))))}}},o("dced"),o("1db7"),o=o("2877"),n=Object(o.a)(n,(function(){var e=this,t=e.$createElement;t=e._self._c||t;return t("div",{staticClass:"change-mobile"},[t("div",{staticClass:"change"},[t("div",{staticClass:"title"},[e._v("更换手机号")]),t("el-form",{ref:"loginForms",staticClass:"login-form",attrs:{model:e.loginForm,rules:e.loginRules,autocomplete:"on","label-position":"right","label-width":"100px"}},[t("el-form-item",{attrs:{prop:"mobile",label:"新手机号:"}},[t("el-input",{ref:"mobile",attrs:{placeholder:"手机号",name:"mobile",type:"text",tabindex:"1",autocomplete:"on"},model:{value:e.loginForm.mobile,callback:function(t){e.$set(e.loginForm,"mobile",t)},expression:"loginForm.mobile"}})],1),t("el-form-item",{staticClass:"code-sign",attrs:{prop:"code",label:"验证码:"}},[t("ul",{staticClass:"code-main"},[t("li",[t("el-input",{ref:"code",attrs:{placeholder:"验证码",name:"code",type:"code",tabindex:"1",autocomplete:"on"},model:{value:e.loginForm.code,callback:function(t){e.$set(e.loginForm,"code",t)},expression:"loginForm.code"}})],1),t("li",[t("SocialSign",{attrs:{mobile:e.loginForm.mobile}})],1)])]),t("el-button",{staticStyle:{width:"98%",margin:"15px 0 0 5%"},attrs:{loading:e.loading,type:"primary",round:""},nativeOn:{click:function(t){return t.preventDefault(),e.handleLogin(t)}}},[e._v("确认修改")])],1)],1)])}),[],!1,null,"63dd994c",null);t.default=n.exports}}]);
|