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