Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

2 rindas
13 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[4053],{5966:function(q,b,e){"use strict";var F=e(28991),c=e(81253),R=e(85893),u=e(31649),B=["fieldProps","proFieldProps"],H=["fieldProps","proFieldProps"],s="text",re=function(D){var V=D.fieldProps,w=D.proFieldProps,Z=(0,c.Z)(D,B);return(0,R.jsx)(u.Z,(0,F.Z)({mode:"edit",valueType:s,fieldProps:V,filedConfig:{valueType:s},proFieldProps:w},Z))},se=function(D){var V=D.fieldProps,w=D.proFieldProps,Z=(0,c.Z)(D,H);return(0,R.jsx)(u.Z,(0,F.Z)({mode:"edit",valueType:"password",fieldProps:V,proFieldProps:w,filedConfig:{valueType:s}},Z))},_=re;_.Password=se,_.displayName="ProFormComponent",b.Z=_},42081:function(q){q.exports={container:"container___2XU-J",lang:"lang___3UZBu",content:"content___232he",top:"top___2e5qd",header:"header___1G_uO",logo:"logo___2RIUt",title:"title___3xYCK",desc:"desc___1GQtf",main:"main___oMoRI",icon:"icon___1dSHb",other:"other___3ljbI",register:"register___1vN_i",prefixIcon:"prefixIcon___57iuX"}},44943:function(){},43674:function(q,b,e){"use strict";e.r(b),e.d(b,{default:function(){return N}});var F=e(18106),c=e(51752),R=e(34792),u=e(48086),B=e(11849),H=e(3182),s=e(2824),re=e(17462),se=e(76772),_=e(94043),I=e.n(_),D=e(89366),V=e(2603),w=e(80521),Z=e(67294),Pe=e(57663),ge=e(71577),ye=e(47673),me=e(4107),Q=e(28991),Ze=e(9715),he=e(86835),W=e(55507),ce=e(92137),pe=e(81253),le=e(28481),a=e(85893),xe=e(64893),oe=["rules","name","phoneName","fieldProps","captchaTextRender","captchaProps"],Ce=Z.forwardRef(function(f,C){var M=(0,Z.useState)(f.countDown||60),U=(0,le.Z)(M,2),K=U[0],te=U[1],z=(0,Z.useState)(!1),E=(0,le.Z)(z,2),g=E[0],L=E[1],Y=(0,Z.useState)(),G=(0,le.Z)(Y,2),J=G[0],O=G[1],j=f.rules,de=f.name,v=f.phoneName,k=f.fieldProps,m=f.captchaTextRender,fe=m===void 0?function(l,i){return l?"".concat(i," \u79D2\u540E\u91CD\u65B0\u83B7\u53D6"):"\u83B7\u53D6\u9A8C\u8BC1\u7801"}:m,ve=f.captchaProps,A=(0,pe.Z)(f,oe),h=function(){var l=(0,ce.Z)((0,W.Z)().mark(function i(P){return(0,W.Z)().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.prev=0,O(!0),S.next=4,A.onGetCaptcha(P);case 4:O(!1),L(!0),S.next=13;break;case 8:S.prev=8,S.t0=S.catch(0),L(!1),O(!1),console.log(S.t0);case 13:case"end":return S.stop()}},i,null,[[0,8]])}));return function(P){return l.apply(this,arguments)}}();return(0,Z.useImperativeHandle)(C,function(){return{startTiming:function(){return L(!0)},endTiming:function(){return L(!1)}}}),(0,Z.useEffect)(function(){var l=0,i=f.countDown;return g&&(l=window.setInterval(function(){te(function(P){return P<=1?(L(!1),clearInterval(l),i||60):P-1})},1e3)),function(){return clearInterval(l)}},[g]),(0,a.jsx)(he.Z.Item,{noStyle:!0,shouldUpdate:!0,children:function(i){var P=i.getFieldValue,d=i.validateFields;return(0,a.jsxs)("div",{style:(0,Q.Z)((0,Q.Z)({},k==null?void 0:k.style),{},{display:"flex",alignItems:"center"}),ref:C,children:[(0,a.jsx)(me.Z,(0,Q.Z)((0,Q.Z)({},k),{},{style:{flex:1,transition:"width .3s",marginRight:8}})),(0,a.jsx)(ge.Z,(0,Q.Z)((0,Q.Z)({style:{display:"block"},disabled:g,loading:J},ve),{},{onClick:function(){var S=(0,ce.Z)((0,W.Z)().mark(function y(){var je;return(0,W.Z)().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(T.prev=0,!v){T.next=9;break}return T.next=4,d([v].flat(1));case 4:return je=P([v].flat(1)),T.next=7,h(je);case 7:T.next=11;break;case 9:return T.next=11,h("");case 11:T.next=16;break;case 13:T.prev=13,T.t0=T.catch(0),console.log(T.t0);case 16:case"end":return T.stop()}},y,null,[[0,13]])}));function Me(){return S.apply(this,arguments)}return Me}(),children:fe(g,K)}))]})}})}),t=(0,xe.G)(Ce),o=t,p=e(952),n=e(5966),r=e(48971),ee=e(73727),ae=e(92002),$=e(64172),X=e(42081),x=e.n(X),ne=function(C){var M=C.content;return(0,a.jsx)(se.Z,{style:{marginBottom:24},message:M,type:"error",showIcon:!0})},ie=function(){var C=r.m8.location.query,M=C.redirect;window.location.href="/"},ue=function(){var C=(0,Z.useState)(!1),M=(0,s.Z)(C,2),U=M[0],K=M[1],te=(0,Z.useState)({}),z=(0,s.Z)(te,2),E=z[0],g=z[1],L=(0,Z.useState)("account"),Y=(0,s.Z)(L,2),G=Y[0],J=Y[1],O=(0,r.tT)("@@initialState"),j=O.initialState,de=O.setInitialState,v=(0,r.YB)(),k=function(){var A=(0,H.Z)(I().mark(function h(){var l,i;return I().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,j==null||(l=j.fetchUserInfo)===null||l===void 0?void 0:l.call(j);case 2:i=d.sent,i&&de((0,B.Z)((0,B.Z)({},j),{},{currentUser:i}));case 4:case"end":return d.stop()}},h)}));return function(){return A.apply(this,arguments)}}(),m=function(){var A=(0,H.Z)(I().mark(function h(l){var i,P,d,S;return I().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return K(!0),y.prev=1,localStorage.clear(),y.next=5,$.Z.Login((0,B.Z)((0,B.Z)({},l),{},{type:G}));case 5:if(i=y.sent,i.statusCode!==200){y.next=17;break}return localStorage.setItem("userid",i.data.userID),localStorage.setItem("token",i.data.token),P=v.formatMessage({id:"pages.login.success",defaultMessage:"\u767B\u5F55\u6210\u529F\uFF01"}),u.default.success(P),y.next=13,k();case 13:return ie(),y.abrupt("return");case 17:i.succeeded?(d=v.formatMessage({id:"pages.login.accountLogin.tab",defaultMessage:"\u8D26\u53F7\u5BC6\u7801\u9519\u8BEF\uFF01"}),u.default.error(d)):u.default.error(i.errors);case 18:y.next=25;break;case 20:y.prev=20,y.t0=y.catch(1),console.log("fdsafds",y.t0),S=v.formatMessage({id:"pages.login.failure",defaultMessage:"\u767B\u5F55\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\uFF01"}),u.default.error(S);case 25:K(!1);case 26:case"end":return y.stop()}},h,null,[[1,20]])}));return function(l){return A.apply(this,arguments)}}(),fe=E.status,ve=E.type;return(0,a.jsx)("div",{className:x().container,children:(0,a.jsxs)("div",{className:x().content,children:[(0,a.jsx)("div",{className:x().top,children:(0,a.jsx)("div",{className:x().header,children:(0,a.jsxs)("div",{children:[(0,a.jsx)(ee.rU,{to:"/",children:(0,a.jsx)("div",{children:(0,a.jsx)("img",{alt:"logo",className:x().logo,src:"/logo.png"})})}),(0,a.jsx)("div",{className:x().desc,children:"\u667A\u6167\u9910\u996E\u89E3\u51B3\u65B9\u6848\u670D\u52A1\u5546"})]})})}),(0,a.jsxs)("div",{className:x().main,children:[(0,a.jsx)("div",{className:x().title,children:"\u8FDE\u9501\u7ECF\u8425\u5E73\u53F0"}),(0,a.jsxs)(p.ZP,{initialValues:{autoLogin:!0},submitter:{searchConfig:{submitText:v.formatMessage({id:"pages.login.submit",defaultMessage:"\u767B\u5F55"})},render:function(h,l){return l.pop()},submitButtonProps:{loading:U,size:"large",style:{width:"100%"}}},isKeyPressSubmit:!0,onFinish:function(){var A=(0,H.Z)(I().mark(function h(l){return I().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:m(l);case 1:case"end":return P.stop()}},h)}));return function(h){return A.apply(this,arguments)}}(),children:[(0,a.jsx)(c.Z,{activeKey:G,onChange:J}),fe==="error"&&ve==="account"&&(0,a.jsx)(ne,{content:v.formatMessage({id:"pages.login.accountLogin.errorMessage",defaultMessage:"\u8D26\u6237\u6216\u5BC6\u7801\u9519\u8BEF\uFF08admin/ant.design)"})}),G==="account"&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z,{name:"Account",fieldProps:{size:"large",prefix:(0,a.jsx)(D.Z,{className:x().prefixIcon})},placeholder:v.formatMessage({id:"pages.login.username.placeholder",defaultMessage:"\u7528\u6237\u540D: admin or user"}),rules:[{required:!0,message:(0,a.jsx)(r._H,{id:"pages.login.username.required",defaultMessage:"\u8BF7\u8F93\u5165\u7528\u6237\u540D!"})}]}),(0,a.jsx)(n.Z.Password,{name:"Password",fieldProps:{size:"large",prefix:(0,a.jsx)(V.Z,{className:x().prefixIcon})},placeholder:v.formatMessage({id:"pages.login.password.placeholder",defaultMessage:"\u5BC6\u7801: ant.design"}),rules:[{required:!0,message:(0,a.jsx)(r._H,{id:"pages.login.password.required",defaultMessage:"\u8BF7\u8F93\u5165\u5BC6\u7801\uFF01"})}]})]}),fe==="error"&&ve==="mobile"&&(0,a.jsx)(ne,{content:"\u9A8C\u8BC1\u7801\u9519\u8BEF"}),G==="mobile"&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z,{fieldProps:{size:"large",prefix:(0,a.jsx)(w.Z,{className:x().prefixIcon})},name:"mobile",placeholder:v.formatMessage({id:"pages.login.phoneNumber.placeholder",defaultMessage:"\u624B\u673A\u53F7"}),rules:[{required:!0,message:(0,a.jsx)(r._H,{id:"pages.login.phoneNumber.required",defaultMessage:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7\uFF01"})},{pattern:/^1\d{10}$/,message:(0,a.jsx)(r._H,{id:"pages.login.phoneNumber.invalid",defaultMessage:"\u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF\uFF01"})}]}),(0,a.jsx)(o,{fieldProps:{size:"large",prefix:(0,a.jsx)(V.Z,{className:x().prefixIcon})},captchaProps:{size:"large"},placeholder:v.formatMessage({id:"pages.login.captcha.placeholder",defaultMessage:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}),captchaTextRender:function(h,l){return h?"".concat(l," ").concat(v.formatMessage({id:"pages.getCaptchaSecondText",defaultMessage:"\u83B7\u53D6\u9A8C\u8BC1\u7801"})):v.formatMessage({id:"pages.login.phoneLogin.getVerificationCode",defaultMessage:"\u83B7\u53D6\u9A8C\u8BC1\u7801"})},name:"captcha",rules:[{required:!0,message:(0,a.jsx)(r._H,{id:"pages.login.captcha.required",defaultMessage:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801\uFF01"})}],onGetCaptcha:function(){var A=(0,H.Z)(I().mark(function h(l){var i;return I().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,$.Z.getFakeCaptcha({phone:l});case 2:if(i=d.sent,i!==!1){d.next=5;break}return d.abrupt("return");case 5:u.default.success("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F\uFF01\u9A8C\u8BC1\u7801\u4E3A\uFF1A1234");case 6:case"end":return d.stop()}},h)}));return function(h){return A.apply(this,arguments)}}()})]})]})]})]})})},N=ue},5467:function(q,b,e){"use strict";e.d(b,{Z:function(){return F}});function F(c){return Object.keys(c).reduce(function(R,u){return(u.startsWith("data-")||u.startsWith("aria-")||u==="role")&&!u.startsWith("data-__")&&(R[u]=c[u]),R},{})}},47933:function(q,b,e){"use strict";e.d(b,{ZP:function(){return Ce}});var F=e(22122),c=e(96156),R=e(28481),u=e(94184),B=e.n(u),H=e(21770),s=e(67294),re=e(53124),se=e(97647),_=e(5467),I=s.createContext(null),D=I.Provider,V=I,w=s.createContext(null),Z=w.Provider,Pe=e(50132),ge=e(42550),ye=e(98866),me=e(65223),Q=function(t,o){var p={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&o.indexOf(n)<0&&(p[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)o.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(p[n[r]]=t[n[r]]);return p},Ze=function(o,p){var n,r=s.useContext(V),ee=s.useContext(w),ae=s.useContext(re.E_),$=ae.getPrefixCls,X=ae.direction,x=s.useRef(),ne=(0,ge.sQ)(p,x),ie=(0,s.useContext)(me.aM),ue=ie.isFormItemInput,N=function(J){var O,j;(O=o.onChange)===null||O===void 0||O.call(o,J),(j=r==null?void 0:r.onChange)===null||j===void 0||j.call(r,J)},f=o.prefixCls,C=o.className,M=o.children,U=o.style,K=o.disabled,te=Q(o,["prefixCls","className","children","style","disabled"]),z=$("radio",f),E=((r==null?void 0:r.optionType)||ee)==="button"?"".concat(z,"-button"):z,g=(0,F.Z)({},te),L=s.useContext(ye.Z);g.disabled=K||L,r&&(g.name=r.name,g.onChange=N,g.checked=o.value===r.value,g.disabled=g.disabled||r.disabled);var Y=B()("".concat(E,"-wrapper"),(n={},(0,c.Z)(n,"".concat(E,"-wrapper-checked"),g.checked),(0,c.Z)(n,"".concat(E,"-wrapper-disabled"),g.disabled),(0,c.Z)(n,"".concat(E,"-wrapper-rtl"),X==="rtl"),(0,c.Z)(n,"".concat(E,"-wrapper-in-form-item"),ue),n),C);return s.createElement("label",{className:Y,style:U,onMouseEnter:o.onMouseEnter,onMouseLeave:o.onMouseLeave},s.createElement(Pe.Z,(0,F.Z)({},g,{type:"radio",prefixCls:E,ref:ne})),M!==void 0?s.createElement("span",null,M):null)},he=s.forwardRef(Ze),W=he,ce=s.forwardRef(function(t,o){var p=s.useContext(re.E_),n=p.getPrefixCls,r=p.direction,ee=s.useContext(se.Z),ae=(0,H.Z)(t.defaultValue,{value:t.value}),$=(0,R.Z)(ae,2),X=$[0],x=$[1],ne=function(N){var f=X,C=N.target.value;"value"in t||x(C);var M=t.onChange;M&&C!==f&&M(N)},ie=function(){var N,f=t.prefixCls,C=t.className,M=C===void 0?"":C,U=t.options,K=t.buttonStyle,te=K===void 0?"outline":K,z=t.disabled,E=t.children,g=t.size,L=t.style,Y=t.id,G=t.onMouseEnter,J=t.onMouseLeave,O=n("radio",f),j="".concat(O,"-group"),de=E;U&&U.length>0&&(de=U.map(function(m){return typeof m=="string"||typeof m=="number"?s.createElement(W,{key:m.toString(),prefixCls:O,disabled:z,value:m,checked:X===m},m):s.createElement(W,{key:"radio-group-value-options-".concat(m.value),prefixCls:O,disabled:m.disabled||z,value:m.value,checked:X===m.value,style:m.style},m.label)}));var v=g||ee,k=B()(j,"".concat(j,"-").concat(te),(N={},(0,c.Z)(N,"".concat(j,"-").concat(v),v),(0,c.Z)(N,"".concat(j,"-rtl"),r==="rtl"),N),M);return s.createElement("div",(0,F.Z)({},(0,_.Z)(t),{className:k,style:L,onMouseEnter:G,onMouseLeave:J,id:Y,ref:o}),de)};return s.createElement(D,{value:{onChange:ne,value:X,disabled:t.disabled,name:t.name,optionType:t.optionType}},ie())}),pe=s.memo(ce),le=function(t,o){var p={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&o.indexOf(n)<0&&(p[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)o.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(p[n[r]]=t[n[r]]);return p},a=function(o,p){var n=s.useContext(re.E_),r=n.getPrefixCls,ee=o.prefixCls,ae=le(o,["prefixCls"]),$=r("radio",ee);return s.createElement(Z,{value:"button"},s.createElement(W,(0,F.Z)({prefixCls:$},ae,{type:"radio",ref:p})))},xe=s.forwardRef(a),oe=W;oe.Button=xe,oe.Group=pe;var Ce=oe},88983:function(q,b,e){"use strict";var F=e(38663),c=e.n(F),R=e(44943),u=e.n(R)},97435:function(q,b){"use strict";function e(F,c){for(var R=Object.assign({},F),u=0;u<c.length;u+=1){var B=c[u];delete R[B]}return R}b.Z=e}}]);