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.
NewEduCoderBuild/23255.b5937598.async.js

1 line
24 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[23255],{19657:function(e,n,l){var i=l(39647),o=l.n(i),a=(l(59301),l(37360)),d=l(43418),r=l(37712),t=["shixunsDetail","globalSetting","loading","dispatch"];n.Z=(0,a.connect)((function(e){var n=e.shixunsDetail,l=e.loading;return{shixunsDetail:n,globalSetting:e.globalSetting,loading:l.models.index}}))((function(e){var n=e.shixunsDetail,l=(e.globalSetting,e.loading,e.dispatch);o()(e,t);return(0,r.jsx)(d.Z,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"提示",open:"Banner-Auth"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:function(){l({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){l({type:"shixunsDetail/setActionTabs",payload:{}})},children:(0,r.jsxs)("p",{className:"tc font16",children:["当前竞赛需要实名认证,请先完成实名认证后再报名参赛",(0,r.jsx)("br",{}),"请问是否前往进行认证?"]})})}))},79588:function(e,n,l){var i=l(82242),o=l.n(i),a=l(7557),d=l.n(a),r=l(41498),t=l.n(r),s=l(79800),u=l.n(s),p=l(57809),c=l(78241),_=l(43418),h=l(8591),v=l(92832),f=l(5112),y=l(88522),m=l(51638),x=l(89392),g=l(59301),j=l(37712),Z=p.default.Option;n.Z=function(e){var n,l,i,a,r,s,b,w,I,C,k,P,S,q,A,O,z,L,T,D,R,E,F,N,B,Y,G,M,V=e.isAddmodle,J=e.setIsAdd,U=e.createTeam,H=e.Data,K=e.user,Q=void 0===K?{}:K,$=e.dispatch,W=c.Z.useForm(),X=u()(W,1)[0];console.log("---",Q);var ee,ne=(0,g.useState)([]),le=u()(ne,2),ie=le[0],oe=le[1],ae=(0,g.useRef)((0,x.throttle)((function(e){return ue(e)}),1200,{leading:!0,trailing:!0})).current,de=(0,g.useState)([]),re=u()(de,2),te=re[0],se=re[1],ue=function(){var e=t()(d()().mark((function e(n){var l,i;return d()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$({type:"account/getSchoolOption",payload:{keyword:n,competition_id:null==H?void 0:H.identifier,display_aliases:!0}});case 2:l=e.sent,oe(null==l?void 0:l.schools),n&&""!=n&&se(null==l||null===(i=l.schools)||void 0===i?void 0:i.filter((function(e){return-1!==e.name.toUpperCase().indexOf(n.toUpperCase())})));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,g.useEffect)((function(){var e,n,l,i,o,a,d,r,t;(null!=H&&null!==(e=H.need_apply_info)&&void 0!==e&&e.need_apply_name||null!=H&&null!==(n=H.need_apply_info)&&void 0!==n&&n.need_apply_teacher_phone||null!=H&&null!==(l=H.need_apply_info)&&void 0!==l&&l.need_apply_student_id||null!=H&&null!==(i=H.need_apply_info)&&void 0!==i&&i.need_apply_sex||null!=H&&null!==(o=H.need_apply_info)&&void 0!==o&&o.need_apply_phone||null!=H&&null!==(a=H.need_apply_info)&&void 0!==a&&a.need_apply_grade||null!=H&&null!==(d=H.need_apply_info)&&void 0!==d&&d.need_apply_teacher_name||null!=H&&null!==(r=H.need_apply_info)&&void 0!==r&&r.need_apply_school)&&ue(1===(null==H?void 0:H.region_rule)||"81bjsjjs"===(null==H?void 0:H.identifier)?"":null==Q||null===(t=Q.userInfo)||void 0===t?void 0:t.school_name)}),[(null==H||null===(n=H.need_apply_info)||void 0===n?void 0:n.need_apply_teacher_phone)||(null==H||null===(l=H.need_apply_info)||void 0===l?void 0:l.need_apply_name)||(null==H||null===(i=H.need_apply_info)||void 0===i?void 0:i.need_apply_student_id)||(null==H||null===(a=H.need_apply_info)||void 0===a?void 0:a.need_apply_sex)||(null==H||null===(r=H.need_apply_info)||void 0===r?void 0:r.need_apply_phone)||(null==H||null===(s=H.need_apply_info)||void 0===s?void 0:s.need_apply_grade)||(null==H||null===(b=H.need_apply_info)||void 0===b?void 0:b.need_apply_teacher_name)||(null==H||null===(w=H.need_apply_info)||void 0===w?void 0:w.need_apply_school)]),(0,j.jsx)(_.Z,{className:"modal_styles",centered:!0,title:(0,j.jsxs)("div",{style:{alignItems:"center",display:"flex"},children:[(0,j.jsx)("div",{style:{textAlign:"left",flex:"1"},children:"创建战队"}),(0,j.jsx)(m.Z,{onClick:function(){return J(!1)},style:{cursor:"porint"}})]}),open:V,closable:!1,width:700,destroyOnClose:!0,onOk:(0,x.debounce)((function(){X.submit()}),500),onCancel:function(){return J(!1)},children:(0,j.jsxs)(c.Z,{form:X,initialValues:o()(o()({},Q.userInfo),{},{sex:null==Q||null===(I=Q.userInfo)||void 0===I?void 0:I.gender,grade:null==Q||null===(C=Q.userInfo)||void 0===C?void 0:C.edu_entry_year,school:null==Q||null===(k=Q.userInfo)||void 0===k?void 0:k.school_name}),labelCol:{span:5},size:"large",onFinish:function(){var e=t()(d()().mark((function e(n){var l,i,a;return d()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((a=null===(l=ie.find((function(e){return e.name===(null==n?void 0:n.school)})))||void 0===l?void 0:l.id)||null==H||null===(i=H.need_apply_info)||void 0===i||!i.need_apply_school){e.next=4;break}return h.ZP.info("请选择正确的学校"),e.abrupt("return");case 4:U(o()(o()({},n),{},{school_id:a}));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[((null==H||null===(P=H.need_apply_info)||void 0===P?void 0:P.need_apply_name)||(null==H||null===(S=H.need_apply_info)||void 0===S?void 0:S.need_apply_teacher_phone)||(null==H||null===(q=H.need_apply_info)||void 0===q?void 0:q.need_apply_student_id)||(null==H||null===(A=H.need_apply_info)||void 0===A?void 0:A.need_apply_sex)||(null==H||null===(O=H.need_apply_info)||void 0===O?void 0:O.need_apply_phone)||(null==H||null===(z=H.need_apply_info)||void 0===z?void 0:z.need_apply_grade)||(null==H||null===(L=H.need_apply_info)||void 0===L?void 0:L.need_apply_teacher_name)||(null==H||null===(T=H.need_apply_info)||void 0===T?void 0:T.need_apply_school))&&(0,j.jsx)("div",{className:"mb20",children:"根据竞赛官方的规定,参赛人员需填写必填信息才可完成报名,请确保填写的信息准确完整。"}),(0,j.jsx)(c.Z.Item,{label:"队伍名称",name:"name",rules:[{required:!0,validator:function(e,n){var l;return(null==n||null===(l=n.replaceAll(" ",""))||void 0===l?void 0:l.length)>0?Promise.resolve():Promise.reject("请填写队伍名称")}}],children:(0,j.jsx)(v.Z,{maxLength:60,showCount:!0,placeholder:"请输入队伍名称"})}),(null==H||null===(D=H.need_apply_info)||void 0===D?void 0:D.need_apply_name)&&(0,j.jsx)(c.Z.Item,{label:"参赛人员姓名",name:"real_name",rules:[{required:!0,message:"请输入参赛人员姓名"},{whitespace:!0,message:"姓名不能为空"}],children:(0,j.jsx)(v.Z,{placeholder:"请输入参赛人员姓名",showCount:!0,maxLength:60})}),(null==H||null===(R=H.need_apply_info)||void 0===R?void 0:R.need_apply_sex)&&(0,j.jsx)(c.Z.Item,{label:"性别",name:"sex",rules:[{required:!0,message:"请选择参赛人员性别"}],children:(0,j.jsxs)(f.ZP.Group,{children:[(0,j.jsx)(f.ZP,{value:0,children:"男"}),(0,j.jsx)(f.ZP,{value:1,children:"女"})]})}),(null==H||null===(E=H.need_apply_info)||void 0===E?void 0:E.need_apply_student_id)&&(0,j.jsx)(c.Z.Item,{label:"学号",name:"student_id",rules:[{required:!0,message:"请输入参赛人员学号"},{whitespace:!0,message:"学号不能为空"}],children:(0,j.jsx)(v.Z,{placeholder:"请输入参赛人员学号",showCount:!0,maxLength:60})}),(null==H||null===(F=H.need_apply_info)||void 0===F?void 0:F.need_apply_phone)&&(0,j.jsx)(c.Z.Item,{label:"电话",name:"phone",rules:[{required:!0,message:"请输入参赛人员电话"},{whitespace:!0,message:"电话不能为空"}],children:(0,j.jsx)(v.Z,{placeholder:"请输入参赛人员电话",showCount:!0,maxLength:60})}),(null==H||null===(N=H.need_apply_info)||void 0===N?void 0:N.need_apply_grade)&&(0,j.jsx)(c.Z.Item,{label:"年级",name:"grade",rules:[{required:!0,message:"请选择参赛人员年级"}],children:(0,j.jsx)(p.default,{placeholder:"请选择参赛人员年级",size:"large",children:(ee=(new Date).getFullYear(),Array(31).fill({}).map((function(e,n){return(0,j.jsx)(Z,{value:ee-n,children:(0,j.jsx)("span",{children:ee-n})},n)})))})}),(null==H||null===(B=H.need_apply_info)||void 0===B?void 0:B.need_apply_teacher_name)&&(0,j.jsx)(c.Z.Item,{label:"指导老师姓名",name:"teacher_name",rules:[{required:!0,message:"请输入指导老师姓名"},{whitespace:!0,message:"指导老师姓名不能为空"}],children:(0,j.jsx)(v.Z,{placeholder:"如没有指导老师请填无",showCount:!0,maxLength:60})}),(null==H||null===(Y=H.need_apply_info)||void 0===Y?void 0:Y.need_apply_teacher_phone)&&(0,j.jsx)(c.Z.Item,{label:"指导老师联系方式",name:"teacher_phone",rules:[{required:!0,message:"请输入指导老师联系方式"},{whitespace:!0,message:"指导老师联系方式不能为空"}],children:(0,j.jsx)(v.Z,{placeholder:"请输入指导老师联系方式",showCount:!0,maxLength:60})}),(null==H||null===(G=H.need_apply_info)||void 0===G?void 0:G.need_apply_school)&&"81bjsjjs"!==(null==H?void 0:H.identifier)&&(0,j.jsx)(c.Z.Item,{label:"学校",name:"school",rules:[{required:!0,message:"请选择学校"}],children:(0,j.jsx)(y.Z,{size:"large",showSearch:!0,onChange:function(e){return ae(e,H.identifier)},children:te.map((function(e,n){return(0,j.jsx)(Z,{value:e.name,children:e.name},n)}))})}),(null==H||null===(M=H.need_apply_info)||void 0===M?void 0:M.need_apply_school)&&1===(null==H?void 0:H.region_rule)||"81bjsjjs"===(null==H?void 0:H.identifier)&&(0,j.jsx)(c.Z.Item,{label:"学校",name:"school",rules:[{required:!0,message:"请选择学校"}],children:(0,j.jsx)(p.default,{showSearch:!0,children:ie.map((function(e,n){return(0,j.jsx)(Z,{value:e.name,children:e.name},n)}))})})]})})}},94854:function(e,n,l){var i=l(82242),o=l.n(i),a=l(7557),d=l.n(a),r=l(41498),t=l.n(r),s=l(79800),u=l.n(s),p=l(59301),c=l(57809),_=l(78241),h=l(43418),v=l(8591),f=l(92832),y=l(5112),m=l(88522),x=l(51638),g=l(89392),j=l(37712),Z=c.default.Option;n.Z=function(e){var n,l,i,a,r,s,b,w,I,C,k,P,S,q,A,O,z,L,T,D,R,E,F,N,B,Y,G,M,V=e.isjoin,J=e.setJoin,U=e.JoinTeams,H=e.user,K=void 0===H?{}:H,Q=e.dispatch,$=e.Data,W=void 0===$?{}:$,X=(0,p.useState)(""),ee=u()(X,2),ne=(ee[0],ee[1],(0,p.useState)([])),le=u()(ne,2),ie=le[0],oe=le[1],ae=_.Z.useForm(),de=u()(ae,1)[0],re=(0,p.useRef)((0,g.throttle)((function(e){return _e(e)}),1200,{leading:!0,trailing:!0})).current,te=(0,p.useState)([]),se=u()(te,2),ue=se[0],pe=se[1];(0,p.useEffect)((function(){var e,n,l,i,o,a,d,r,t;(null!=W&&null!==(e=W.need_apply_info)&&void 0!==e&&e.need_apply_name||null!=W&&null!==(n=W.need_apply_info)&&void 0!==n&&n.need_apply_teacher_phone||null!=W&&null!==(l=W.need_apply_info)&&void 0!==l&&l.need_apply_student_id||null!=W&&null!==(i=W.need_apply_info)&&void 0!==i&&i.need_apply_sex||null!=W&&null!==(o=W.need_apply_info)&&void 0!==o&&o.need_apply_phone||null!=W&&null!==(a=W.need_apply_info)&&void 0!==a&&a.need_apply_grade||null!=W&&null!==(d=W.need_apply_info)&&void 0!==d&&d.need_apply_teacher_name||null!=W&&null!==(r=W.need_apply_info)&&void 0!==r&&r.need_apply_school)&&_e(1===(null==W?void 0:W.region_rule)||"81bjsjjs"===(null==W?void 0:W.identifier)?"":null==K||null===(t=K.userInfo)||void 0===t?void 0:t.school_name)}),[(null==W||null===(n=W.need_apply_info)||void 0===n?void 0:n.need_apply_teacher_phone)||(null==W||null===(l=W.need_apply_info)||void 0===l?void 0:l.need_apply_name)||(null==W||null===(i=W.need_apply_info)||void 0===i?void 0:i.need_apply_student_id)||(null==W||null===(a=W.need_apply_info)||void 0===a?void 0:a.need_apply_sex)||(null==W||null===(r=W.need_apply_info)||void 0===r?void 0:r.need_apply_phone)||(null==W||null===(s=W.need_apply_info)||void 0===s?void 0:s.need_apply_grade)||(null==W||null===(b=W.need_apply_info)||void 0===b?void 0:b.need_apply_teacher_name)||(null==W||null===(w=W.need_apply_info)||void 0===w?void 0:w.need_apply_school)]);var ce,_e=function(){var e=t()(d()().mark((function e(n){var l,i;return d()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Q({type:"account/getSchoolOption",payload:{keyword:n,competition_id:null==W?void 0:W.identifier,display_aliases:!0}});case 2:l=e.sent,oe(null==l?void 0:l.schools),n&&""!=n&&pe(null==l||null===(i=l.schools)||void 0===i?void 0:i.filter((function(e){return e.name.includes(n)})));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,j.jsx)(h.Z,{className:"modal_styles",centered:!0,title:(0,j.jsxs)("div",{style:{alignItems:"center",display:"flex"},children:[(0,j.jsx)("div",{style:{textAlign:"left",flex:"1"},children:"加入战队"}),(0,j.jsx)(x.Z,{onClick:function(){return J(!1)},style:{cursor:"porint"}})]}),open:V,width:700,closable:!1,destroyOnClose:!0,onOk:(0,g.debounce)((function(){de.submit()}),500),onCancel:function(){return J(!1)},children:(0,j.jsxs)(_.Z,{form:de,size:"large",labelCol:{span:4},initialValues:o()(o()({},K.userInfo),{},{sex:null==K||null===(I=K.userInfo)||void 0===I?void 0:I.gender,grade:null==K||null===(C=K.userInfo)||void 0===C?void 0:C.edu_entry_year,school:null==K||null===(k=K.userInfo)||void 0===k?void 0:k.school_name}),onFinish:function(){var e=t()(d()().mark((function e(n){var l,i,a;return d()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((a=null===(l=ie.find((function(e){return e.name===(null==n?void 0:n.school)})))||void 0===l?void 0:l.id)||null==W||null===(i=W.need_apply_info)||void 0===i||!i.need_apply_school){e.next=4;break}return v.ZP.info("请选择正确的学校"),e.abrupt("return");case 4:U(o()(o()({},n),{},{school_id:a}));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[((null==W||null===(P=W.need_apply_info)||void 0===P?void 0:P.need_apply_name)||(null==W||null===(S=W.need_apply_info)||void 0===S?void 0:S.need_apply_teacher_phone)||(null==W||null===(q=W.need_apply_info)||void 0===q?void 0:q.need_apply_student_id)||(null==W||null===(A=W.need_apply_info)||void 0===A?void 0:A.need_apply_sex)||(null==W||null===(O=W.need_apply_info)||void 0===O?void 0:O.need_apply_phone)||(null==W||null===(z=W.need_apply_info)||void 0===z?void 0:z.need_apply_grade)||(null==W||null===(L=W.need_apply_info)||void 0===L?void 0:L.need_apply_teacher_name)||(null==W||null===(T=W.need_apply_info)||void 0===T?void 0:T.need_apply_school))&&(0,j.jsx)("div",{className:"mb20",children:"根据竞赛官方的规定,参赛人员需填写必填信息才可完成报名,请确保填写的信息准确完整。"}),(0,j.jsx)(_.Z.Item,{label:"邀请码",name:"invite_code",rules:[{required:!0,validator:function(e,n){var l;return(null==n||null===(l=n.replaceAll(" ",""))||void 0===l?void 0:l.length)>0?Promise.resolve():Promise.reject("请输入邀请码")}}],children:(0,j.jsx)(f.Z,{maxLength:60,showCount:!0,placeholder:"请输入邀请码"})}),(null==W||null===(D=W.need_apply_info)||void 0===D?void 0:D.need_apply_name)&&(0,j.jsx)(_.Z.Item,{label:"参赛人员姓名",name:"real_name",rules:[{required:!0,message:"请输入参赛人员姓名"},{whitespace:!0,message:"姓名不能为空"}],children:(0,j.jsx)(f.Z,{placeholder:"请输入参赛人员姓名",showCount:!0,maxLength:60})}),(null==W||null===(R=W.need_apply_info)||void 0===R?void 0:R.need_apply_sex)&&(0,j.jsx)(_.Z.Item,{label:"性别",name:"sex",rules:[{required:!0,message:"请选择参赛人员性别"}],children:(0,j.jsxs)(y.ZP.Group,{children:[(0,j.jsx)(y.ZP,{value:0,children:"男"}),(0,j.jsx)(y.ZP,{value:1,children:"女"})]})}),(null==W||null===(E=W.need_apply_info)||void 0===E?void 0:E.need_apply_student_id)&&(0,j.jsx)(_.Z.Item,{label:"学号",name:"student_id",rules:[{required:!0,message:"请输入参赛人员学号"},{whitespace:!0,message:"学号不能为空"}],children:(0,j.jsx)(f.Z,{placeholder:"请输入参赛人员学号",showCount:!0,maxLength:60})}),(null==W||null===(F=W.need_apply_info)||void 0===F?void 0:F.need_apply_phone)&&(0,j.jsx)(_.Z.Item,{label:"电话",name:"phone",rules:[{required:!0,message:"请输入参赛人员电话"},{whitespace:!0,message:"电话不能为空"}],children:(0,j.jsx)(f.Z,{placeholder:"请输入参赛人员电话",showCount:!0,maxLength:60})}),(null==W||null===(N=W.need_apply_info)||void 0===N?void 0:N.need_apply_grade)&&(0,j.jsx)(_.Z.Item,{label:"年级",name:"grade",rules:[{required:!0,message:"请选择参赛人员年级"}],children:(0,j.jsx)(c.default,{placeholder:"请选择参赛人员年级",size:"large",children:(ce=(new Date).getFullYear(),Array(31).fill({}).map((function(e,n){return(0,j.jsx)(Z,{value:ce-n,children:(0,j.jsx)("span",{children:ce-n})},n)})))})}),(null==W||null===(B=W.need_apply_info)||void 0===B?void 0:B.need_apply_teacher_name)&&(0,j.jsx)(_.Z.Item,{label:"指导老师姓名",name:"teacher_name",rules:[{required:!0,message:"请输入指导老师姓名"},{whitespace:!0,message:"指导老师姓名不能为空"}],children:(0,j.jsx)(f.Z,{placeholder:"如没有指导老师请填无",showCount:!0,maxLength:60})}),(null==W||null===(Y=W.need_apply_info)||void 0===Y?void 0:Y.need_apply_teacher_phone)&&(0,j.jsx)(_.Z.Item,{label:"指导老师联系方式",name:"teacher_phone",rules:[{required:!0,message:"请输入指导老师联系方式"},{whitespace:!0,message:"指导老师联系方式不能为空"}],children:(0,j.jsx)(f.Z,{placeholder:"请输入指导老师联系方式",showCount:!0,maxLength:60})}),(null==W||null===(G=W.need_apply_info)||void 0===G?void 0:G.need_apply_school)&&1!==(null==W?void 0:W.region_rule)&&"81bjsjjs"!==(null==W?void 0:W.identifier)&&(0,j.jsx)(_.Z.Item,{label:"学校",name:"school",rules:[{required:!0,message:"请选择学校"}],children:(0,j.jsx)(m.Z,{size:"large",showSearch:!0,onChange:function(e){return re(e,W.identifier)},children:ue.map((function(e,n){return(0,j.jsx)(Z,{value:e.name,children:e.name},n)}))})}),(null==W||null===(M=W.need_apply_info)||void 0===M?void 0:M.need_apply_school)&&1===(null==W?void 0:W.region_rule)||"81bjsjjs"===(null==W?void 0:W.identifier)&&(0,j.jsx)(_.Z.Item,{label:"学校",name:"school",rules:[{required:!0,message:"请选择学校"}],children:(0,j.jsx)(c.default,{showSearch:!0,children:ie.map((function(e,n){return(0,j.jsx)(Z,{value:e.name,children:e.name},n)}))})})]})})}},40041:function(e,n,l){var i=l(7557),o=l.n(i),a=l(41498),d=l.n(a),r=l(79800),t=l.n(r),s=l(59301),u=l(8591),p=l(43418),c=l(92832),_=l(3113),h=l(16792),v=l(86628),f=l(78432),y=l(58439),m=l(37712),x=/^1\d{10}$/;n.Z=function(e){var n=e.isShowPhone,l=e.setIsShowPhone,i=e.user,a=e.dispatch,r=e.onOK,g=e.isopen,j=e.setisopen,Z=e.datas,b=e.Header,w=(0,s.useState)(""),I=t()(w,2),C=I[0],k=I[1],P=(0,s.useState)(""),S=t()(P,2),q=S[0],A=S[1],O=(0,s.useState)(60),z=t()(O,2),L=z[0],T=z[1],D=(0,s.useState)(),R=t()(D,2),E=R[0],F=R[1],N=(0,s.useState)(!1),B=t()(N,2),Y=B[0],G=B[1],M=(0,s.useState)(!1),V=t()(M,2),J=V[0],U=V[1],H=(0,s.useState)(""),K=t()(H,2),Q=K[0],$=K[1],W=(0,s.useRef)();(0,s.useEffect)((function(){return function(){W.current&&clearInterval(W.current)}}),[]),(0,v.Y)((function(){E&&(T(60),L>0?T(L-1):(T(60),F(!1),W.current&&clearInterval(W.current)))}),1e3);var X=function(){var e=d()(o()().mark((function e(){var n,l,d;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,h.ZP)("/api/users/accounts/".concat(null===(n=i.userInfo)||void 0===n?void 0:n.login,"/valid_phone.json"),{method:"get",params:{phone:C}});case 2:if(-1!==(null==(l=e.sent)?void 0:l.status)){e.next=5;break}return e.abrupt("return");case 5:if(null==l||!l.is_exists){e.next=8;break}return G(!0),e.abrupt("return");case 8:return d=(0,f.M)(C),e.next=11,a({type:"account/getCode",payload:{login:C,type:3,smscode:d}});case 11:1===e.sent.status&&(u.ZP.info("验证码已发送,请注意查收"),F(!0));case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,m.jsxs)("div",{children:[(0,m.jsx)(p.Z,{title:"强制解绑",open:J,onCancel:function(){return U(!1)},onOk:d()(o()().mark((function e(){var n,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Q){e.next=3;break}return u.ZP.info("验证码不能为空"),e.abrupt("return");case 3:return e.next=5,(0,h.ZP)("/api/users/accounts/".concat(null==i||null===(n=i.userInfo)||void 0===n?void 0:n.login,"/phone_force_unbind.json"),{method:"POST",body:{code:Q,phone:C}});case 5:0===(null==(a=e.sent)?void 0:a.status)&&(u.ZP.info("解绑成功"),F(!1),U(!1),r(),l(!1),$(""));case 7:case"end":return e.stop()}}),e)}))),children:(0,m.jsxs)("div",{style:{padding:"8px 24px"},children:[(0,m.jsx)("p",{children:"若原账号只有绑定了手机号一种登录方式,强制解绑后会导致原账号无法登录,请确定是否强制解绑"}),(0,m.jsxs)("p",{children:["你的手机号:",C]}),(0,m.jsxs)("p",{children:["手机验证码:",(0,m.jsx)(c.Z,{value:Q,size:"middle",onChange:function(e){return $(e.target.value)},style:{width:"240px"}})," ",(0,m.jsx)(_.ZP,{disabled:E,type:"primary",size:"middle",onClick:d()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,f.M)(C),e.next=3,a({type:"account/getCode",payload:{login:C,type:10,smscode:n}});case 3:1===e.sent.status&&(u.ZP.info("验证码已发送,请注意查收"),F(!0));case 5:case"end":return e.stop()}}),e)}))),children:E?"重新发送".concat(L,"s"):"获取验证码"})]})]})}),(0,m.jsx)(p.Z,{title:"提示",open:Y,onCancel:function(){G(!1)},okText:"进行强制解绑",okButtonProps:{type:"primary",ghost:!0,style:{width:"124px"}},onOk:function(){U(!0),G(!1)},children:(0,m.jsxs)("div",{style:{padding:"7px 24px"},children:[(0,m.jsx)("span",{children:"该手机号已经被绑定账号,如果需要将该手机号绑定在当前账号上,你可以进行下方任意一种解绑操作:"}),(0,m.jsx)("br",{}),(0,m.jsx)("p",{style:{marginTop:"1em",display:"flex"},children:(0,m.jsx)("span",{style:{flex:"1"},children:"1、使用该手机号登录平台进行解绑再将手机号绑定当前账号上。"})}),(0,m.jsx)("p",{style:{marginTop:"1em",display:"flex"},children:(0,m.jsx)("span",{style:{flex:"1"},children:"2、强制解绑强制解绑可能会导致解绑账号无法登录"})})]})}),(0,m.jsx)(p.Z,{title:"绑定手机号",open:n,onCancel:function(){return l(!1)},onOk:d()(o()().mark((function e(){var n,d,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x.test(C)){e.next=3;break}return u.ZP.info("请输入有效的11位手机号码"),e.abrupt("return");case 3:if(q){e.next=6;break}return u.ZP.info("请输入验证码"),e.abrupt("return");case 6:return n=i.userInfo||{},d=n.login,e.next=9,a({type:"account/bindPhone",payload:{login:d,phone:C,code:q}});case 9:0===(null==(t=e.sent)?void 0:t.status)&&(l(!1),r());case 11:case"end":return e.stop()}}),e)}))),children:(0,m.jsxs)("div",{style:{padding:"8px 24px"},children:[(0,m.jsx)("p",{children:"平台已检测到您未绑定手机号,为了不影响使用报名功能,请先绑定手机号码"}),(0,m.jsxs)("p",{children:["你的手机号:",(0,m.jsx)(c.Z,{size:"middle",value:C,onChange:function(e){return k(e.target.value)},style:{width:"240px"}})]}),(0,m.jsxs)("p",{children:["手机验证码:",(0,m.jsx)(c.Z,{size:"middle",value:q,onChange:function(e){return A(e.target.value)},style:{width:"240px"}})," ",(0,m.jsx)(_.ZP,{disabled:E,type:"primary",size:"middle",onClick:d()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x.test(C)){e.next=3;break}return u.ZP.info("请输入有效的11位手机号码"),e.abrupt("return");case 3:X();case 4:case"end":return e.stop()}}),e)}))),children:E?"重新发送".concat(L,"s"):"获取验证码"})]})]})}),(0,m.jsx)(p.Z,{open:g,footer:!1,onCancel:function(){return j(!1)},centered:!0,width:460,children:(0,m.jsxs)("div",{children:[(0,m.jsxs)("div",{style:{marginTop:50,fontSize:26,color:"#3d3d3d",textAlign:"center",marginBottom:20},children:[(0,m.jsx)("i",{style:{fontSize:26,color:"#52C41A"},className:"iconfont icon-tongguo"})," 报名成功"]}),(0,m.jsxs)("div",{style:{alignItems:"center",textAlign:"center"},children:[(null==b?void 0:b.is_show_picture)&&(0,m.jsx)("img",{style:{width:180,border:"1px solid #eeeeef",padding:10,marginBottom:20},src:y.Z.IMG_SERVER+(null==Z?void 0:Z.QR_code)}),(0,m.jsx)("p",{style:{color:"#AAAAAA"},children:(null==b?void 0:b.apply_success_tips)||"参赛者可扫码加入大赛官方交流群,获取最新竞赛通知"})]})]})})]})}},86628:function(e,n,l){l.d(n,{Y:function(){return o}});var i=l(59301);function o(e,n){var l=(0,i.useRef)(),o=(0,i.useRef)();(0,i.useEffect)((function(){l.current=e})),(0,i.useEffect)((function(){if(null!==n){var e=setInterval((function(){l.current()}),n);return o.current=e,function(){return clearInterval(e)}}}),[n])}}}]);