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