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

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[455],{38996:function(ce,w,n){n.r(w),n.d(w,{default:function(){return _e}});var R=n(97857),Z=n.n(R),W=n(13769),M=n.n(W),ee=n(15009),l=n.n(ee),O=n(99289),i=n.n(O),v=n(5574),h=n.n(v),x=n(48357),A=n(52043),H=n(1413),g=n(67294),de=n(509),te=n(91146),ae=function(C,I){return g.createElement(te.Z,(0,H.Z)((0,H.Z)({},C),{},{ref:I,icon:de.Z}))},ue=g.forwardRef(ae),se=ue,Pe=n(3089),be=n(90930),D=n(8232),$=n(55102),ie=n(42075),B=n(14726),Be=n(55241),he=n(66309),ne=n(2453),Me=n(13169),xe=n(72051),fe=n(17788),Ce=n(34041),Oe=n(71230),Se=n(15746),ke=n(47676),le=n(16250),Te=n(27484),me=n.n(Te),Ue=n(19632),Ee=n.n(Ue),Ke=n(32400),we=n(56448),Le=n.n(we),Re=n(66476),e=n(85893),We=function(C){var I=C.onUploadSuccess,j=C.onUploadError,y=(0,g.useState)(!1),z=h()(y,2),L=z[0],Y=z[1],q=(0,g.useState)([]),X=h()(q,2),T=X[0],N=X[1],V=(0,g.useState)(null),Q=h()(V,2),U=Q[0],k=Q[1],K=Re.Z.Dragger;(0,g.useEffect)(function(){function r(){return t.apply(this,arguments)}function t(){return t=i()(l()().mark(function m(){var u,c;return l()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.prev=0,p.next=3,(0,x.po)();case 3:if(u=p.sent,!(!u.data||!u.data.accessKeySecret||!u.data.accessKeyId)){p.next=7;break}return ne.ZP.error("\u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5"),p.abrupt("return");case 7:c=new(Le())({region:"oss-cn-beijing",accessKeyId:u.data.accessKeyId,accessKeySecret:u.data.accessKeySecret,stsToken:u.data.securityToken,bucket:u.data.bucket}),k(c),p.next=15;break;case 11:p.prev=11,p.t0=p.catch(0),ne.ZP.error("\u521D\u59CB\u5316 OSS \u5BA2\u6237\u7AEF\u5931\u8D25"),j&&j(p.t0);case 15:case"end":return p.stop()}},m,null,[[0,11]])})),t.apply(this,arguments)}r()},[j]);var J=function(t){var m=(T||[]).filter(function(u){return u.url!==t.url});N(m)},d=function(){var r=i()(l()().mark(function t(m){var u,c,S,p;return l()().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(u=m.file,!(u instanceof File)){F.next=26;break}return Y(!0),F.prev=3,F.next=6,(0,Ke.p)(u);case 6:return c=F.sent,S="matrix/".concat(c,".").concat(u.name.split(".").pop()),F.next=10,U==null?void 0:U.put(S,u,{headers:{"Content-Type":u.type}});case 10:p="https://apks.bzgames.cn/".concat(S),I&&I(p),Y(!1),N(function(oe){return[].concat(Ee()(oe),[{uid:u.uid,name:u.name+"\uFF1A"+p,status:"done",url:p}])}),F.next=21;break;case 16:F.prev=16,F.t0=F.catch(3),ne.ZP.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"),j&&j(F.t0),N(function(oe){return[].concat(Ee()(oe),[{uid:u.uid,name:u.name,status:"error"}])});case 21:return F.prev=21,Y(!1),F.finish(21);case 24:F.next=27;break;case 26:ne.ZP.error("\u4E0A\u4F20\u6587\u4EF6\u7C7B\u578B\u9519\u8BEF");case 27:case"end":return F.stop()}},t,null,[[3,16,21,24]])}));return function(m){return r.apply(this,arguments)}}();return(0,e.jsxs)(K,{fileList:T,multiple:!0,customRequest:d,onRemove:J,disabled:L||!U,onPreview:function(){var r=i()(l()().mark(function t(m){return l()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,navigator.clipboard.writeText(m.url||"");case 2:ne.ZP.success("\u94FE\u63A5\u590D\u5236\u6210\u529F "+m.url);case 3:case"end":return c.stop()}},t)}));return function(t){return r.apply(this,arguments)}}(),capture:void 0,children:[(0,e.jsx)("p",{className:"ant-upload-drag-icon",children:(0,e.jsx)("i",{className:"anticon anticon-inbox"})}),(0,e.jsx)("p",{className:"ant-upload-text",children:"\u70B9\u51FB\u6216\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4E0A\u4F20"}),(0,e.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"})]})},$e=We,De=n(67539),pe=n(35312);function Ye(P){return ve.apply(this,arguments)}function ve(){return ve=i()(l()().mark(function P(C){return l()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return j.abrupt("return",(0,pe.request)("/api/superAdmin/evilAppList",Z()({method:"GET"},C||{})));case 1:case"end":return j.stop()}},P)})),ve.a