You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
10 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[366],{72579:function(ke,W,r){r.r(W),r.d(W,{default:function(){return We}});var G=r(15009),F=r.n(G),K=r(97857),L=r.n(K),Q=r(99289),B=r.n(Q),X=r(5574),Y=r.n(X),J=r(39418),w=r(48357),q=r(87547),l=r(1413),P=r(67294),_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"},ee=_,ne=r(91146),te=function(t,e){return P.createElement(ne.Z,(0,l.Z)((0,l.Z)({},t),{},{ref:e,icon:ee}))},re=P.forwardRef(te),oe=re,T=r(91),ae=r(10915),le=r(28459),se=r(93967),ie=r.n(se),de=r(34994),I=r(4942),ue=r(98082),ce=function(t){return(0,I.Z)((0,I.Z)({},t.componentCls,{"&-container":{display:"flex",flex:"1",flexDirection:"column",height:"100%",paddingInline:32,paddingBlock:24,overflow:"auto",background:"inherit"},"&-top":{textAlign:"center"},"&-header":{display:"flex",alignItems:"center",justifyContent:"center",height:"44px",lineHeight:"44px",a:{textDecoration:"none"}},"&-title":{position:"relative",insetBlockStart:"2px",color:"@heading-color",fontWeight:"600",fontSize:"33px"},"&-logo":{width:"44px",height:"44px",marginInlineEnd:"16px",verticalAlign:"top",img:{width:"100%"}},"&-desc":{marginBlockStart:"12px",marginBlockEnd:"40px",color:t.colorTextSecondary,fontSize:t.fontSize},"&-main":{minWidth:"328px",maxWidth:"580px",margin:"0 auto","&-other":{marginBlockStart:"24px",lineHeight:"22px",textAlign:"start"}}}),"@media (min-width: @screen-md-min)",(0,I.Z)({},"".concat(t.componentCls,"-container"),{paddingInline:0,paddingBlockStart:32,paddingBlockEnd:24,backgroundRepeat:"no-repeat",backgroundPosition:"center 110px",backgroundSize:"100%"}))};function ve(o){return(0,ue.Xj)("LoginForm",function(t){var e=(0,l.Z)((0,l.Z)({},t),{},{componentCls:".".concat(o)});return[ce(e)]})}var n=r(85893),ge=["logo","message","contentStyle","title","subTitle","actions","children","containerStyle","otherStyle"];function fe(o){var t,e=o.logo,i=o.message,d=o.contentStyle,c=o.title,u=o.subTitle,y=o.actions,g=o.children,j=o.containerStyle,v=o.otherStyle,a=(0,T.Z)(o,ge),N=(0,ae.YB)(),Z=a.submitter===!1?!1:(0,l.Z)((0,l.Z)({searchConfig:{submitText:N.getMessage("loginForm.submitText","\u767B\u5F55")}},a.submitter),{},{submitButtonProps:(0,l.Z)({size:"large",style:{width:"100%"}},(t=a.submitter)===null||t===void 0?void 0:t.submitButtonProps),render:function(O,D){var E,Ue=D.pop();if(typeof(a==null||(E=a.submitter)===null||E===void 0?void 0:E.render)=="function"){var A,b;return a==null||(A=a.submitter)===null||A===void 0||(b=A.render)===null||b===void 0?void 0:b.call(A,O,D)}return Ue}}),h=(0,P.useContext)(le.ZP.ConfigContext),f=h.getPrefixCls("pro-form-login"),p=ve(f),S=p.wrapSSR,s=p.hashId,m=function(O){return"".concat(f,"-").concat(O," ").concat(s)},z=(0,P.useMemo)(function(){return e?typeof e=="string"?(0,n.jsx)("img",{src:e}):e:null},[e]);return S((0,n.jsxs)("div",{className:ie()(m("container"),s),style:j,children:[(0,n.jsxs)("div",{className:"".concat(m("top")," ").concat(s).trim(),children:[c||z?(0,n.jsxs)("div",{className:"".concat(m("header")),children:[z?(0,n.jsx)("span",{className:m("logo"),children:z}):null,c?(0,n.jsx)("span",{className:m("title"),children:c}):null]}):null,u?(0,n.jsx)("div",{className:m("desc"),children:u}):null]}),(0,n.jsxs)("div",{className:m("main"),style:(0,l.Z)({width:328},d),children:[(0,n.jsxs)(de.A,(0,l.Z)((0,l.Z)({isKeyPressSubmit:!0},a),{},{submitter:Z,children:[i,g]})),y?(0,n.jsx)("div",{className:m("main-other"),style:v,children:y}):null]})]}))}var H=r(97685),he=r(21770),pe=r(8232),me=r(55241),xe=r(97435),C=r(59141),ye=["fieldProps","proFieldProps"],Pe=["fieldProps","proFieldProps"],M="text",Se=function(t){var e=t.fieldProps,i=t.proFieldProps,d=(0,T.Z)(t,ye);return(0,n.jsx)(C.Z,(0,l.Z)({valueType:M,fieldProps:e,filedConfig:{valueType:M},proFieldProps:i},d))},je=function(t){var e=(0,he.Z)(t.open||!1,{value:t.open,onChange:t.onOpenChange}),i=(0,H.Z)(e,2),d=i[0],c=i[1];return(0,n.jsx)(pe.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(y){var g,j=y.getFieldValue(t.name||[]);return(0,n.jsx)(me.Z,(0,l.Z)((0,l.Z)({getPopupContainer:function(a){return a&&a.parentNode?a.parentNode:a},onOpenChange:function(a){return c(a)},content:(0,n.jsxs)("div",{style:{padding:"4px 0"},children:[(g=t.statusRender)===null||g===void 0?void 0:g.call(t,j),t.strengthText?(0,n.jsx)("div",{style:{marginTop:10},children:(0,n.jsx)("span",{children:t.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},t.popoverProps),{},{open:d,children:t.children}))}})},Ze=function(t){var e=t.fieldProps,i=t.proFieldProps,d=(0,T.Z)(t,Pe),c=(0,P.useState)(!1),u=(0,H.Z)(c,2),y=u[0],g=u[1];return e!=null&&e.statusRender&&d.name?(0,n.jsx)(je,{name:d.name,statusRender:e==null?void 0:e.statusRender,popoverProps:e==null?void 0:e.popoverProps,strengthText:e==null?void 0:e.strengthText,open:y,onOpenChange:g,children:(0,n.jsx)("div",{children:(0,n.jsx)(C.Z,(0,l.Z)({valueType:"password",fieldProps:(0,l.Z)((0,l.Z)({},(0,xe.Z)(e,["statusRender","popoverProps","strengthText"])),{},{onBlur:function(v){var a;e==null||(a=e.onBlur)===null||a===void 0||a.call(e,v),g(!1)},onClick:function(v){var a;e==null||(a=e.onClick)===null||a===void 0||a.call(e,v),g(!0)}}),proFieldProps:i,filedConfig:{valueType:M}},d))})}):(0,n.jsx)(C.Z,(0,l.Z)({valueType:"password",fieldProps:e,proFieldProps:i,filedConfig:{valueType:M}},d))},R=Se;R.Password=Ze,R.displayName="ProFormComponent";var U=R,k=r(22270),Fe=r(84567),Ce=r(28614),Te=["options","fieldProps","proFieldProps","valueEnum"],Me=P.forwardRef(function(o,t){var e=o.options,i=o.fieldProps,d=o.proFieldProps,c=o.valueEnum,u=(0,T.Z)(o,Te);return(0,n.jsx)(C.Z,(0,l.Z)({ref:t,valueType:"checkbox",valueEnum:(0,k.h)(c,void 0),fieldProps:(0,l.Z)({options:e},i),lightProps:(0,l.Z)({labelFormatter:function(){return(0,n.jsx)(C.Z,(0,l.Z)({ref:t,valueType:"checkbox",mode:"read",valueEnum:(0,k.h)(c,void 0),filedConfig:{customLightMode:!0},fieldProps:(0,l.Z)({options:e},i),proFieldProps:d},u))}},u.lightProps),proFieldProps:d},u))}),Ae=P.forwardRef(function(o,t){var e=o.fieldProps,i=o.children;return(0,n.jsx)(Fe.Z,(0,l.Z)((0,l.Z)({ref:t},e),{},{children:i}))}),Le=(0,Ce.G)(Ae,{valuePropName:"checked"}),V=Le;V.Group=Me;var Be=V,x=r(35312),Ie=r(2453),Re=r(13169),Ne=r(98257),ze=r(73935),Oe=r(67610),$=(0,Ne.kc)(function(o){var t=o.token;return{action:{marginLeft:"8px",color:"rgba(0, 0, 0, 0.2)",fontSize:"24px",verticalAlign:"middle",cursor:"pointer",transition:"color 0.3s","&:hover":{color:t.colorPrimaryActive}},lang:{width:42,height:42,lineHeight:"42px",position:"fixed",right:16,borderRadius:t.borderRadius,":hover":{backgroundColor:t.colorBgTextHover}},container:{display:"flex",flexDirection:"column",height:"100vh",overflow:"auto",backgroundImage:"url('https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/V-_oS6r-i7wAAAAAAAAAAAAAFl94AQBr')",backgroundSize:"100% 100%"}}}),Ee=function(){var t=$(),e=t.styles;return(0,n.jsx)("div",{className:e.lang,"data-lang":!0,children:x.SelectLang&&(0,n.jsx)(x.SelectLang,{})})},be=function(){var t=(0,P.useState)("account"),e=Y()(t,2),i=e[0],d=e[1],c=(0,x.useModel)("@@initialState"),u=c.initialState,y=c.setInitialState,g=$(),j=g.styles,v=(0,x.useIntl)(),a=function(){var Z=B()(F()().mark(function h(){var f,p;return F()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,u==null||(f=u.fetchUserInfo)===null||f===void 0?void 0:f.call(u);case 2:p=s.sent,p&&(0,ze.flushSync)(function(){y(function(m){return L()(L()({},m),{},{currentUser:p})})});case 4:case"end":return s.stop()}},h)}));return function(){return Z.apply(this,arguments)}}(),N=function(){var Z=B()(F()().mark(function h(f){var p;return F()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,(0,w.$g)(L()({},f));case 3:return p=v.formatMessage({id:"pages.login.success",defaultMessage:"\u767B\u5F55\u6210\u529F\uFF01"}),Ie.ZP.success(p),s.next=7,a();case 7:x.history.push("/"),s.next=12;break;case 10:s.prev=10,s.t0=s.catch(0);case 12:case"end":return s.stop()}},h,null,[[0,10]])}));return function(f){return Z.apply(this,arguments)}}();return(0,n.jsxs)("div",{className:j.container,children:[(0,n.jsx)(x.Helmet,{children:(0,n.jsxs)("title",{children:[v.formatMessage({id:"menu.login",defaultMessage:"\u767B\u5F55\u9875"}),"- ",Oe.Z.title]})}),(0,n.jsx)(Ee,{}),(0,n.jsx)("div",{style:{flex:"1",padding:"32px 0"},children:(0,n.jsxs)(fe,{contentStyle:{minWidth:280,maxWidth:"75vw"},logo:(0,n.jsx)("img",{alt:"logo",src:"/logo.svg"}),title:"Matrix",initialValues:{autoLogin:!0},onFinish:function(){var Z=B()(F()().mark(function h(f){return F()().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.next=2,N(f);case 2:case"end":return S.stop()}},h)}));return function(h){return Z.apply(this,arguments)}}(),children:[(0,n.jsx)(Re.Z,{activeKey:i,onChange:d,centered:!0,items:[{key:"account",label:v.formatMessage({id:"pages.login.accountLogin.tab",defaultMessage:"\u8D26\u6237\u5BC6\u7801\u767B\u5F55"})}]}),i==="account"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(U,{name:"name",fieldProps:{size:"large",prefix:(0,n.jsx)(q.Z,{onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0})},placeholder:v.formatMessage({id:"pages.login.username.placeholder",defaultMessage:"\u7528\u6237\u540D"}),rules:[{required:!0,message:(0,n.jsx)(x.FormattedMessage,{id:"pages.login.username.required",defaultMessage:"\u8BF7\u8F93\u5165\u7528\u6237\u540D!"})}]}),(0,n.jsx)(U.Password,{name:"pwd",fieldProps:{size:"large",prefix:(0,n.jsx)(oe,{onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0})},placeholder:v.formatMessage({id:"pages.login.password.placeholder",defaultMessage:"\u5BC6\u7801"}),rules:[{required:!0,message:(0,n.jsx)(x.FormattedMessage,{id:"pages.login.password.required",defaultMessage:"\u8BF7\u8F93\u5165\u5BC6\u7801\uFF01"})}]})]}),(0,n.jsx)("div",{style:{marginBottom:24},children:(0,n.jsx)(Be,{noStyle:!0,name:"autoLogin",children:(0,n.jsx)(x.FormattedMessage,{id:"pages.login.rememberMe",defaultMessage:"\u81EA\u52A8\u767B\u5F55"})})})]})}),(0,n.jsx)(J.$_,{})]})},We=be}}]);