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

1 line
13 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[187],{Lmeb:function(e,t,r){},qK93:function(e,t,r){"use strict";r.r(t);r("miYZ");var n=r("tsqr"),a=r("k1fw"),o=r("0Owb"),i=(r("+L6B"),r("2/Rp")),l=(r("y8nQ"),r("Vl3Y")),c=(r("5NDa"),r("5rEg")),s=r("9og8"),u=r("tJVT"),p=r("PpiC"),f=(r("OaEy"),r("2fM7")),d=(r("aHsQ"),r("sGsY")),h=r("q1tI"),m=r.n(h),v=r("9kvl"),y=r("55Ip"),g=(r("Lmeb"),r("ErOA")),b=r("sSgx"),w=r.n(b),E=r("aCH8"),x=r.n(E);function L(){L=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(I){c=function(e,t,r){return e[t]=r}}function s(e,t,r,a){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),l=new j(a||[]);return n(i,"_invoke",{value:E(e,r,l)}),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(I){return{type:"throw",arg:I}}}e.wrap=s;var p={};function f(){}function d(){}function h(){}var m={};c(m,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==t&&r.call(y,o)&&(m=y);var g=h.prototype=f.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function a(n,o,i,l){var c=u(e[n],e,o);if("throw"!==c.type){var s=c.arg,p=s.value;return p&&"object"==typeof p&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){a("next",e,i,l)}),(function(e){a("throw",e,i,l)})):t.resolve(p).then((function(e){s.value=e,i(s)}),(function(e){return a("throw",e,i,l)}))}l(c.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){a(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function E(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var l=x(i,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var a=u(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,p;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function _(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 O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=h,n(g,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:d,configurable:!0}),d.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new w(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(g),c(g,l,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,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(O),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},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),O(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;O(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}d["a"].Countdown;var _=f["a"].Option,O=function(e){e.classroomList,e.globalSetting,e.loading,e.dispatch,Object(p["a"])(e,["classroomList","globalSetting","loading","dispatch"]);var t,r,d,b,E,O,j,S,k,I,N=Object(h["useState"])(),C=Object(u["a"])(N,2),T=C[0],G=C[1],q=Object(h["useState"])(60),z=Object(u["a"])(q,2),P=z[0],A=z[1],F=Object(h["useState"])(!1),H=Object(u["a"])(F,2),Y=H[0],D=H[1];function B(){return J.apply(this,arguments)}function J(){return J=Object(s["a"])(L().mark((function e(){var t;return L().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(g["a"])("/api/mirror_applies/new.json",{method:"get"});case 2:t=e.sent,G(t);case 4:case"end":return e.stop()}}),e)}))),J.apply(this,arguments)}Object(h["useEffect"])((function(){B()}),[]);var W={labelCol:{span:4},wrapperCol:{span:20}};function K(e){return Q.apply(this,arguments)}function Q(){return Q=Object(s["a"])(L().mark((function e(t){var r;return L().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(g["a"])("/api/mirror_applies.json",{method:"post",body:Object(a["a"])({},t)});case 2:r=e.sent,0===(null===r||void 0===r?void 0:r.status)&&(n["b"].info("\u7533\u8bf7\u6210\u529f"),v["c"].push("/shixuns/new/".concat(null===r||void 0===r?void 0:r.id,"/imagepreview")));case 4:case"end":return e.stop()}}),e)}))),Q.apply(this,arguments)}function V(){return M.apply(this,arguments)}function M(){return M=Object(s["a"])(L().mark((function e(){var t,r,a,o;return L().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a="79e33abd4b6588941ab7622aed1e67e8",e.next=3,Object(g["a"])("/api/mirror_applies/send_code.json",{method:"get",params:{login:null===T||void 0===T||null===(t=T.data)||void 0===t?void 0:t.phone,smscode:x()(a+(null===T||void 0===T||null===(r=T.data)||void 0===r?void 0:r.phone))}});case 3:o=e.sent,0===(null===o||void 0===o?void 0:o.status)&&(n["b"].info("\u83b7\u53d6\u9a8c\u8bc1\u7801\u6210\u529f"),R(),D(!0));case 5:case"end":return e.stop()}}),e)}))),M.apply(this,arguments)}function R(){A(60);var e=setInterval((function(){--P,P>-1?A(P):(clearInterval(e),D(!1))}),1e3)}return m.a.createElement("div",{className:"edu-container minH500",style:{width:"1200px",background:"#ffffff",marginTop:"40px"}},m.a.createElement("p",{className:w.a.Heard},"\u65b0\u5efa\u5b9e\u9a8c\u955c\u50cf"),m.a.createElement("div",{className:w.a.Divle}),m.a.createElement(l["a"],Object(o["a"])({},W,{className:w.a.formWrap,onFinish:K}),m.a.createElement(l["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"}]},m.a.createElement(c["a"],{bordered:!1,placeholder:"\u4f8b\u5982\uff1a***********"})),m.a.createElement(l["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"}]},m.a.createElement(f["a"],{bordered:!1,placeholder:"\u8bf7\u9009\u62e9\u57fa\u7840\u73af\u5883"},null===T||void 0===T||null===(t=T.data)||void 0===t||null===(r=t.basic_environment_config)||void 0===r?void 0:r.map((function(e,t){return m.a.createElement(_,{value:e.id},e.name)})))),m.a.createElement(l["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"}]},m.a.createElement(f["a"],{bordered:!1,placeholder:"\u8bf7\u9009\u62e9\u5b9e\u9a8c\u73af\u5883\u914d\u7f6e"},null===T||void 0===T||null===(d=T.data)||void 0===d||null===(b=d.cpu_memory_limit_config)||void 0===b?void 0:b.map((function(e,t){return m.a.createElement(_,{value:e},e)})))),m.a.createElement(l["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"}]},m.a.createElement(f["a"],{bordered:!1,placeholder:"\u8bf7\u9009\u62e9\u5b9e\u9a8c\u73af\u5883\u4f7f\u7528\u65f6\u957f"},null===T||void 0===T||null===(E=T.data)||void 0===E||null===(O=E.time_limit_config)||void 0===O?void 0:O.map((function(e,t){return m.a.createElement(_,{value:e.value},e.name)})))),m.a.createElement(l["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"}]},m.a.createElement("div",null,m.a.createElement("div",{style:{display:"flex"}},m.a.createElement(c["a"],{bordered:!1,placeholder:"\u4f8b\u5982\uff1a***********"})," ",m.a.createElement(i["a"],{disabled:Y,onClick:function(){return V()},type:"primary",style:{marginLeft:"20px",height:"40px",width:"120px",marginTop:"5px"}},Y?"\u91cd\u65b0\u53d1\u9001".concat(P,"s"):"\u83b7\u53d6\u9a8c\u8bc1\u7801")),(null===T||void 0===T||null===(j=T.data)||void 0===j?void 0:j.phone)&&m.a.createElement("div",null,m.a.createElement("span",{style:{color:"#999999",fontSize:"14px"}},"\u9884\u7559\u624b\u673a\u53f7",(null===T||void 0===T||null===(S=T.data)||void 0===S?void 0:S.phone.substr(0,3))+"****"+(null===T||void 0===T||null===(k=T.data)||void 0===k?void 0:k.phone.substr(7,11))),m.a.createElement(y["Link"],{style:{marginLeft:"5px",fontSize:"14px"},to:"/account/secure"},"\u66f4\u6362")),!(null===T||void 0===T||null===(I=T.data)||void 0===I?void 0:I.phone)&&m.a.createElement("div",null,m.a.createElement("span",{style:{color:"#999999",fontSize:"14px"}},"\u60a8\u6682\u672a\u7ed1\u5b9a\u624b\u673a\u53f7"),m.a.createElement(y["Link"],{style:{marginLeft:"5px",fontSize:"14px"},to:"/account/secure"},"\u53bb\u7ed1\u5b9a")))),m.a.createElement(l["a"].Item,{wrapperCol:{offset:0,span:16},label:"\u5907\u6ce8",name:"remark",className:"textAreaSize",rules:[{required:!1,message:"\u8bf7\u8f93\u5165\u5907\u6ce8"}]},m.a.createElement("div",{style:{display:"flex"}},m.a.createElement(c["a"].TextArea,{bordered:!1,style:{resize:"none",height:"120px"},placeholder:"\u4f8b\u5982\uff1a***********"}))),m.a.createElement(l["a"].Item,{wrapperCol:{offset:0,span:20}},m.a.createElement("div",{style:{textAlign:"end",marginBottom:30}},m.a.createElement(i["a"],{size:"large",onClick:function(){v["c"].goBack()}},"\u53d6\u6d88"),m.a.createElement(i["a"],{size:"large",style:{marginLeft:"25px"},type:"primary",htmlType:"submit"},"\u7533\u8bf7")))))};t["default"]=Object(v["a"])((function(e){var t=e.classroomList,r=e.loading,n=e.globalSetting;return{classroomList:t,globalSetting:n,loading:r.models.classroomList}}))(O)},sSgx:function(e,t,r){e.exports={Heard:"Heard___Kx6U9",Divle:"Divle___3T4TG",formWrap:"formWrap___2hxsi"}}}]);