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
1 lines
10 KiB
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[366],{14525:function(He,W,r){r.r(W),r.d(W,{default:function(){return Ee}});var K=r(15009),F=r.n(K),w=r(97857),B=r.n(w),X=r(99289),R=r.n(X),Y=r(5574),J=r.n(Y),Q=r(48357),q=r(87547),l=r(1413),S=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=_,te=r(91146),U=function(n,e){return S.createElement(te.Z,(0,l.Z)((0,l.Z)({},n),{},{ref:e,icon:ee}))};U.displayName="LockOutlined";var ne=S.forwardRef(U),T=r(91),re=r(10915),oe=r(28459),ae=r(93967),le=r.n(ae),se=r(34994),I=r(4942),ie=r(98082),de=function(n){return(0,I.Z)((0,I.Z)({},n.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:n.colorTextSecondary,fontSize:n.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(n.componentCls,"-container"),{paddingInline:0,paddingBlockStart:32,paddingBlockEnd:24,backgroundRepeat:"no-repeat",backgroundPosition:"center 110px",backgroundSize:"100%"}))};function ue(o){return(0,ie.Xj)("LoginForm",function(n){var e=(0,l.Z)((0,l.Z)({},n),{},{componentCls:".".concat(o)});return[de(e)]})}var t=r(85893),ce=["logo","message","contentStyle","title","subTitle","actions","children","containerStyle","otherStyle"];function ve(o){var n,e=o.logo,i=o.message,d=o.contentStyle,c=o.title,u=o.subTitle,P=o.actions,g=o.children,j=o.containerStyle,v=o.otherStyle,a=(0,T.Z)(o,ce),O=(0,re.YB)(),Z=a.submitter===!1?!1:(0,l.Z)((0,l.Z)({searchConfig:{submitText:O.getMessage("loginForm.submitText","\u767B\u5F55")}},a.submitter),{},{submitButtonProps:(0,l.Z)({size:"large",style:{width:"100%"}},(n=a.submitter)===null||n===void 0?void 0:n.submitButtonProps),render:function(b,$){var A,Ue=$.pop();if(typeof(a==null||(A=a.submitter)===null||A===void 0?void 0:A.render)=="function"){var L,E;return a==null||(L=a.submitter)===null||L===void 0||(E=L.render)===null||E===void 0?void 0:E.call(L,b,$)}return Ue}}),h=(0,S.useContext)(oe.ZP.ConfigContext),f=h.getPrefixCls("pro-form-login"),m=ue(f),p=m.wrapSSR,x=m.hashId,s=function(b){return"".concat(f,"-").concat(b," ").concat(x)},z=(0,S.useMemo)(function(){return e?typeof e=="string"?(0,t.jsx)("img",{src:e}):e:null},[e]);return p((0,t.jsxs)("div",{className:le()(s("container"),x),style:j,children:[(0,t.jsxs)("div",{className:"".concat(s("top")," ").concat(x).trim(),children:[c||z?(0,t.jsxs)("div",{className:"".concat(s("header")),children:[z?(0,t.jsx)("span",{className:s("logo"),children:z}):null,c?(0,t.jsx)("span",{className:s("title"),children:c}):null]}):null,u?(0,t.jsx)("div",{className:s("desc"),children:u}):null]}),(0,t.jsxs)("div",{className:s("main"),style:(0,l.Z)({width:328},d),children:[(0,t.jsxs)(se.A,(0,l.Z)((0,l.Z)({isKeyPressSubmit:!0},a),{},{submitter:Z,children:[i,g]})),P?(0,t.jsx)("div",{className:s("main-other"),style:v,children:P}):null]})]}))}var H=r(97685),ge=r(21770),fe=r(8232),he=r(55241),me=r(97435),C=r(11911),pe=["fieldProps","proFieldProps"],xe=["fieldProps","proFieldProps"],M="text",ye=function(n){var e=n.fieldProps,i=n.proFieldProps,d=(0,T.Z)(n,pe);return(0,t.jsx)(C.Z,(0,l.Z)({valueType:M,fieldProps:e,filedConfig:{valueType:M},proFieldProps:i},d))},Pe=function(n){var e=(0,ge.Z)(n.open||!1,{value:n.open,onChange:n.onOpenChange}),i=(0,H.Z)(e,2),d=i[0],c=i[1];return(0,t.jsx)(fe.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(P){var g,j=P.getFieldValue(n.name||[]);return(0,t.jsx)(he.Z,(0,l.Z)((0,l.Z)({getPopupContainer:function(a){return a&&a.parentNode?a.parentNode:a},onOpenChange:c,content:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(g=n.statusRender)===null||g===void 0?void 0:g.call(n,j),n.strengthText?(0,t.jsx)("div",{style:{marginTop:10},children:(0,t.jsx)("span",{children:n.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},n.popoverProps),{},{open:d,children:n.children}))}})},Se=function(n){var e=n.fieldProps,i=n.proFieldProps,d=(0,T.Z)(n,xe),c=(0,S.useState)(!1),u=(0,H.Z)(c,2),P=u[0],g=u[1];return e!=null&&e.statusRender&&d.name?(0,t.jsx)(Pe,{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:P,onOpenChange:g,children:(0,t.jsx)("div",{children:(0,t.jsx)(C.Z,(0,l.Z)({valueType:"password",fieldProps:(0,l.Z)((0,l.Z)({},(0,me.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,t.jsx)(C.Z,(0,l.Z)({valueType:"password",fieldProps:e,proFieldProps:i,filedConfig:{valueType:M}},d))},N=ye;N.Password=Se,N.displayName="ProFormComponent";var k=N,V=r(22270),je=r(84567),Ze=r(83607),Fe=["options","fieldProps","proFieldProps","valueEnum"],Ce=S.forwardRef(function(o,n){var e=o.options,i=o.fieldProps,d=o.proFieldProps,c=o.valueEnum,u=(0,T.Z)(o,Fe);return(0,t.jsx)(C.Z,(0,l.Z)({ref:n,valueType:"checkbox",valueEnum:(0,V.h)(c,void 0),fieldProps:(0,l.Z)({options:e},i),lightProps:(0,l.Z)({labelFormatter:function(){return(0,t.jsx)(C.Z,(0,l.Z)({ref:n,valueType:"checkbox",mode:"read",valueEnum:(0,V.h)(c,void 0),filedConfig:{customLightMode:!0},fieldProps:(0,l.Z)({options:e},i),proFieldProps:d},u))}},u.lightProps),proFieldProps:d},u))}),Te=S.forwardRef(function(o,n){var e=o.fieldProps,i=o.children;return(0,t.jsx)(je.Z,(0,l.Z)((0,l.Z)({ref:n},e),{},{children:i}))}),Me=(0,Ze.G)(Te,{valuePropName:"checked"}),D=Me;D.Group=Ce;var Le=D,y=r(35312),Be=r(2453),Re=r(11941),Ie=r(98257),Ne=r(73935),Oe=r.p+"static/loginBg.12a730ec.jpg",ze=r(67610),G=(0,Ie.kc)(function(o){var n=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:n.colorPrimaryActive}},lang:{width:42,height:42,lineHeight:"42px",position:"fixed",right:16,borderRadius:n.borderRadius,":hover":{backgroundColor:n.colorBgTextHover}},container:{display:"flex",flexDirection:"column",height:"100vh",overflow:"auto",backgroundImage:"url(".concat(Oe,")"),backgroundSize:"100% 100%"}}}),be=function(){var n=G(),e=n.styles;return(0,t.jsx)("div",{className:e.lang,"data-lang":!0,children:y.SelectLang&&(0,t.jsx)(y.SelectLang,{})})},Ae=function(){var n=(0,S.useState)("account"),e=J()(n,2),i=e[0],d=e[1],c=(0,y.useModel)("@@initialState"),u=c.initialState,P=c.setInitialState,g=G(),j=g.styles,v=(0,y.useIntl)(),a=function(){var Z=R()(F()().mark(function h(){var f,m;return F()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,u==null||(f=u.fetchUserInfo)===null||f===void 0?void 0:f.call(u);case 2:m=x.sent,m&&(0,Ne.flushSync)(function(){P(function(s){return B()(B()({},s),{},{currentUser:m})})});case 4:case"end":return x.stop()}},h)}));return function(){return Z.apply(this,arguments)}}(),O=function(){var Z=R()(F()().mark(function h(f){var m,p;return F()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,(0,Q.$g)(B()({},f));case 3:return m=v.formatMessage({id:"pages.login.success",defaultMessage:"\u767B\u5F55\u6210\u529F\uFF01"}),Be.ZP.success(m),s.next=7,a();case 7:p=new URL(window.location.href).searchParams,y.history.push(p.get("redirect")||"/"),s.next=13;break;case 11:s.prev=11,s.t0=s.catch(0);case 13:case"end":return s.stop()}},h,null,[[0,11]])}));return function(f){return Z.apply(this,arguments)}}();return(0,t.jsxs)("div",{className:j.container,children:[(0,t.jsx)(y.Helmet,{children:(0,t.jsxs)("title",{children:[v.formatMessage({id:"menu.login",defaultMessage:"\u767B\u5F55\u9875"}),"- ",ze.Z.title]})}),(0,t.jsx)(be,{}),(0,t.jsx)("div",{style:{flex:"1",padding:"32px 0",position:"absolute",left:"10vw",bottom:"10vh"},children:(0,t.jsxs)(ve,{contentStyle:{minWidth:280,maxWidth:"75vw"},logo:(0,t.jsx)("img",{alt:"logo",src:"/logo.jpg"}),title:"\u51E1\u7C73\u6E38",initialValues:{autoLogin:!0},onFinish:function(){var Z=R()(F()().mark(function h(f){return F()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,O(f);case 2:case"end":return p.stop()}},h)}));return function(h){return Z.apply(this,arguments)}}(),children:[(0,t.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,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k,{name:"name",fieldProps:{size:"large",prefix:(0,t.jsx)(q.Z,{})},placeholder:v.formatMessage({id:"pages.login.username.placeholder",defaultMessage:"\u7528\u6237\u540D"}),rules:[{required:!0,message:(0,t.jsx)(y.FormattedMessage,{id:"pages.login.username.required",defaultMessage:"\u8BF7\u8F93\u5165\u7528\u6237\u540D!"})}]}),(0,t.jsx)(k.Password,{name:"pwd",fieldProps:{size:"large",prefix:(0,t.jsx)(ne,{})},placeholder:v.formatMessage({id:"pages.login.password.placeholder",defaultMessage:"\u5BC6\u7801"}),rules:[{required:!0,message:(0,t.jsx)(y.FormattedMessage,{id:"pages.login.password.required",defaultMessage:"\u8BF7\u8F93\u5165\u5BC6\u7801\uFF01"})}]})]}),(0,t.jsx)("div",{style:{marginBottom:24},children:(0,t.jsx)(Le,{noStyle:!0,name:"autoLogin",children:(0,t.jsx)(y.FormattedMessage,{id:"pages.login.rememberMe",defaultMessage:"\u81EA\u52A8\u767B\u5F55"})})})]})})]})},Ee=Ae}}]);
|
|
|