1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-1d0a69b6"],{"6ac1":function(e,t,n){},"76fb":function(e,t,n){},dced:function(e,t,n){"use strict";n("76fb")},efc5:function(e,t,n){"use strict";n("6ac1")},fdb1:function(e,t,n){"use strict";n.r(t);var r=n("c7eb"),o=n("1da1"),a=n("61f7"),i=n("6a1e"),c={name:"Login",mixins:[n("9f53").a],data:function(){return{loginForm:{mobile:"",code:""},loginRules:{mobile:[{required:!0,trigger:"blur",validator:function(e,t,n){""===t?n(new Error("手机号不能为空!")):Object(a.i)(t)?n():n(new Error("手机号不正确!"))}}],code:[{required:!0,trigger:"blur",validator:function(e,t,n){""===t?n(new Error("验证码不能为空!")):Object(a.m)(t)&&6===t.length?n():n(new Error("验证码应为6位数字!"))}}]},loading:!1,otherQuery:{}}},mounted:function(){this.resetForm()},methods:{resetForm:function(){var e=this;return Object(o.a)(Object(r.a)().mark((function t(){return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick((function(){e.$refs.ruleForm&&(e.$refs.ruleForm.resetFields(),e.$refs.ruleForm.clearValidate(),e.ruleForm={mobile:"",code:""})}));case 2:case"end":return t.stop()}}),t)})))()},handleLogin:function(){var e=this;return Object(o.a)(Object(r.a)().mark((function t(){return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$refs.loginForm.validate(function(){var t=Object(o.a)(Object(r.a)().mark((function t(n){return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=4;break}e.loading||(e.loading=!0,i.a.resetmobile(e.loginForm).then(function(){var t=Object(o.a)(Object(r.a)().mark((function t(n){return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n&&0===n.code)return e.loading=!1,e.$message.success(n.message),t.next=5,e.logout();t.next=7;break;case 5:t.next=14;break;case 7:if(n&&100<=n.code&&n.code<=104)return t.next=10,e.logout();t.next=12;break;case 10:t.next=14;break;case 12:e.$message.warning(n.message),e.loading=!1;case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),t.next=6;break;case 4:return t.abrupt("return",!1);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)})))()}}};n("dced"),n("efc5"),n=n("2877"),n=Object(n.a)(c,(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:"loginForm",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",maxlength:"11",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("send-verification-code",{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.apply(null,arguments)}}},[e._v("确认修改")])],1)],1)])}),[],!1,null,"aae05b16",null);t.default=n.exports}}]);
|