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
11 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[455],{52128:function(le,x,e){e.r(x),e.d(x,{default:function(){return be}});var M=e(97857),Z=e.n(M),O=e(13769),T=e.n(O),A=e(15009),s=e.n(A),F=e(99289),o=e.n(F),b=e(5574),f=e.n(b),D=e(48357),y=e(52043),J=e(3089),q=e(90930),v=e(8232),L=e(55241),U=e(66309),g=e(2453),pe=e(13169),_=e(14726),ie=e(72051),de=e(17788),ce=e(55102),oe=e(34041),Se=e(71230),me=e(15746),ge=e(47676),ee=e(16250),je=e(27484),H=e.n(je),j=e(67294),Fe=e(19632),fe=e.n(Fe),De=e(32400),ye=e(56448),Ce=e.n(ye),Ee=e(66476),n=e(85893),Ae=function(N){var Y=N.onUploadSuccess,C=N.onUploadError,ne=(0,j.useState)(!1),G=f()(ne,2),V=G[0],R=G[1],re=(0,j.useState)([]),w=f()(re,2),W=w[0],$=w[1],ae=(0,j.useState)(null),z=f()(ae,2),I=z[0],te=z[1],k=Ee.Z.Dragger;(0,j.useEffect)(function(){function E(){return m.apply(this,arguments)}function m(){return m=o()(s()().mark(function S(){var l,h;return s()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=0,d.next=3,(0,D.po)();case 3:if(l=d.sent,!(!l.data||!l.data.accessKeySecret||!l.data.accessKeyId)){d.next=7;break}return g.ZP.error("\u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),d.abrupt("return");case 7:h=new(Ce())({region:"oss-cn-beijing",accessKeyId:l.data.accessKeyId,accessKeySecret:l.data.accessKeySecret,stsToken:l.data.securityToken,bucket:l.data.bucket}),te(h),d.next=15;break;case 11:d.prev=11,d.t0=d.catch(0),g.ZP.error("\u521D\u59CB\u5316 OSS \u5BA2\u6237\u7AEF\u5931\u8D25"),C&&C(d.t0);case 15:case"end":return d.stop()}},S,null,[[0,11]])})),m.apply(this,arguments)}E()},[C]);var ue=function(m){var S=(W||[]).filter(function(l){return l.url!==m.url});$(S)},Q=function(){var E=o()(s()().mark(function m(S){var l,h,B,d;return s()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(l=S.file,!(l instanceof File)){i.next=26;break}return R(!0),i.prev=3,i.next=6,(0,De.p)(l);case 6:return h=i.sent,B="matrix/".concat(h,".").concat(l.name.split(".").pop()),i.next=10,I==null?void 0:I.put(B,l,{headers:{"Content-Type":l.type}});case 10:d="https://apks.bzgames.cn/".concat(B),Y&&Y(d),R(!1),$(function(K){return[].concat(fe()(K),[{uid:l.uid,name:l.name+"\uFF1A"+d,status:"done",url:d}])}),i.next=21;break;case 16:i.prev=16,i.t0=i.catch(3),g.ZP.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"),C&&C(i.t0),$(function(K){return[].concat(fe()(K),[{uid:l.uid,name:l.name,status:"error"}])});case 21:return i.prev=21,R(!1),i.finish(21);case 24:i.next=27;break;case 26:g.ZP.error("\u4E0A\u4F20\u6587\u4EF6\u7C7B\u578B\u9519\u8BEF");case 27:case"end":return i.stop()}},m,null,[[3,16,21,24]])}));return function(S){return E.apply(this,arguments)}}();return(0,n.jsxs)(k,{fileList:W,multiple:!0,customRequest:Q,onRemove:ue,disabled:V||!I,onPreview:function(){var E=o()(s()().mark(function m(S){return s()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,navigator.clipboard.writeText(S.url||"");case 2:g.ZP.success("\u94FE\u63A5\u590D\u5236\u6210\u529F "+S.url);case 3:case"end":return h.stop()}},m)}));return function(m){return E.apply(this,arguments)}}(),capture:void 0,children:[(0,n.jsx)("p",{className:"ant-upload-drag-icon",children:(0,n.jsx)("i",{className:"anticon anticon-inbox"})}),(0,n.jsx)("p",{className:"ant-upload-text",children:"\u70B9\u51FB\u6216\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4E0A\u4F20"}),(0,n.jsx)("p",{className:"ant-upload-hint",children:"\u652F\u6301\u5355\u4E2A\u6216\u6279\u91CF\u4E0A\u4F20\u3002\u6587\u4EF6\u540D\u5C06\u4F7F\u7528\u6587\u4EF6\u7684 MD5 \u503C\u547D\u540D\u3002"})]})},Ie=Ae,xe=["scheduleTime"],Ze=function(){var N=(0,j.useState)([]),Y=f()(N,2),C=Y[0],ne=Y[1],G=(0,j.useState)([]),V=f()(G,2),R=V[0],re=V[1],w=(0,j.useState)([]),W=f()(w,2),$=W[0],ae=W[1],z=(0,j.useState)(!1),I=f()(z,2),te=I[0],k=I[1],ue=(0,j.useState)(!1),Q=f()(ue,2),E=Q[0],m=Q[1],S=v.Z.useForm(),l=f()(S,1),h=l[0],B=v.Z.useForm(),d=f()(B,1),X=d[0],i=function(){var u=o()(s()().mark(function r(){var t;return s()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,D.hy)();case 2:t=a.s