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.
1 line
39 KiB
1 line
39 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[128],{"500L":function(t,e,r){"use strict";r.d(e,"a",(function(){return y}));r("DZo9");var n=r("8z0m"),o=(r("+L6B"),r("2/Rp")),a=(r("2qtc"),r("kLXV")),i=r("9og8"),c=r("k1fw"),u=r("oBTY"),l=(r("miYZ"),r("tsqr")),s=r("tJVT"),f=r("q1tI"),h=r.n(f),p=r("m3rI"),d=r("wzkS"),v=r("y5JW");function m(){m=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function g(){}function w(){}function b(){}var E={};l(E,i,(function(){return this}));var x=Object.getPrototypeOf,L=x&&x(x(T([])));L&&L!==r&&n.call(L,i)&&(E=L);var j=b.prototype=g.prototype=Object.create(E);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return w.prototype=b,o(j,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},O(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new _(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(j),l(j,u,"Generator"),l(j,i,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function y(t){var e=[];return t&&t.length>0&&(e=t.map((function(t){return{uid:t.id,id:t.id,name:t.title+v["c"]+t.filesize,url:t.url,filesize:t.filesize,status:"done",response:{id:t.id}}}))),e}e["b"]=function(t){var e=t.value,r=t.onChange,y=t.className,g=t.maxSize,w=void 0===g?150:g,b=t.title,E=void 0===b?"\u4e0a\u4f20\u9644\u4ef6":b,x=t.showRemoveModal,L=void 0!==x&&x,j=t.accept,O=void 0===j?"":j,_=t.number,k=void 0===_?1e3:_,N=Object(f["useState"])(!1),S=Object(s["a"])(N,2),I=S[0],P=S[1],T=Object(f["useState"])([]),G=Object(s["a"])(T,2),F=G[0],C=G[1],z={multiple:!0,disabled:I,accept:O,withCredentials:!0,fileList:e,beforeUpload:function(t,e){var r=t.size/1024/1024;return F.concat(e).length>k?(l["b"].error("\u6700\u591a\u53ea\u80fd\u4e0a\u4f20".concat(k,"\u4e2a\u6587\u4ef6")),!1):r<w||(l["b"].error("\u8be5\u6587\u4ef6\u65e0\u6cd5\u4e0a\u4f20\u3002\u8d85\u8fc7\u6587\u4ef6\u5927\u5c0f\u9650\u5236(".concat(w,"MB),\u5efa\u8bae\u4e0a\u4f20\u5230\u767e\u5ea6\u4e91\u7b49\u5176\u5b83\u5171\u4eab\u5de5\u5177\u91cc\uff0c\u7136\u540e\u518dtxt\u6587\u6863\u91cc\u7ed9\u51fa\u94fe\u63a5\u4ee5\u53ca\u5171\u4eab\u5bc6\u7801\u5e76\u4e0a\u4f20")),!1)},action:"".concat(p["a"].API_SERVER,"/api/attachments.json"),onChange:function(t){var e=Object(u["a"])(t.fileList);e.length>=k?P(!0):P(!1),C(Object(u["a"])(e)),e=e.map((function(t){var e,r;(null===t||void 0===t||null===(e=t.response)||void 0===e?void 0:e.id)&&(t.url="/api/attachments/".concat(null===t||void 0===t||null===(r=t.response)||void 0===r?void 0:r.id));return-1===t.name.indexOf(v["c"])&&(t.name="".concat(t.name).concat(v["c"]).concat(Object(v["a"])(t.size))),Object(c["a"])({},t)})),console.log("info:",t),r(e)},onRemove:function(){var t=Object(i["a"])(m().mark((function t(e){var r;return m().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=function(){var t=Object(i["a"])(m().mark((function t(){var r,n;return m().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=e.response?e.response.id:e.id,!r){t.next=8;break}return t.next=4,Object(d["d"])(e.response?e.response.id:e.uid);case 4:return n=t.sent,t.abrupt("return",n);case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),!L){t.next=5;break}return t.abrupt("return",new Promise((function(t,e){a["a"].confirm({centered:!0,width:530,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",title:"\u63d0\u793a",content:h.a.createElement("div",{className:"tc font16"},"\u662f\u5426\u786e\u8ba4\u5220\u9664?"),onOk:function(){var e=Object(i["a"])(m().mark((function e(){return m().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:e.sent,l["b"].success("\u5220\u9664\u6210\u529f"),t(!0);case 5:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}(),onCancel:function(){return t(!1)}})})));case 5:return t.next=7,r();case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}()};function A(t){t.preventDefault(),t.stopPropagation()}return h.a.createElement("div",{className:"multi-upload ".concat(y||"")},h.a.createElement(n["a"],z,h.a.createElement(o["a"],{disabled:I,type:"primary",ghost:!0},E),h.a.createElement("span",{onClick:A,style:{marginLeft:10}},"(\u5355\u4e2a\u6587\u4ef6\u6700\u5927",w,"M) ")))}},"7/Dv":function(t,e,r){t.exports={bg:"bg___2rJyo",flexRow:"flexRow___2xuIa",flexJustifyCenter:"flexJustifyCenter___Z3bJt",flexAlignEnd:"flexAlignEnd___v7Ww-",flexAlignCenter:"flexAlignCenter___223DA",flexColumn:"flexColumn___3CNqR",formWrap:"formWrap___2b6uL",titleWrap:"titleWrap___1CMQA",fieldWrap:"fieldWrap___2BRrD",mdWrap:"mdWrap___3UYzt",backgroundFa:"backgroundFa___32wpj",button:"button___MHDAn"}},CKgm:function(t,e,r){"use strict";r.r(e);r("+L6B");var n=r("2/Rp"),o=(r("5NDa"),r("5rEg")),a=(r("sPJy"),r("bE4q")),i=(r("miYZ"),r("tsqr")),c=r("9og8"),u=r("k1fw"),l=(r("y8nQ"),r("Vl3Y")),s=r("tJVT"),f=r("PpiC"),h=(r("OaEy"),r("2fM7")),p=r("q1tI"),d=r.n(p),v=r("Ty5D"),m=r("9kvl"),y=r("55Ip"),g=r("Ot1p"),w=r("500L"),b=r("h+Ho"),E=r("7/Dv"),x=r.n(E);function L(){L=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof y?e:y,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",d="executing",v="completed",m={};function y(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(T([])));x&&x!==r&&n.call(x,i)&&(b=x);var j=w.prototype=y.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=w,o(j,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},O(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new _(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(j),l(j,u,"Generator"),l(j,i,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}var j=h["a"].Option,O=function(t){t.forumsDetail,t.globalSetting,t.loading,t.dispatch,Object(f["a"])(t,["forumsDetail","globalSetting","loading","dispatch"]);var e,r,E,O=Object(v["m"])(),_=l["a"].useForm(),k=Object(s["a"])(_,1),N=k[0],S=Object(p["useState"])({}),I=Object(s["a"])(S,2),P=I[0],T=I[1],G=Object(p["useState"])(0),F=Object(s["a"])(G,2),C=F[0],z=F[1],A=Object(p["useState"])(!1),D=Object(s["a"])(A,2),W=D[0],B=D[1],R=Object(p["useState"])({}),Y=Object(s["a"])(R,2),M=Y[0],q=Y[1],J=Object(p["useState"])(1),V=Object(s["a"])(J,2),Z=V[0],U=V[1];Object(p["useEffect"])((function(){if(H(),O.memoId)B(!0),K();else{B(!1);var t={forum_id:5};T(Object(u["a"])({},t)),N.setFieldsValue(Object(u["a"])({},t))}}),[O.memoId]);var H=function(){var t=Object(c["a"])(L().mark((function t(){var e;return L().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(b["f"])({});case 2:e=t.sent,q(e||{});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),K=function(){var t=Object(c["a"])(L().mark((function t(){var e,r,n;return L().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(b["e"])({id:O.memoId});case 2:if(t.t0=t.sent,t.t0){t.next=5;break}t.t0={};case 5:r=t.t0,n={subject:r.subject,content:r.content,attachments:Object(w["a"])(r.attachments),forum_id:r.forum_id,memo_tags:null===(e=r.memo_tags)||void 0===e?void 0:e.map((function(t){return t.id}))},T(Object(u["a"])({},n)),N.setFieldsValue(Object(u["a"])({},n));case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Q=function(){var t=Object(c["a"])(L().mark((function t(e){var r,n,o,a;return L().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(o=Object(u["a"])(Object(u["a"])({id:W?O.memoId:null},P),{},{attachment_ids:null===(r=P.attachments)||void 0===r||null===(n=r.filter((function(t){var e;return null===(e=t.response)||void 0===e?void 0:e.id})))||void 0===n?void 0:n.map((function(t){var e;return null===(e=t.response)||void 0===e?void 0:e.id})),tags:P.memo_tags}),!W){t.next=7;break}return t.next=4,Object(b["n"])(o);case 4:t.t0=t.sent,t.next=10;break;case 7:return t.next=9,Object(b["j"])(o);case 9:t.t0=t.sent;case 10:a=t.t0,z(0),0===(null===a||void 0===a?void 0:a.status)&&(i["b"].success(null===a||void 0===a?void 0:a.message),1===Z?m["c"].push("/forums/".concat(W?null===O||void 0===O?void 0:O.memoId:null===a||void 0===a?void 0:a.memo_id)):m["c"].push("/forums/".concat(W?null===O||void 0===O?void 0:O.memoId:null===a||void 0===a?void 0:a.memo_id,"/edit")));case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),X=function(){document.body.scrollIntoView(),window.location.href.includes("new")?m["c"].goBack():m["c"].push("/forums/".concat(O.memoId))};return d.a.createElement("section",{className:x.a.bg},d.a.createElement("section",{className:"animated fadeIn mb10"},d.a.createElement("aside",{className:"mt10"},d.a.createElement(a["a"],{separator:"/"},d.a.createElement(a["a"].Item,null,d.a.createElement(y["Link"],{to:"/forums"},"\u4ea4\u6d41\u95ee\u7b54")),d.a.createElement(a["a"].Item,null,"\u8be6\u60c5")))),d.a.createElement("aside",{className:"bg-white font16 pt20 pb20 pl20"},W?"\u7f16\u8f91\u8bdd\u9898":"\u53d1\u5e03\u8bdd\u9898"),d.a.createElement(l["a"],{form:N,className:x.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(t,e){console.log(e,"values"),T(Object(u["a"])(Object(u["a"])({},P),t))},onFinish:Q,onFinishFailed:function(){z(0)}},d.a.createElement("div",{className:x.a.fieldWrap},d.a.createElement(l["a"].Item,{name:"subject",label:d.a.createElement("span",{className:"font16"},"\u8bdd\u9898\u540d\u79f0: "),rules:[{required:!0,message:"\u8bf7\u5148\u8f93\u5165\u8bdd\u9898\u540d\u79f0"}]},d.a.createElement(o["a"],{maxLength:50,suffix:"".concat((null===(e=P.subject)||void 0===e?void 0:e.length)||0,"/50")}))),d.a.createElement("div",{className:x.a.mdWrap},d.a.createElement(l["a"].Item,{name:"content",label:d.a.createElement("span",{className:"font16"},"\u5185\u5bb9: "),rules:[{required:!0,message:"\u8bf7\u5148\u8f93\u5165\u8bdd\u9898\u5185\u5bb9"}]},d.a.createElement(g["a"],{height:600,id:"forums-new-content",watch:!0,defaultValue:P.content})),d.a.createElement("div",null,d.a.createElement(l["a"].Item,{name:"attachments",style:{width:350}},d.a.createElement(w["b"],{showRemoveModal:!0})))),d.a.createElement("div",{className:x.a.mdWrap},d.a.createElement(l["a"].Item,{name:"forum_id",label:d.a.createElement("span",{className:"font16"},"\u8bdd\u9898\u7c7b\u578b: "),rules:[{required:!0,message:"\u8bf7\u5148\u9009\u62e9\u8bdd\u9898\u7c7b\u578b"}]},d.a.createElement(h["a"],{style:{width:300}},null===M||void 0===M||null===(r=M.forums)||void 0===r?void 0:r.map((function(t){return d.a.createElement(j,{key:t.id,value:t.id},t.name)}))))),5===P.forum_id&&d.a.createElement("div",{className:x.a.mdWrap},d.a.createElement(l["a"].Item,{name:"memo_tags",label:d.a.createElement("span",{className:"font16"},"\u6280\u672f\u6807\u7b7e: "),rules:[{required:!0,message:"\u8bf7\u5148\u9009\u62e9\u6280\u672f\u6807\u7b7e"}]},d.a.createElement(h["a"],{style:{width:300},placeholder:"\u8bf7\u9009\u62e9\u6280\u672f\u6807\u7b7e",mode:"multiple",tokenSeparators:[";"],filterOption:function(t,e){return-1!=e.props.children.toLocaleLowerCase().indexOf(t.toLocaleLowerCase())}},null===M||void 0===M||null===(E=M.tag_list)||void 0===E?void 0:E.map((function(t){return d.a.createElement(j,{key:t.id,value:t.id},t.name)}))))),d.a.createElement("div",{className:x.a.backgroundFa},d.a.createElement("div",{className:"pt40 mb30"},d.a.createElement(l["a"].Item,null,d.a.createElement(n["a"],{size:"large",type:"primary",className:"".concat(x.a.button," mr20"),htmlType:"submit",loading:1===C,onClick:function(){U(1),z(1)}},"\u63d0\u4ea4"),d.a.createElement(n["a"],{size:"large",type:"primary",className:"".concat(x.a.button," mr20"),htmlType:"submit",loading:2===C,onClick:function(){U(2),z(2)}},"\u4fdd\u5b58"),d.a.createElement(n["a"],{size:"large",type:"primary",ghost:!0,className:"".concat(x.a.button," mr20"),onClick:X},"\u53d6\u6d88"))))))};e["default"]=Object(m["a"])((function(t){var e=t.forumsDetail,r=t.loading,n=t.globalSetting;return{forumsDetail:e,globalSetting:n,loading:r.models.forumsDetail}}))(O)},wzkS:function(t,e,r){"use strict";r.d(e,"c",(function(){return i})),r.d(e,"b",(function(){return c})),r.d(e,"d",(function(){return u})),r.d(e,"a",(function(){return s})),r.d(e,"e",(function(){return f}));var n=r("9og8"),o=r("ErOA");function a(){a=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",m="completed",y={};function g(){}function w(){}function b(){}var E={};s(E,c,(function(){return this}));var x=Object.getPrototypeOf,L=x&&x(x(T([])));L&&L!==r&&n.call(L,c)&&(E=L);var j=b.prototype=g.prototype=Object.create(E);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,a,i,c){var u=h(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=p;return function(a,i){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return w.prototype=b,o(j,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},O(_.prototype),s(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new _(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(j),s(j,l,"Generator"),s(j,c,(function(){return this})),s(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function i(t){return Object(o["c"])("libraries/".concat(t,".json"))}function c(){return Object(o["c"])("library_tags.json")}function u(t){return l.apply(this,arguments)}function l(){return l=Object(n["a"])(a().mark((function t(e){var r;return a().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(o["b"])("attachments/".concat(e,".json"));case 2:return r=t.sent,t.abrupt("return",0===r.status);case 4:case"end":return t.stop()}}),t)}))),l.apply(this,arguments)}function s(t){return Object(o["f"])("libraries.json",t)}function f(t,e){return Object(o["g"])("libraries/".concat(t,".json"),e)}},y5JW:function(t,e,r){"use strict";r.d(e,"c",(function(){return d})),r.d(e,"a",(function(){return v}));r("DZo9");var n=r("8z0m"),o=(r("+L6B"),r("2/Rp")),a=r("9og8"),i=r("k1fw"),c=r("oBTY"),u=(r("miYZ"),r("tsqr")),l=r("q1tI"),s=r.n(l),f=r("m3rI"),h=r("wzkS");function p(){p=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",d="suspendedYield",v="executing",m="completed",y={};function g(){}function w(){}function b(){}var E={};l(E,i,(function(){return this}));var x=Object.getPrototypeOf,L=x&&x(x(T([])));L&&L!==r&&n.call(L,i)&&(E=L);var j=b.prototype=g.prototype=Object.create(E);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return w.prototype=b,o(j,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},O(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new _(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(j),l(j,u,"Generator"),l(j,i,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var d="\u3000\u3000";function v(t){var e=["Bytes","KB","MB","GB","TB"];if(0==t)return"0 Byte";var r=parseInt(""+Math.floor(Math.log(t)/Math.log(1024)),10);return(t/Math.pow(1024,r)).toFixed(1)+" "+e[r]}e["b"]=function(t){var e=t.value,r=void 0===e?[]:e,l=t.onChange,m=t.className,y=t.maxSize,g=void 0===y?150:y,w=t.title,b=void 0===w?"\u6587\u4ef6\u4e0a\u4f20":w,E=t.accept,x=void 0===E?null:E,L={multiple:!1,fileList:r,accept:x,withCredentials:!0,beforeUpload:function(t){var e=t.size/1024/1024;return e<g||(u["b"].error("\u8be5\u6587\u4ef6\u65e0\u6cd5\u4e0a\u4f20\u3002\u8d85\u8fc7\u6587\u4ef6\u5927\u5c0f\u9650\u5236(".concat(g,"MB),\u5efa\u8bae\u4e0a\u4f20\u5230\u767e\u5ea6\u4e91\u7b49\u5176\u5b83\u5171\u4eab\u5de5\u5177\u91cc\uff0c\u7136\u540e\u518dtxt\u6587\u6863\u91cc\u7ed9\u51fa\u94fe\u63a5\u4ee5\u53ca\u5171\u4eab\u5bc6\u7801\u5e76\u4e0a\u4f20")),!1)},action:"".concat(f["a"].API_SERVER,"/api/attachments.json"),onChange:function(t){var e=Object(c["a"])(t.fileList);e=e.map((function(t){return-1===t.name.indexOf(d)&&(t.name="".concat(t.name).concat(d).concat(v(t.size))),Object(i["a"])({},t)})),l(e)},onRemove:function(){var t=Object(a["a"])(p().mark((function t(e){var r,n;return p().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=e.response?e.response.id:e.uid,!r){t.next=8;break}return t.next=4,Object(h["d"])(e.response?e.response.id:e.id);case 4:return n=t.sent,t.abrupt("return",n);case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}()};function j(t){t.preventDefault(),t.stopPropagation()}return s.a.createElement("div",{className:"single-upload ".concat(m||"")},s.a.createElement(n["a"],L,s.a.createElement(o["a"],{type:"primary",title:r.length>0?"\u6bcf\u6b21\u53ea\u80fd\u4e0a\u4f20\u4e00\u4e2a\u8d44\u6e90\uff0c \u5220\u9664\u4e0b\u9762\u8d44\u6e90\u53ef\u91cd\u65b0\u4e0a\u4f20 ":"",disabled:r.length>0,ghost:!0},b),s.a.createElement("span",{onClick:j,style:{marginLeft:10}},"(\u5355\u4e2a\u6587\u4ef6\u6700\u5927",g,"M) ")))}}}]); |