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

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