|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[87260],{25051:function(e,n,a){a.r(n),a.d(n,{default:function(){return J}});var c=a(7557),s=a.n(c),i=a(41498),l=a.n(i),t=a(39647),o=a.n(t),r=a(12442),d=a(43418),u=a(8591),p="wrap___NBtQg",m="content___aZazE",h="hint___bm3si",f="titleWrap___LIDz7",x="title___tG0To",g="flexRow___mnKQ2",j="actionWrap___sSAI1",v="color999___FHSXs",_="colorCDCDCD___oGJKE",N="colorOrange___i7AGs",b="color28AC7F___yXYGt",Z="auth___tmt4O",y="reauth___SISYr",C="modal___NdEZ3",I=a(82242),k=a.n(I),w=a(79800),S=a.n(w),A=a(59301),P=a(53326),T=a(78241),F=a(71418),R=a(92832),E=a(5112),z=a(3113),O=a(62554),D=a(76707),G=a(39653),V=a(68638),B=a(37712),L=["user","account","globalSetting","loading","dispatch"],W=P.Z.Dragger,Y=(0,r.connect)((function(e){var n=e.user,a=e.account,c=e.loading;return{user:n,account:a,globalSetting:e.globalSetting,loading:c.effects}}))((function(e){var n,a=e.user,c=e.account,i=e.globalSetting,t=e.loading,r=e.dispatch,p=(o()(e,L),T.Z.useForm()),m=S()(p,1)[0],h=(0,A.useState)({}),f=S()(h,2),x=(f[0],f[1]),g=(0,A.useState)(!0),j=S()(g,2),v=j[0],_=j[1],N=(0,A.useState)(),b=S()(N,2),Z=b[0],y=b[1],C=(0,A.useState)(),I=S()(C,2),w=I[0],P=I[1],Y=(0,A.useState)(),q=S()(Y,2),H=q[0],J=q[1],K=(0,A.useState)(),Q=S()(K,2),U=Q[0],X=Q[1];(0,A.useEffect)((function(){if(c.basicInfo){var e=c.basicInfo,n={name:e.show_realname?e.name:(0,O.YA)(e.name),gender:e.gender};y(e.name),_(e.show_realname),m.setFieldsValue(n),x(n)}}),[c.basicInfo]);var M=function(){var e=l()(s()().mark((function e(n){var i,l,t,o,d,p,m,h;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(t=n||{}).name,d=t.gender,p=t.idNumber,w){e.next=4;break}return u.ZP.info("请先上传照片!"),e.abrupt("return");case 4:return e.next=6,r({type:"account/applyRealNameAuth",payload:{id:(null===(i=c.basicInfo)||void 0===i?void 0:i.id)||(null===(l=a.userInfo)||void 0===l?void 0:l.login),name:o,gender:d,student_id:p,show_realname:v,attachment_ids:[H]}});case 6:if(-1!==(null==(m=e.sent)?void 0:m.status)){e.next=9;break}return e.abrupt("return");case 9:$(),m&&(u.ZP.info("申请已提交,请等待审核!"),r({type:"account/getBasicInfo",payload:{login:null===(h=a.userInfo)||void 0===h?void 0:h.login}}));case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),$=function(){r({type:"account/setActionTabs",payload:{}})},ee={data:{type:"real_name"},multiple:!0,withCredentials:!0,showUploadList:!1,action:"".concat(G.Z.API_SERVER,"/api/attachments.json"),className:V.Z.uploader,onChange:function(e){var n;"uploading"!==e.file.status?"done"===e.file.status&&(console.log(e.file,e.file.response),J(null===(n=e.file.response)||void 0===n?void 0:n.id),(0,O.y3)(e.file.originFileObj,(function(e){P(e),X(!1)}))):X(!0)},beforeUpload:function(e){var n="image/jpeg"===e.type||"image/png"===e.type||"image/jpg"===e.type||"image/bmp"===e.type;return n||u.ZP.info("请上传正确文件格式"),n}};return(0,B.jsx)(d.Z,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,open:"Account-RealNameAuth"===c.actionTabs.key,title:"实名认证",width:"600px",footer:null,children:(0,B.jsx)(F.Z,{spinning:!!U,children:(0,B.jsxs)(T.Z,{className:V.Z.formWrap,form:m,layout:"horizontal",onValuesChange:function(e){x(k()({},m.getFieldsValue())),"name"in e&&y(e.name)},onFinish:M,scrollToFirstError:!0,children:[(0,B.jsx)(T.Z.Item,{label:"姓名",name:"name",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"请输入真实姓名,最大限制".concat(20,"个字符")},{validator:O.HJ}],extra:(0,B.jsx)("span",{children:v?"(显示:平台将显示您的真实姓名)":"(隐藏:平台将显示你的昵称)"}),children:(0,B.jsx)(R.Z,{size:"large",disabled:!v,placeholder:"请输入真实姓名,最大限制".concat(20,"个字符"),maxLength:20,addonAfter:(0,B.jsx)("i",{className:"iconfont ".concat(v?"icon-xianshi":"icon-yincang"," font18 ").concat(V.Z.color0152d9),onClick:function(){var e=!v;_(e);var n=e?Z:(0,O.YA)(Z);m.setFieldsValue({name:n})}})})}),(0,B.jsx)(T.Z.Item,{label:"性别:",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"请选择性别"}],children:(0,B.jsxs)(E.ZP.Group,{children:[(0,B.jsx)(E.ZP,{value:0,children:"男"}),(0,B.jsx)(E.ZP,{value:1,children:"女"})]})}),(0,B.jsx)(T.Z.Item,{label:"证件号:",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"请输入学号/工号"}],children:(0,B.jsx)(R.Z,{size:"large",placeholder:"请输入学号/工号"})}),(0,B.jsx)(T.Z.Item,{label:"证件上传",labelCol:{span:3},children:(0,B.jsxs)("div",{className:V.Z.flexRow,children:[(0,B.jsxs)("div",{className:"".concat(V.Z.flexColumn," ").concat(V.Z.example),children:[(0,B.jsx)("span",{className:V.Z.exampleImg,children:(0,B.jsx)("img",{src:D,style:{width:"100%"}})}),(0,B.jsxs)("span",{className:"tc",children:[(0,B.jsx)("p",{children:"示例图片"}),(0,B.jsx)("p",{className:"".concat(V.Z.colorOrange," font12"),children:"(png/jpg/bmp格式,不超过2MB)"})]})]}),(0,B.jsxs)("div",{className:V.Z.flexColumn,children:[(0,B.jsx)(W,k()(k()({},ee),{},{accept:".png,.jpg,.bmp,.jpeg",children:w?(0,B.jsx)("img",{src:w,className:V.Z.uploadImg}):(0,B.jsxs)("div",{className:V.Z.imageTip,children:[(0,B.jsx)("p",{children:(0,B.jsx)("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(V.Z.uploadTipIcon)})}),(0,B.jsx)("p",{className:V.Z.uploadTip,children:(0,B.jsx)("a",{className:V.Z.color05101a,children:"点击或拖拽上传图片"})})]})})),(0,B.jsx)("span",{className:"tc",children:(0,B.jsx)("p",{className:V.Z.viewLargerImg,children:"查看大图"})})]})]})}),(0,B.jsx)("div",{className:V.Z.footerWrap,children:(0,B.jsxs)(T.Z.Item,{children:[(0,B.jsx)(z.ZP,{className:"mr5",size:"middle",onClick:$,children:"取消"}),(0,B.jsx)(z.ZP,{size:"middle",type:"primary",htmlType:"submit",loading:t["account/applyRealNameAuth"],children:"提交"})]})}),(0,B.jsxs)("div",{className:V.Z.note,children:[(0,B.jsx)("p",{children:"认证须知:"}),(0,B.jsx)("p",{children:"1.你需要准备有效的学生证/教师证正面(人像面)的证件照照片,请确保证件照片清晰可见,严禁PS;"}),(0,B.jsx)("p",{children:"2.我们将在你提交认证信息后的24小时(不包含节假日)内完成审核,审核结果将会以系统消息的形式发送给你;"}),(0,B.jsx)("p",{children:"3.实名认证审核完成后,无法删除,请谨慎填写;"}),(0,B.jsx)("p",{children:"4.实名认证审核完成后,系统将自动发放500个金币作为奖励;"}),(0,B.jsx)("p",{children:"5.我们会确保你所提供的信息均处于严格的保密状态,不会泄露;"}),(0,B.jsxs)("p",{children:["6.如存在恶意乱填写姓名,学号/工号,及上传与实名认证证件无关图片者,一经发现将冻结",!(null!=i&&null!==(n=i.setting)&&void 0!==n&&n.is_local)&&"EduCoder","账号。"]}),(0,B.jsx)("p",{children:"7.提交实名认证后系统会自动将状态改为已认证,你将可以体验平台需要实名认证的功能;如果在认证后的使用过程中未通过审核,你将不能继续体验需要认证的功能。"})]})]})})})})),q=a(60104),H=["user","account","globalSetting","loading","dispatch"],J=(0,r.connect)((function(e){var n=e.user,a=e.account,c=e.loading;return{user:n,account:a,globalSetting:e.globalSetting,loading:c.models.index}}))((function(e){var n=e.user,a=e.account,c=(e.globalSetting,e.loading,e.dispatch),i=(o()(e,H),function(e){var a;d.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"是否确认撤销认证?",className:C,onOk:(a=l()(s()().mark((function a(){var i,l;return s()().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,c({type:e?"account/cancelRealNameAuth":"account/cancelProfessionalAuth",payload:{login:null===(i=n.userInfo)||void 0===i?void 0:i.login}});case 2:a.sent&&(u.ZP.info("撤销成功!"),c({type:"account/getBasicInfo",payload:{login:null===(l=n.userInfo)||void 0===l?void 0:l.login}}));case 4:case"end":return a.stop()}}),a)}))),function(){return a.apply(this,arguments)})})}),t=function(e){var n;null!==(n=a.basicInfo)&&void 0!==n&&n.base_info_completed?c({type:"account/setActionTabs",payload:{key:e?"Account-RealNameAuth":"Account-ProfessionalAuth"}}):d.Z.confirm({centered:!0,content:"请先完善基本信息",okText:"立即完善",cancelText:"稍后完善",onOk:function(){r.history.push("/account/profile/edit")}})},I=a.basicInfo||{},k=I.authentication,w=I.professional_certification;return(0,B.jsxs)("section",{className:p,children:[(0,B.jsxs)("div",{className:m,children:[(0,B.jsx)("div",{className:"".concat(f," mt10"),children:(0,B.jsx)("div",{className:x,children:"认证信息"})}),(0,B.jsxs)("div",{className:"".concat(g," mt10 font14"),children:[(0,B.jsx)("div",{className:v,children:"实名认证"}),(0,B.jsxs)("div",{className:"".concat(j," ").concat(_),children:[(0,B.jsx)("div",{children:"实名认证可以增强你在平台的江湖地位,还可以获得500金币的奖励~"}),"uncertified"===k&&(0,B.jsx)("a",{className:Z,onClick:function(){return t(!0)},children:"立即认证"}),"applying"===k&&(0,B.jsxs)("div",{children:[(0,B.jsx)("a",{className:"".concat(v," pr20"),onClick:function(){return i(!0)},children:"撤销认证"}),(0,B.jsx)("span",{className:N,children:"待审核"})]}),"certified"===k&&(0,B.jsxs)("div",{children:[(0,B.jsx)("a",{className:"".concat(y," ").concat(v," pr20"),onClick:function(){return t(!0)},children:"重新认证"}),(0,B.jsxs)("span",{className:b,children:[(0,B.jsx)("i",{className:"iconfont icon-wancheng font16 mr3"}),"已认证"]})]})]})]}),(0,B.jsxs)("div",{className:"".concat(g," mt10 font14"),children:[(0,B.jsx)("div",{className:v,children:"职业认证"}),(0,B.jsxs)("div",{className:"".concat(j," ").concat(_),children:[(0,B.jsx)("div",{children:"教师通过认证,可以克隆实训、免金币查看实训答案和隐藏测试集..."}),"uncertified"===w&&(0,B.jsx)("a",{className:Z,onClick:function(){return t(!1)},children:"立即认证"}),"applying"===w&&(0,B.jsxs)("div",{children:[(0,B.jsx)("a",{className:"".concat(v," pr20"),onClick:function(){return i(!1)},children:"撤销认证"}),(0,B.jsx)("span",{className:N,children:"待审核"})]}),"certified"===w&&(0,B.jsxs)("div",{children:[(0,B.jsx)("a",{className:"".concat(y," ").concat(v," pr20"),onClick:function(){return t(!1)},children:"重新认证"}),(0,B.jsxs)("span",{className:b,children:[(0,B.jsx)("i",{className:"iconfont icon-wancheng font16 mr3"}),"已认证"]})]})]})]})]}),(0,B.jsx)("div",{className:"".concat(h," font14"),children:"* 我们确保你所提供的信息均处于严格保密状态,不会泄露"}),(0,B.jsx)(Y,{}),(0,B.jsx)(q.Z,{})]})}))},76707:function(e,n,a){e.exports=a.p+"static/student_img.9f825e80.png"}}]); |