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.
2 lines
12 KiB
2 lines
12 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[112],{CpkQ:function(z,J,_){z.exports={flex_box_center:"flex_box_center___1TLor",flex_space_between:"flex_space_between___2oHSZ",flex_box_vertical_center:"flex_box_vertical_center___1GsMX",flex_box_center_end:"flex_box_center_end___dUr0S",flex_box_column:"flex_box_column___15YZP",Selecttext:"Selecttext___1ucPb",Updatecount:"Updatecount___t5g1H",Spanradius:"Spanradius___F7XLb"}},jmm4:function(z,J,_){"use strict";_.r(J);var se=_("+L6B"),X=_("2/Rp"),le=_("5NDa"),te=_("5rEg"),ce=_("sPJy"),I=_("bE4q"),me=_("miYZ"),Q=_("tsqr"),V=_("9og8"),j=_("tJVT"),re=_("PpiC"),P=_("q1tI"),u=_.n(P),q=_("Ty5D"),H=_("55Ip"),ne=_("9kvl"),ae=_("CpkQ"),x=_.n(ae),oe=_("wyMu"),ie=_.n(oe),ue=_("YQfW"),pe=_.n(ue);function B(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */B=function(){return p};var p={},g=Object.prototype,v=g.hasOwnProperty,F=Object.defineProperty||function(r,e,t){r[e]=t.value},L=typeof Symbol=="function"?Symbol:{},W=L.iterator||"@@iterator",Z=L.asyncIterator||"@@asyncIterator",D=L.toStringTag||"@@toStringTag";function m(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{m({},"")}catch(r){m=function(t,n,o){return t[n]=o}}function Y(r,e,t,n){var o=e&&e.prototype instanceof d?e:d,a=Object.create(o.prototype),s=new A(n||[]);return F(a,"_invoke",{value:ee(r,t,s)}),a}function K(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(n){return{type:"throw",arg:n}}}p.wrap=Y;var h={};function d(){}function U(){}function y(){}var R={};m(R,W,function(){return this});var M=Object.getPrototypeOf,S=M&&M(M(G([])));S&&S!==g&&v.call(S,W)&&(R=S);var b=y.prototype=d.prototype=Object.create(R);function N(r){["next","throw","return"].forEach(function(e){m(r,e,function(t){return this._invoke(e,t)})})}function T(r,e){function t(o,a,s,l){var i=K(r[o],r,a);if(i.type!=="throw"){var f=i.arg,c=f.value;return c&&typeof c=="object"&&v.call(c,"__await")?e.resolve(c.__await).then(function(O){t("next",O,s,l)},function(O){t("throw",O,s,l)}):e.resolve(c).then(function(O){f.value=O,s(f)},function(O){return t("throw",O,s,l)})}l(i.arg)}var n;F(this,"_invoke",{value:function(a,s){function l(){return new e(function(i,f){t(a,s,i,f)})}return n=n?n.then(l,l):l()}})}function ee(r,e,t){var n="suspendedStart";return function(o,a){if(n==="executing")throw new Error("Generator is already running");if(n==="completed"){if(o==="throw")throw a;return k()}for(t.method=o,t.arg=a;;){var s=t.delegate;if(s){var l=w(s,t);if(l){if(l===h)continue;return l}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(n==="suspendedStart")throw n="completed",t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);n="executing";var i=K(r,e,t);if(i.type==="normal"){if(n=t.done?"completed":"suspendedYield",i.arg===h)continue;return{value:i.arg,done:t.done}}i.type==="throw"&&(n="completed",t.method="throw",t.arg=i.arg)}}}function w(r,e){var t=e.method,n=r.iterator[t];if(n===void 0)return e.delegate=null,t==="throw"&&r.iterator.return&&(e.method="return",e.arg=void 0,w(r,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),h;var o=K(n,r.iterator,e.arg);if(o.type==="throw")return e.method="throw",e.arg=o.arg,e.delegate=null,h;var a=o.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function $(r){var e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e.afterLoc=r[3]),this.tryEntries.push(e)}function C(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function A(r){this.tryEntries=[{tryLoc:"root"}],r.forEach($,this),this.reset(!0)}function G(r){if(r){var e=r[W];if(e)return e.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var t=-1,n=function o(){for(;++t<r.length;)if(v.call(r,t))return o.value=r[t],o.done=!1,o;return o.value=void 0,o.done=!0,o};return n.next=n}}return{next:k}}function k(){return{value:void 0,done:!0}}return U.prototype=y,F(b,"constructor",{value:y,configurable:!0}),F(y,"constructor",{value:U,configurable:!0}),U.displayName=m(y,D,"GeneratorFunction"),p.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return!!e&&(e===U||(e.displayName||e.name)==="GeneratorFunction")},p.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,y):(r.__proto__=y,m(r,D,"GeneratorFunction")),r.prototype=Object.create(b),r},p.awrap=function(r){return{__await:r}},N(T.prototype),m(T.prototype,Z,function(){return this}),p.AsyncIterator=T,p.async=function(r,e,t,n,o){o===void 0&&(o=Promise);var a=new T(Y(r,e,t,n),o);return p.isGeneratorFunction(e)?a:a.next().then(function(s){return s.done?s.value:a.next()})},N(b),m(b,D,"Generator"),m(b,W,function(){return this}),m(b,"toString",function(){return"[object Generator]"}),p.keys=function(r){var e=Object(r),t=[];for(var n in e)t.push(n);return t.reverse(),function o(){for(;t.length;){var a=t.pop();if(a in e)return o.value=a,o.done=!1,o}return o.done=!0,o}},p.values=G,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)t.charAt(0)==="t"&&v.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(f,c){return s.type="throw",s.arg=e,t.next=f,c&&(t.method="next",t.arg=void 0),!!c}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var l=v.call(a,"catchLoc"),i=v.call(a,"finallyLoc");if(l&&i){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&v.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(e==="break"||e==="continue")&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=e,s.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(s)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if(o.type==="throw"){var a=o.arg;C(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:G(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=void 0),h}},p}var _e=function(g){var v=g.globalSetting,F=g.loading,L=g.dispatch,W=Object(re.a)(g,["globalSetting","loading","dispatch"]),Z=Object(P.useState)(),D=Object(j.a)(Z,2),m=D[0],Y=D[1],K=Object(P.useState)(),h=Object(j.a)(K,2),d=h[0],U=h[1],y=Object(P.useState)(),R=Object(j.a)(y,2),M=R[0],S=R[1],b=Object(P.useState)(""),N=Object(j.a)(b,2),T=N[0],ee=N[1],w=Object(P.useRef)(null),$=Object(P.useState)(""),C=Object(j.a)($,2),A=C[0],G=C[1],k=Object(q.m)(),r=k.identifier,e=k.Teannameid,t=Object(q.k)();Object(P.useEffect)(function(){function l(){return i.apply(this,arguments)}function i(){return i=Object(V.a)(B().mark(function f(){var c;return B().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.t0=Y,E.next=3,L({type:"competitions/getHeader",payload:{identifier:r}});case 3:return E.t1=E.sent,(0,E.t0)(E.t1),E.next=7,L({type:"competitions/getTeamDetail",payload:{identifier:r,Teannameid:e}});case 7:c=E.sent,c&&U(c.data.name);case 9:case"end":return E.stop()}},f)})),i.apply(this,arguments)}r&&l()},[r]);function n(){S(w.current.getCroppedCanvas().toDataURL())}function o(){return a.apply(this,arguments)}function a(){return a=Object(V.a)(B().mark(function l(){var i;return B().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(d){c.next=3;break}return Q.b.info("\u961F\u4F0D\u540D\u4E0D\u80FD\u4E3A\u7A7A"),c.abrupt("return");case 3:return c.next=5,L({type:"competitions/UpTeam",payload:{identifier:r,Teannameid:e,name:d,image:A?w.current.getCroppedCanvas().toDataURL("image/jpeg"):void 0}});case 5:i=c.sent,(i==null?void 0:i.status)===0&&(Q.b.info("\u4FEE\u6539\u6210\u529F"),t.push("/competitions/index/".concat(r,"/enroll")));case 7:case"end":return c.stop()}},l)})),a.apply(this,arguments)}function s(l){var i=l.target.files[0];if(i&&i.size>2*1024*1024){Q.b.info("\u4EC5\u652F\u6301\u6587\u4EF6\u5927\u5C0F\u5C0F\u4E8E2M\u7684\u6587\u4EF6");return}var f=new FileReader;f.readAsBinaryString(i),f.onload=function(){var c=btoa(f.result);G("data:".concat(i.type,";base64,").concat(c))},f.onerror=function(){}}return u.a.createElement("div",{className:"edu-container minH500"},u.a.createElement(I.a,{className:"mt10",separator:">"},u.a.createElement(I.a.Item,null,u.a.createElement(H.Link,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),u.a.createElement(I.a.Item,null,u.a.createElement(H.Link,{to:"/competitions/index/".concat(r)},m&&m.name,m&&m.sub_title?m.sub_title:null)),u.a.createElement(I.a.Item,null,u.a.createElement(H.Link,{to:"/competitions/index/".concat(r,"/enroll")},"\u62A5\u540D")),u.a.createElement(I.a.Item,null,"\u7F16\u8F91\u6218\u961F\u4FE1\u606F")),u.a.createElement("div",{className:x.a.Selecttext},"\u7F16\u8F91\u6218\u961F"),u.a.createElement("div",{className:x.a.Updatecount},u.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"\u961F\u540D\uFF1A",u.a.createElement("p",{style:{marginTop:"15px",marginLeft:"8px",width:"544px"}},u.a.createElement(te.a,{placeholder:"\u8BF7\u8F93\u5165\u961F\u540D",value:d,maxLength:60,addonAfter:String(d&&d.length)+"/60",onChange:function(i){return U(i.target.value)}})),u.a.createElement("p",{style:{marginTop:"15px",marginLeft:"8px",width:"544px"}},u.a.createElement("span",null,"LOGO\uFF1A"),u.a.createElement("label",{id:"uploadBtn",style:{color:"#4DACFF",cursor:"pointer"}},u.a.createElement("input",{type:"file",className:"sr-only",id:"inputImage",name:"file",accept:"image/*",onChange:s,style:{display:"none"}}),"\u4E0A\u4F20LOGO"),"\xA0",u.a.createElement("span",null,"(\u652F\u6301jpg\u3001gif\u3001png\u683C\u5F0F\u7684\u56FE\u7247\uFF0C\u5EFA\u8BAE\u6587\u4EF6\u5C0F\u4E8E2M)")),u.a.createElement("div",{style:{marginTop:"15px",marginLeft:"8px",display:"flex"}},M?u.a.createElement("img",{className:x.a.Spanradius,src:M}):T?u.a.createElement("img",{className:x.a.Spanradius}):u.a.createElement("div",{className:x.a.Spanradius},d&&d.length>2?d&&d.substring(0,2):d),u.a.createElement(ie.a,{style:{width:"320px",height:"320px",marginLeft:"30px",background:"#EEEEEE"},src:A,guides:!1,ref:w,crop:n}))),u.a.createElement("div",{style:{marginTop:"15px",marginBottom:"15px"}},u.a.createElement(X.a,{type:"primary",onClick:function(){return o()}},"\u786E\u5B9A"),u.a.createElement(X.a,{style:{marginLeft:"15px"}},u.a.createElement(H.Link,{to:"/competitions/index/".concat(r,"/enroll")},"\u53D6\u6D88"))))};J.default=Object(ne.a)(function(p){var g=p.loading,v=p.globalSetting;return{globalSetting:v,loading:g.models.competitions}})(_e)}}]);
|