Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

p__Login__index.0de8f252.async.js 13KB

1
  1. "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[739],{5966:function(ye,_,e){var ee=e(97685),p=e(1413),ne=e(45987),te=e(21770),ie=e(23323),w=e(55241),oe=e(97435),ae=e(62435),Y=e(92767),y=e(86074),l=["fieldProps","proFieldProps"],re=["fieldProps","proFieldProps"],D="text",ue=function(u){var a=u.fieldProps,O=u.proFieldProps,T=(0,ne.Z)(u,l);return(0,y.jsx)(Y.Z,(0,p.Z)({valueType:D,fieldProps:a,filedConfig:{valueType:D},proFieldProps:O},T))},ce=function(u){var a=(0,te.Z)(u.open||!1,{value:u.open,onChange:u.onOpenChange}),O=(0,ee.Z)(a,2),T=O[0],Q=O[1];return(0,y.jsx)(ie.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(k){var F,q=k.getFieldValue(u.name||[]);return(0,y.jsx)(w.Z,(0,p.Z)((0,p.Z)({getPopupContainer:function(f){return f&&f.parentNode?f.parentNode:f},onOpenChange:function(f){return Q(f)},content:(0,y.jsxs)("div",{style:{padding:"4px 0"},children:[(F=u.statusRender)===null||F===void 0?void 0:F.call(u,q),u.strengthText?(0,y.jsx)("div",{style:{marginTop:10},children:(0,y.jsx)("span",{children:u.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},u.popoverProps),{},{open:T,children:u.children}))}})},X=function(u){var a=u.fieldProps,O=u.proFieldProps,T=(0,ne.Z)(u,re),Q=(0,ae.useState)(!1),H=(0,ee.Z)(Q,2),k=H[0],F=H[1];return a!=null&&a.statusRender&&T.name?(0,y.jsx)(ce,{name:T.name,statusRender:a==null?void 0:a.statusRender,popoverProps:a==null?void 0:a.popoverProps,strengthText:a==null?void 0:a.strengthText,open:k,onOpenChange:F,children:(0,y.jsx)("div",{children:(0,y.jsx)(Y.Z,(0,p.Z)({valueType:"password",fieldProps:(0,p.Z)((0,p.Z)({},(0,oe.Z)(a,["statusRender","popoverProps","strengthText"])),{},{onBlur:function(z){var f;a==null||(f=a.onBlur)===null||f===void 0||f.call(a,z),F(!1)},onClick:function(z){var f;a==null||(f=a.onClick)===null||f===void 0||f.call(a,z),F(!0)}}),proFieldProps:O,filedConfig:{valueType:D}},T))})}):(0,y.jsx)(Y.Z,(0,p.Z)({valueType:"password",fieldProps:a,proFieldProps:O,filedConfig:{valueType:D}},T))},J=ue;J.Password=X,J.displayName="ProFormComponent",_.Z=J},50742:function(ye,_,e){e.r(_),e.d(_,{default:function(){return Ve}});var ee=e(15009),p=e.n(ee),ne=e(97857),te=e.n(ne),ie=e(99289),w=e.n(ie),oe=e(5574),ae=e.n(oe),Y=e(19632),y=e.n(Y),l=e(62435),re=e(59530),D=e(87462),ue={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},ce=ue,X=e(84089),J=function(s,i){return l.createElement(X.Z,(0,D.Z)({},s,{ref:i,icon:ce}))},se=l.forwardRef(J),u=se,a={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"},O=a,T=function(s,i){return l.createElement(X.Z,(0,D.Z)({},s,{ref:i,icon:O}))},Q=l.forwardRef(T),H=Q,k={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-image",theme:"outlined"},F=k,q=function(s,i){return l.createElement(X.Z,(0,D.Z)({},s,{ref:i,icon:F}))},z=l.forwardRef(q),f=z,m=e(1413),me=e(45987),Se=e(89451),he=e(28459),Ce=e(93967),Te=e.n(Ce),ge=e(97269),de=e(4942),je=e(98082),Ee=function(s){return(0,de.Z)((0,de.Z)({},s.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:s.colorTextSecondary,fontSize:s.fontSize},"&-main":{minWidth:"328px",maxWidth:"580px",margin:"0 auto","&-other":{marginBlockStart:"24px",lineHeight:"22px",textAlign:"start"}}}),"@media (min-width: @screen-md-min)",(0,de.Z)({},"".concat(s.componentCls,"-container"),{paddingInline:0,paddingBlockStart:32,paddingBlockEnd:24,backgroundRepeat:"no-repeat",backgroundPosition:"center 110px",backgroundSize:"100%"}))};function Re(t){return(0,je.Xj)("LoginForm",function(s){var i=(0,m.Z)((0,m.Z)({},s),{},{componentCls:".".concat(t)});return[Ee(i)]})}var n=e(86074),Ie=["logo","message","contentStyle","title","subTitle","actions","children","containerStyle","otherStyle"];function Oe(t){var s,i=t.logo,V=t.message,A=t.contentStyle,B=t.title,b=t.subTitle,U=t.actions,G=t.children,C=t.containerStyle,M=t.otherStyle,h=(0,me.Z)(t,Ie),$=(0,Se.YB)(),L=h.submitter===!1?!1:(0,m.Z)((0,m.Z)({searchConfig:{submitText:$.getMessage("loginForm.submitText","\u767B\u5F55")}},h.submitter),{},{submitButtonProps:(0,m.Z)({size:"large",style:{width:"100%"}},(s=h.submitter)===null||s===void 0?void 0:s.submitButtonProps),render:function(o,E){var K,r=E.pop();if(typeof(h==null||(K=h.submitter)===null||K===void 0?void 0:K.render)=="function"){var Z,R;return h==null||(Z=h.submitter)===null||Z===void 0||(R=Z.render)===null||R===void 0?void 0:R.call(Z,o,E)}return r}}),x=(0,l.useContext)(he.ZP.ConfigContext),S=x.getPrefixCls("pro-form-login"),j=Re(S),d=j.wrapSSR,c=j.hashId,v=function(o){return"".concat(S,"-").concat(o," ").concat(c)},P=(0,l.useMemo)(function(){return i?typeof i=="string"?(0,n.jsx)("img",{src:i}):i:null},[i]);return d((0,n.jsxs)("div",{className:Te()(v("container"),c),style:C,children:[(0,n.jsxs)("div",{className:"".concat(v("top")," ").concat(c).trim(),children:[B||P?(0,n.jsxs)("div",{className:"".concat(v("header")),children:[P?(0,n.jsx)("span",{className:v("logo"),children:P}):null,B?(0,n.jsx)("span",{className:v("title"),children:B}):null]}):null,b?(0,n.jsx)("div",{className:v("desc"),children:b}):null]}),(0,n.jsxs)("div",{className:v("main"),style:(0,m.Z)({width:328},A),children:[(0,n.jsxs)(ge.A,(0,m.Z)((0,m.Z)({isKeyPressSubmit:!0},h),{},{submitter:L,children:[V,G]})),U?(0,n.jsx)("div",{className:v("main-other"),style:M,children:U}):null]})]}))}var ve=e(5966),Fe=e(97462),le=e(74165),pe=e(15861),fe=e(97685),Be=e(23323),Me=e(25278),De=e(14726),Ae=e(28614),Le=["rules","name","phoneName","fieldProps","onTiming","captchaTextRender","captchaProps"],ze=l.forwardRef(function(t,s){var i=Be.Z.useFormInstance(),V=(0,l.useState)(t.countDown||60),A=(0,fe.Z)(V,2),B=A[0],b=A[1],U=(0,l.useState)(!1),G=(0,fe.Z)(U,2),C=G[0],M=G[1],h=(0,l.useState)(),$=(0,fe.Z)(h,2),L=$[0],x=$[1],S=t.rules,j=t.name,d=t.phoneName,c=t.fieldProps,v=t.onTiming,P=t.captchaTextRender,W=P===void 0?function(r,Z){return r?"".concat(Z," \u79D2\u540E\u91CD\u65B0\u83B7\u53D6"):"\u83B7\u53D6\u9A8C\u8BC1\u7801"}:P,o=t.captchaProps,E=(0,me.Z)(t,Le),K=function(){var r=(0,pe.Z)((0,le.Z)().mark(function Z(R){return(0,le.Z)().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return I.prev=0,x(!0),I.next=4,E.onGetCaptcha(R);case 4:x(!1),M(!0),I.next=13;break;case 8:I.prev=8,I.t0=I.catch(0),M(!1),x(!1),console.log(I.t0);case 13:case"end":return I.stop()}},Z,null,[[0,8]])}));return function(R){return r.apply(this,arguments)}}();return(0,l.useImperativeHandle)(s,function(){return{startTiming:function(){return M(!0)},endTiming:function(){return M(!1)}}}),(0,l.useEffect)(function(){var r=0,Z=t.countDown;return C&&(r=window.setInterval(function(){b(function(R){return R<=1?(M(!1),clearInterval(r),Z||60):R-1})},1e3)),function(){return clearInterval(r)}},[C]),(0,l.useEffect)(function(){v&&v(B)},[B,v]),(0,n.jsxs)("div",{style:(0,m.Z)((0,m.Z)({},c==null?void 0:c.style),{},{display:"flex",alignItems:"center"}),ref:s,children:[(0,n.jsx)(Me.Z,(0,m.Z)((0,m.Z)({},c),{},{style:(0,m.Z)({flex:1,transition:"width .3s",marginRight:8},c==null?void 0:c.style)})),(0,n.jsx)(De.ZP,(0,m.Z)((0,m.Z)({style:{display:"block"},disabled:C,loading:L},o),{},{onClick:(0,pe.Z)((0,le.Z)().mark(function r(){var Z;return(0,le.Z)().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(g.prev=0,!d){g.next=9;break}return g.next=4,i.validateFields([d].flat(1));case 4:return Z=i.getFieldValue([d].flat(1)),g.next=7,K(Z);case 7:g.next=11;break;case 9:return g.next=11,K("");case 11:g.next=16;break;case 13:g.prev=13,g.t0=g.catch(0),console.log(g.t0);case 16:case"end":return g.stop()}},r,null,[[0,13]])})),children:W(C,B)}))]})}),Ne=(0,Ae.G)(ze),Ue=Ne,xe=e(68872),We=e(71230),Pe=e(15746),Ke=e(98163),N=e(39680),He={display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"200px"};function Ze(t){var s=[];return t.forEach(function(i){s.push(i.action),i.childs&&s.push.apply(s,y()(Ze(i.childs)))}),s}var Ve=function(){var t=(0,re.useModel)("@@initialState"),s=t.initialState,i=t.setInitialState,V=(0,l.useRef)(),A=(0,l.useRef)(),B=(0,l.useRef)(),b=(0,l.useState)(""),U=ae()(b,2),G=U[0],C=U[1],M=(0,l.useState)(""),h=ae()(M,2),$=h[0],L=h[1];return(0,l.useEffect)(function(){(0,N.cCZ)().then(function(x){C(x.data.img),L(x.data.capt_id)})},[]),(0,n.jsx)(he.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:(0,n.jsx)("div",{style:He,children:(0,n.jsxs)(Oe,{formRef:V,title:"\u83CA\u57CE\u4EBA\u624D\u540E\u53F0\u7BA1\u7406\u7CFB\u7EDF",subTitle:"\u6B22\u8FCE\u767B\u5F55",onFinish:function(){var x=w()(p()().mark(function S(j){var d,c,v,P;return p()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,j.sms_code=Number(j.sms_code),o.next=4,(0,N.m35)(j);case 4:return d=o.sent,xe.ZP.success("\u767B\u5F55\u6210\u529F\uFF01"),sessionStorage.setItem("token",d.data.jwttoken.accesstoken),c=[],o.next=10,(0,N.vLl)();case 10:v=o.sent,c=Ze(v.data.menulist),i(function(E){return te()(te()({},E),{},{permissions:c})}),sessionStorage.setItem("role",d.data.rolename),re.history.push("/"),o.next=26;break;case 17:return o.prev=17,o.t0=o.catch(0),A.current.resetFields(),V.current.resetFields(),o.next=23,(0,N.cCZ)();case 23:P=o.sent,C(P.data.img),L(P.data.capt_id);case 26:case"end":return o.stop()}},S,null,[[0,17]])}));return function(S){return x.apply(this,arguments)}}(),children:[(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ve.Z,{name:"mobile",fieldProps:{size:"large",prefix:(0,n.jsx)(u,{className:"prefixIcon"})},placeholder:"\u8D26\u53F7",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7!"}]}),(0,n.jsx)(ve.Z.Password,{name:"password",fieldProps:{size:"large",prefix:(0,n.jsx)(H,{className:"prefixIcon"})},placeholder:"\u5BC6\u7801",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5BC6\u7801"}]}),(0,n.jsx)(ge.A,{formRef:A,submitter:{render:function(){return null}},children:(0,n.jsxs)(We.Z,{gutter:10,children:[(0,n.jsx)(Pe.Z,{span:14,children:(0,n.jsx)(ve.Z,{name:"captcha",fieldProps:{size:"large",prefix:(0,n.jsx)(f,{className:"prefixIcon"})},placeholder:"\u8BF7\u8F93\u5165\u56FE\u5F62\u9A8C\u8BC1\u7801",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u5F62\u9A8C\u8BC1\u7801"}]})}),(0,n.jsx)(Pe.Z,{span:10,children:(0,n.jsx)(Ke.Z,{src:G,width:"100%",height:40,preview:!1,style:{borderRadius:"8px"},onClick:w()(p()().mark(function x(){var S;return p()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(0,N.cCZ)();case 2:S=d.sent,C(S.data.img),L(S.data.capt_id);case 5:case"end":return d.stop()}},x)}))})})]})}),(0,n.jsx)(Fe.Z,{name:["mobile"],children:function(S){var j=S.mobile;return(0,n.jsx)(Ue,{fieldRef:B,fieldProps:{size:"large",prefix:(0,n.jsx)(H,{className:"prefixIcon"})},captchaProps:{size:"large"},placeholder:"\u77ED\u4FE1\u9A8C\u8BC1\u7801",captchaTextRender:function(c,v){return c?"".concat(v," ","\u83B7\u53D6\u9A8C\u8BC1\u7801"):"\u83B7\u53D6\u9A8C\u8BC1\u7801"},name:"sms_code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801\uFF01"}],onGetCaptcha:function(){var d=w()(p()().mark(function c(v){var P,W,o,E;return p()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,W=(P=A.current)===null||P===void 0?void 0:P.getFieldsValue().captcha,r.next=4,(0,N.UKY)({mobile:j,captcha:W,capt_id:$});case 4:o=r.sent,xe.ZP.success("\u53D1\u9001\u9A8C\u8BC1\u7801\u6210\u529F\uFF0C\u9A8C\u8BC1\u7801\u6709\u6548\u671F\u4E3A\u4E00\u5206\u949F"),r.next=16;break;case 8:return r.prev=8,r.t0=r.catch(0),r.next=12,(0,N.cCZ)();case 12:throw E=r.sent,C(E.data.img),L(E.data.capt_id),new Error;case 16:case"end":return r.stop()}},c,null,[[0,8]])}));return function(c){return d.apply(this,arguments)}}()})}})]}),(0,n.jsx)("div",{style:{marginBlockEnd:24}})]})})})}}}]);