1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-1eed4456"],{5371:function(t,e,A){"use strict";A("c0a1")},"773f":function(t,e,A){t.exports=A.p+"static/img/bg.be2c6675.png"},"9ed6":function(t,e,A){"use strict";A.r(e),A("96cf");var n=A("1da1");function r(t){return/^[0-9]*$/.test(t)}A("6b54");var a,i,o,s,c={mixins:[A("9f53").a],data:function(){return{loginBG:A("773f"),user:A("b545"),pwod:A("da00"),loadding:!1,show:!1,codeTitle:"发送密码",num:60,form:{mobile:"",code:""}}},methods:{onSubmit:(s=Object(n.a)(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.loadding){t.next=4;break}return this.loadding=!0,t.next=4,this.asyncmobileValidator(this.form.mobile).then(function(){var t=Object(n.a)(regeneratorRuntime.mark((function t(A){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("ok"===A)return t.next=3,e.asyncpwodValidator(e.form.code).then(function(){var t=Object(n.a)(regeneratorRuntime.mark((function t(A){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:"ok"===A?e.$store.dispatch("user/login",e.form).then((function(t){e.loadding=!1,0===t.code?e.loginSuccess():e.show_title(t.msg)})).catch((function(t){e.loadding=!1})):e.loadding=!1;case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(){e.loadding=!1}));t.next=5;break;case 3:t.next=6;break;case 5:e.loadding=!1;case 6:case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(){e.loadding=!1}));case 4:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)}),loginSuccess:(o=Object(n.a)(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.vm.$router.push({path:"/home/product"});case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)}),asyncmobileValidator:(i=Object(n.a)(regeneratorRuntime.mark((function t(e){var A=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){var n=!0;""===e?(A.show_title("请输入账号!"),n=!1):(10!==e.length&&(A.show_title("账号不正确!"),n=!1),"1745"!==e.substr(0,4)&&(A.show_title("账号不正确!"),n=!1),r(e.substr(e.length-6))||(A.show_title("账号不正确!"),n=!1)),t(n?"ok":"error")})));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)}),asyncpwodValidator:(a=Object(n.a)(regeneratorRuntime.mark((function t(e){var A=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){var n,a=!0;""===e?(A.show_title("请输入密码!"),a=!1):6!==e.length?(A.show_title("密码为2位字母+4位数字!"),a=!1):(n=e.slice(0,2),r(e.slice(2,4))||(A.show_title("密码为2位字母+4位数字!"),a=!1),/^[A-Za-z]+$/.test(n)||(A.show_title("密码为2位字母+4位数字!"),a=!1)),t(a?"ok":"error")})));case 1:case"end":return t.stop()}}),t)}))),function(t){return a.apply(this,arguments)})}},l=(A("5371"),A("2877"));c=Object(l.a)(c,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{staticClass:"login"},[e("div",{staticClass:"bg"},[e("img",{attrs:{src:t.loginBG,alt:""}})]),e("div",{staticClass:"login-main"},[t._m(0),e("van-form",{staticClass:"login-form",attrs:{"validate-first":""}},[e("ul",{staticClass:"clear"},[e("li",{staticClass:"label"},[e("img",{attrs:{src:t.user,alt:""}})]),e("li",{staticClass:"van-field-input"},[e("van-field",{attrs:{size:"large",name:"mobile",placeholder:"请输入账号",type:"text",rules:[{validator:t.asyncmobileValidator}]},model:{value:t.form.mobile,callback:function(e){t.$set(t.form,"mobile",e)},expression:"form.mobile"}})],1)]),e("ul",{staticClass:"clear"},[e("li",{staticClass:"label"},[e("img",{attrs:{src:t.pwod,alt:""}})]),e("li",{staticClass:"van-field-input"},[e("van-field",{attrs:{size:"large",name:"code",placeholder:"请输入密码",rules:[{validator:t.asyncpwodValidator}],type:"password"},model:{value:t.form.code,callback:function(e){t.$set(t.form,"code",e)},expression:"form.code"}})],1)]),e("van-button",{staticClass:"login-form-button",attrs:{block:"",type:"info",disabled:t.loadding,loadding:t.loadding,"loadding-text":"加载中...","native-type":"submit"},on:{click:function(e){return t.onSubmit()}}},[t._v("\n 确认登录\n ")])],1)],1)])}),[function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",{staticClass:"logo-header"},[e("p",{staticClass:"logo-header-title"},[t._v("登录")])])}],!1,null,"f1c8663a",null);e.default=c.exports},"9f53":function(t,e,A){"use strict";A("433b");var n,r=A("d399");A("96cf"),A=A("1da1");e.a={methods:{logout:(n=Object(A.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("/login"!==this.$route.path)return t.next=3,this.$store.dispatch("user/logout");t.next=4;break;case 3:this.$router.push("/login");case 4:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)}),show_title:function(t){Object(r.a)({message:t})}}}},b545:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAaCAMAAACaYWzBAAAAnFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4jUzeAAAAM3RSTlMAAQUHCQoREhMcICUpLzI1PEBJVnGDhIaYmpucpaixuru9w8TIyczT1dfl5+rt8vP7/P4Zeu21AAAAo0lEQVQYGW3BiRqBQBgF0Dv2LSpLIlshkq37/u+mL4xfzTn4qQ0GNVR1Fz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