(window.webpackJsonp=window.webpackJsonp||[]).push([[13,12],{Y8AM:function(k,O,e){"use strict";var R=e("WmNS"),P=e.n(R),z=e("sRBo"),U=e("kaz8"),N=e("+L6B"),v=e("2/Rp"),x=e("5NDa"),m=e("5rEg"),M=e("9og8"),w=e("y8nQ"),a=e("Vl3Y"),h=e("tJVT"),r=e("q1tI"),t=e.n(r),p=e("55Ip"),C=e("Ty5D"),I=e("9kvl"),i=e("m3rI"),l={height:40},B=function(n){var E=n.onLogin,d=n.dispatch,L=n.user,A=a.a.useForm(),T=Object(h.a)(A,1),c=T[0],b=Object(C.l)(),W=Object(r.useState)(0),y=Object(h.a)(W,2),f=y[0],K=y[1];Object(r.useEffect)(function(){c.resetFields()},[L.showPopLogin]);var F=Object(r.useMemo)(function(){return"/rucaptcha?t="+new Date().getTime()},[f]);function j(_){return g.apply(this,arguments)}function g(){return g=Object(M.a)(P.a.mark(function _(S){var u;return P.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,E(S);case 2:u=o.sent,(u==null?void 0:u.status)===-2&&c.resetFields();case 4:case"end":return o.stop()}},_)})),g.apply(this,arguments)}var D=function(){d({type:"user/showPopLogin",payload:{showPopLogin:!1}})};return t.a.createElement(a.a,{layout:"vertical",form:c,initialValues:{autologin:!0},onFinish:j},t.a.createElement(a.a.Item,{name:"login",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6709\u6548\u7684\u624B\u673A\u53F7/\u90AE\u7BB1\u53F7/\u8D26\u53F7 "}]},t.a.createElement(m.a,{style:l,size:"large",placeholder:"\u8BF7\u8F93\u5165\u6709\u6548\u7684\u624B\u673A\u53F7/\u90AE\u7BB1\u53F7/\u8D26\u53F7"})),t.a.createElement(a.a.Item,{name:"password",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5BC6\u7801"}]},t.a.createElement(m.a.Password,{style:l,visibilityToggle:!1,size:"large",placeholder:"\u5BC6\u7801"})),t.a.createElement(a.a.Item,{name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},t.a.createElement("div",{style:{display:"flex"}},t.a.createElement(m.a,{style:l,size:"large",placeholder:"\u9A8C\u8BC1\u7801"}),t.a.createElement("img",{src:(i.a===null||i.a===void 0?void 0:i.a.API_SERVER)+F,style:{height:"32px",marginLeft:"10px"},onClick:function(){K(f+1)}}))),t.a.createElement(a.a.Item,null,t.a.createElement(v.a,{size:"large",type:"primary",htmlType:"submit",block:!0,style:l},"\u767B\u5F55")),t.a.createElement(a.a.Item,null,t.a.createElement("div",{className:"flex-container",style:{justifyContent:"space-between"}},t.a.createElement(a.a.Item,{name:"autologin",noStyle:!0,valuePropName:"checked"},t.a.createElement(U.a,null,"\u4E0B\u6B21\u81EA\u52A8\u767B\u5F55")),t.a.createElement("div",null,t.a.createElement(p.Link,{className:"c-grey-c",onClick:function(){return D()},to:"/user/reset-password?from=".concat(b.pathname)},"\u627E\u56DE\u5BC6\u7801")," |",t.a.createElement(p.Link,{onClick:function(){return D()},className:"c-grey-c",to:"/user/register"},"\u6CE8\u518C")))))};O.a=Object(I.a)(function(s){var n=s.user,E=s.loading,d=s.globalSetting;return{user:n,globalSetting:d,loading:E.models.index}})(B)}}]);
