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/p__Shixuns__New__CreateImg....

2 lines
14 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[197,14],{Lmeb:function(Q,z,u){},qK93:function(Q,z,u){"use strict";u.r(z);var ye=u("miYZ"),ie=u("tsqr"),_e=u("k1fw"),ce=u("0Owb"),ge=u("+L6B"),V=u("2/Rp"),Pe=u("y8nQ"),P=u("Vl3Y"),Oe=u("5NDa"),Z=u("5rEg"),X=u("9og8"),q=u("tJVT"),de=u("PpiC"),be=u("OaEy"),H=u("2fM7"),Re=u("aHsQ"),me=u("sGsY"),W=u("q1tI"),s=u.n(W),ee=u("9kvl"),le=u("55Ip"),pe=u("Lmeb"),Le=u.n(pe),te=u("ErOA"),fe=u("sSgx"),ae=u.n(fe),se=u("1vsH"),he=u("aCH8"),ve=u.n(he);function D(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */D=function(){return d};var f,d={},O=Object.prototype,v=O.hasOwnProperty,b=Object.defineProperty||function(a,e,t){a[e]=t.value},U=typeof Symbol=="function"?Symbol:{},R=U.iterator||"@@iterator",K=U.asyncIterator||"@@asyncIterator",C=U.toStringTag||"@@toStringTag";function h(a,e,t){return Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),a[e]}try{h({},"")}catch(a){h=function(t,r,o){return t[r]=o}}function I(a,e,t,r){var o=e&&e.prototype instanceof Y?e:Y,n=Object.create(o.prototype),i=new G(r||[]);return b(n,"_invoke",{value:oe(a,t,i)}),n}function M(a,e,t){try{return{type:"normal",arg:a.call(e,t)}}catch(r){return{type:"throw",arg:r}}}d.wrap=I;var T="suspendedStart",ue="suspendedYield",ne="executing",F="completed",E={};function Y(){}function B(){}function y(){}var l={};h(l,R,function(){return this});var N=Object.getPrototypeOf,j=N&&N(N(A([])));j&&j!==O&&v.call(j,R)&&(l=j);var g=y.prototype=Y.prototype=Object.create(l);function x(a){["next","throw","return"].forEach(function(e){h(a,e,function(t){return this._invoke(e,t)})})}function w(a,e){function t(o,n,i,_){var c=M(a[o],a,n);if(c.type!=="throw"){var p=c.arg,m=p.value;return m&&typeof m=="object"&&v.call(m,"__await")?e.resolve(m.__await).then(function(L){t("next",L,i,_)},function(L){t("throw",L,i,_)}):e.resolve(m).then(function(L){p.value=L,i(p)},function(L){return t("throw",L,i,_)})}_(c.arg)}var r;b(this,"_invoke",{value:function(n,i){function _(){return new e(function(c,p){t(n,i,c,p)})}return r=r?r.then(_,_):_()}})}function oe(a,e,t){var r=T;return function(o,n){if(r===ne)throw new Error("Generator is already running");if(r===F){if(o==="throw")throw n;return{value:f,done:!0}}for(t.method=o,t.arg=n;;){var i=t.delegate;if(i){var _=$(i,t);if(_){if(_===E)continue;return _}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(r===T)throw r=F,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);r=ne;var c=M(a,e,t);if(c.type==="normal"){if(r=t.done?F:ue,c.arg===E)continue;return{value:c.arg,done:t.done}}c.type==="throw"&&(r=F,t.method="throw",t.arg=c.arg)}}}function $(a,e){var t=e.method,r=a.iterator[t];if(r===f)return e.delegate=null,t==="throw"&&a.iterator.return&&(e.method="return",e.arg=f,$(a,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),E;var o=M(r,a.iterator,e.arg);if(o.type==="throw")return e.method="throw",e.arg=o.arg,e.delegate=null,E;var n=o.arg;return n?n.done?(e[a.resultName]=n.value,e.next=a.nextLoc,e.method!=="return"&&(e.method="next",e.arg=f),e.delegate=null,E):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,E)}function J(a){var e={tryLoc:a[0]};1 in a&&(e.catchLoc=a[1]),2 in a&&(e.finallyLoc=a[2],e.afterLoc=a[3]),this.tryEntries.push(e)}function S(a){var e=a.completion||{};e.type="normal",delete e.arg,a.completion=e}function G(a){this.tryEntries=[{tryLoc:"root"}],a.forEach(J,this),this.reset(!0)}function A(a){if(a||a===""){var e=a[R];if(e)return e.call(a);if(typeof a.next=="function")return a;if(!isNaN(a.length)){var t=-1,r=function o(){for(;++t<a.length;)if(v.call(a,t))return o.value=a[t],o.done=!1,o;return o.value=f,o.done=!0,o};return r.next=r}}throw new TypeError(typeof a+" is not iterable")}return B.prototype=y,b(g,"constructor",{value:y,configurable:!0}),b(y,"constructor",{value:B,configurable:!0}),B.displayName=h(y,C,"GeneratorFunction"),d.isGeneratorFunction=function(a){var e=typeof a=="function"&&a.constructor;return!!e&&(e===B||(e.displayName||e.name)==="GeneratorFunction")},d.mark=function(a){return Object.setPrototypeOf?Object.setPrototypeOf(a,y):(a.__proto__=y,h(a,C,"GeneratorFunction")),a.prototype=Object.create(g),a},d.awrap=function(a){return{__await:a}},x(w.prototype),h(w.prototype,K,function(){return this}),d.AsyncIterator=w,d.async=function(a,e,t,r,o){o===void 0&&(o=Promise);var n=new w(I(a,e,t,r),o);return d.isGeneratorFunction(e)?n:n.next().then(function(i){return i.done?i.value:n.next()})},x(g),h(g,C,"Generator"),h(g,R,function(){return this}),h(g,"toString",function(){return"[object Generator]"}),d.keys=function(a){var e=Object(a),t=[];for(var r in e)t.push(r);return t.reverse(),function o(){for(;t.length;){var n=t.pop();if(n in e)return o.value=n,o.done=!1,o}return o.done=!0,o}},d.values=A,G.prototype={constructor:G,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEach(S),!e)for(var t in this)t.charAt(0)==="t"&&v.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=f)},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 r(p,m){return i.type="throw",i.arg=e,t.next=p,m&&(t.method="next",t.arg=f),!!m}for(var o=this.tryEntries.length-1;o>=0;--o){var n=this.tryEntries[o],i=n.completion;if(n.tryLoc==="root")return r("end");if(n.tryLoc<=this.prev){var _=v.call(n,"catchLoc"),c=v.call(n,"finallyLoc");if(_&&c){if(this.prev<n.catchLoc)return r(n.catchLoc,!0);if(this.prev<n.finallyLoc)return r(n.finallyLoc)}else if(_){if(this.prev<n.catchLoc)return r(n.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return r(n.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&v.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var n=o;break}}n&&(e==="break"||e==="continue")&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var i=n?n.completion:{};return i.type=e,i.arg=t,n?(this.method="next",this.next=n.finallyLoc,E):this.complete(i)},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),E},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),E}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var o=r.completion;if(o.type==="throw"){var n=o.arg;S(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:A(e),resultName:t,nextLoc:r},this.method==="next"&&(this.arg=f),E}},d}var De=me.a.Countdown,re=H.a.Option,Ee=function(d){var O,v,b,U,R,K,C,h,I,M,T,ue=d.classroomList,ne=d.globalSetting,F=d.loading,E=d.dispatch,Y=Object(de.a)(d,["classroomList","globalSetting","loading","dispatch"]),B=Object(W.useState)(),y=Object(q.a)(B,2),l=y[0],N=y[1],j=Object(W.useState)(60),g=Object(q.a)(j,2),x=g[0],w=g[1],oe=Object(W.useState)(!1),$=Object(q.a)(oe,2),J=$[0],S=$[1];Object(W.useEffect)(function(){G()},[]);function G(){return A.apply(this,arguments)}function A(){return A=Object(X.a)(D().mark(function i(){var _;return D().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,Object(te.a)("/api/mirror_applies/new.json",{method:"get"});case 2:_=p.sent,N(_);case 4:case"end":return p.stop()}},i)})),A.apply(this,arguments)}var a={labelCol:{span:4},wrapperCol:{span:20}};function e(i){return t.apply(this,arguments)}function t(){return t=Object(X.a)(D().mark(function i(_){var c;return D().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return Object(se.P)(["\u5B9E\u8DF5\u9879\u76EE","\u65B0\u5EFA\u5B9E\u8DF5\u9879\u76EE","\u7533\u8BF7\u955C\u50CF"]),m.next=3,Object(te.a)("/api/mirror_applies.json",{method:"post",body:Object(_e.a)({},_)});case 3:c=m.sent,(c==null?void 0:c.status)===0&&(ie.b.info("\u7533\u8BF7\u6210\u529F"),ee.c.push("/shixuns/new/".concat(c==null?void 0:c.id,"/imagepreview")));case 5:case"end":return m.stop()}},i)})),t.apply(this,arguments)}function r(){return o.apply(this,arguments)}function o(){return o=Object(X.a)(D().mark(function i(){var _,c,p,m;return D().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return p="79e33abd4b6588941ab7622aed1e67e8",k.next=3,Object(te.a)("/api/mirror_applies/send_code.json",{method:"get",params:{login:l==null||((_=l.data)===null||_===void 0)?void 0:_.phone,smscode:ve()(p+(l==null||((c=l.data)===null||c===void 0)?void 0:c.phone))}});case 3:m=k.sent,(m==null?void 0:m.status)===0&&(ie.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),n(),S(!0));case 5:case"end":return k.stop()}},i)})),o.apply(this,arguments)}function n(){w(60);var i=setInterval(function(){--x,x>-1?w(x):(clearInterval(i),S(!1))},1e3)}return s.a.createElement("div",{className:"edu-container minH500",style:{width:"1200px",background:"#ffffff",marginTop:"40px"}},s.a.createElement("p",{className:ae.a.Heard},"\u65B0\u5EFA\u5B9E\u9A8C\u955C\u50CF"),s.a.createElement("div",{className:ae.a.Divle}),s.a.createElement(P.a,Object(ce.a)({},a,{className:ae.a.formWrap,onFinish:e}),s.a.createElement(P.a.Item,{wrapperCol:{offset:0,span:16},label:"\u955C\u50CF\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u955C\u50CF\u540D\u79F0"}]},s.a.createElement(Z.a,{bordered:!1,placeholder:"\u4F8B\u5982\uFF1A***********"})),s.a.createElement(P.a.Item,{wrapperCol:{offset:0,span:8},label:"\u57FA\u7840\u73AF\u5883",name:"mirror_repository_id",className:"customItemSelect",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u57FA\u7840\u73AF\u5883"}]},s.a.createElement(H.a,{bordered:!1,placeholder:"\u8BF7\u9009\u62E9\u57FA\u7840\u73AF\u5883"},l==null||((O=l.data)===null||O===void 0||((v=O.basic_environment_config)===null||v===void 0))?void 0:v.map(function(i,_){return s.a.createElement(re,{value:i.id},i.name)}))),s.a.createElement(P.a.Item,{wrapperCol:{offset:0,span:8},label:"\u5B9E\u9A8C\u73AF\u5883\u914D\u7F6E",name:"cpu_memory_limit",className:"customItemSelect",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5B9E\u9A8C\u73AF\u5883\u914D\u7F6E"}]},s.a.createElement(H.a,{bordered:!1,placeholder:"\u8BF7\u9009\u62E9\u5B9E\u9A8C\u73AF\u5883\u914D\u7F6E"},l==null||((b=l.data)===null||b===void 0||((U=b.cpu_memory_limit_config)===null||U===void 0))?void 0:U.map(function(i,_){return s.a.createElement(re,{value:i},i)}))),s.a.createElement(P.a.Item,{wrapperCol:{offset:0,span:8},label:"\u5B9E\u9A8C\u73AF\u5883\u4F7F\u7528\u65F6\u957F",name:"time_limit",className:"customItemSelect",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5B9E\u9A8C\u73AF\u5883\u4F7F\u7528\u65F6\u957F"}]},s.a.createElement(H.a,{bordered:!1,placeholder:"\u8BF7\u9009\u62E9\u5B9E\u9A8C\u73AF\u5883\u4F7F\u7528\u65F6\u957F"},l==null||((R=l.data)===null||R===void 0||((K=R.time_limit_config)===null||K===void 0))?void 0:K.map(function(i,_){return s.a.createElement(re,{value:i.value},i.name)}))),s.a.createElement(P.a.Item,{wrapperCol:{offset:0,span:8},label:"\u77ED\u4FE1\u9A8C\u8BC1\u7801",name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u77ED\u4FE1\u9A8C\u8BC1\u7801"}]},s.a.createElement("div",null,s.a.createElement("div",{style:{display:"flex"}},s.a.createElement(Z.a,{bordered:!1,placeholder:"\u4F8B\u5982\uFF1A***********"})," ",s.a.createElement(V.a,{disabled:J||!(l==null||((C=l.data)===null||C===void 0)?void 0:C.phone),onClick:function(){return r()},type:"primary",style:{marginLeft:"20px",height:"40px",width:"120px",marginTop:"5px"}},J?"\u91CD\u65B0\u53D1\u9001".concat(x,"s"):"\u83B7\u53D6\u9A8C\u8BC1\u7801")),(l==null||((h=l.data)===null||h===void 0)?void 0:h.phone)&&s.a.createElement("div",null,s.a.createElement("span",{style:{color:"#999999",fontSize:"14px"}},"\u9884\u7559\u624B\u673A\u53F7",(l==null||((I=l.data)===null||I===void 0)?void 0:I.phone.substr(0,3))+"****"+(l==null||((M=l.data)===null||M===void 0)?void 0:M.phone.substr(7,11))),s.a.createElement(le.Link,{style:{marginLeft:"5px",fontSize:"14px"},to:"/account/secure"},"\u66F4\u6362")),!(l==null||((T=l.data)===null||T===void 0)?void 0:T.phone)&&s.a.createElement("div",null,s.a.createElement("span",{style:{color:"#999999",fontSize:"14px"}},"\u60A8\u6682\u672A\u7ED1\u5B9A\u624B\u673A\u53F7"),s.a.createElement(le.Link,{style:{marginLeft:"5px",fontSize:"14px"},to:"/account/secure"},"\u53BB\u7ED1\u5B9A")))),s.a.createElement(P.a.Item,{wrapperCol:{offset:0,span:16},label:"\u5907\u6CE8",name:"remark",className:"textAreaSize",rules:[{required:!1,message:"\u8BF7\u8F93\u5165\u5907\u6CE8"}]},s.a.createElement("div",{style:{display:"flex"}},s.a.createElement(Z.a.TextArea,{bordered:!1,style:{resize:"none",height:"120px"},placeholder:"\u4F8B\u5982\uFF1A***********"}))),s.a.createElement(P.a.Item,{wrapperCol:{offset:0,span:20}},s.a.createElement("div",{style:{textAlign:"end",marginBottom:30}},s.a.createElement(V.a,{size:"large",onClick:function(){Object(se.P)(["\u5B9E\u8DF5\u9879\u76EE","\u65B0\u5EFA\u5B9E\u8DF5\u9879\u76EE","\u53D6\u6D88\u7533\u8BF7\u955C\u50CF"]),ee.c.goBack()}},"\u53D6\u6D88"),s.a.createElement(V.a,{size:"large",style:{marginLeft:"25px"},type:"primary",htmlType:"submit"},"\u7533\u8BF7")))))};z.default=Object(ee.a)(function(f){var d=f.classroomList,O=f.loading,v=f.globalSetting;return{classroomList:d,globalSetting:v,loading:O.models.classroomList}})(Ee)},sSgx:function(Q,z,u){Q.exports={Heard:"Heard___Kx6U9",Divle:"Divle___3T4TG",formWrap:"formWrap___2hxsi"}}}]);