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
2 lines
17 KiB
5 months ago
|
"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),P=r(99289),c=r.n(P),Z=r(5574),m=r.n(Z),C=r(48357),I=r(52043),W=r(1413),g=r(67294),se=r(509),ne=r(91146),re=function(E,D){return g.createElement(ne.Z,(0,W.Z)((0,W.Z)({},E),{},{ref:D,icon:se.Z}))},te=g.forwardRef(re),ce=te,xe=r(3089),Ee=r(90930),y=r(8232),T=r(55102),de=r(42075),b=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),ke=r(19632),Se=r.n(ke),Be=r(32400),Oe=r(56448),Me=r.n(Oe),Te=r(66476),e=r(85893),Le=function(E){var D=E.onUploadSuccess,S=E.onUploadError,A=(0,g.useState)(!1),V=m()(A,2),U=V[0],R=V[1],ae=(0,g.useState)([]),H=m()(ae,2),L=H[0],$=H[1],G=(0,g.useState)(null),z=m()(G,2),B=z[0],K=z[1],Y=Te.Z.Dragger;(0,g.useEffect)(function(){function i(){return s.apply(this,arguments)}function s(){return s=c()(o()().mark(function j(){var u,p;return o()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=0,d.next=3,(0,C.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:p=new(Me())({region:"oss-cn-beijing",accessKeyId:u.data.accessKeyId,accessKeySecret:u.data.accessKeySecret,stsToken:u.data.securityToken,bucket:u.data.bucket}),K(p),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()}},j,null,[[0,11]])})),s.apply(this,arguments)}i()},[S]);var X=function(s){var j=(L||[]).filter(function(u){return u.url!==s.url});$(j)},h=function(){var i=c()(o()().mark(function s(j){var u,p,x,d;return o()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(u=j.file,!(u instanceof File)){f.next=26;break}return R(!0),f.prev=3,f.next=6,(0,Be.p)(u);case 6:return p=f.sent,x="matrix/".concat(p,".").concat(u.name.split(".").pop()),f.next=10,B==null?void 0:B.put(x,u,{headers:{"Content-Type":u.type}});case 10:d="https://apks.bzgames.cn/".concat(x),D&&D(d),R(!1),$(function(ue){return[].concat(Se()(ue),[{uid:u.uid,name:u.name+"\uFF1A"+d,status:"done",url:d}])}),f.next=21;break;case 16:f.prev=16,f.t0=f.catch(3),N.ZP.error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"),S&&S(f.t0),$(function(ue){return[].concat(Se()(ue),[{uid:u.uid,name:u.name,status:"error"}])});case 21:return f.prev=21,R(!1),f.finish(21);case 24:f.next=27;break;case 26:N.ZP.error("\u4E0A\u4F20\u6587\u4EF6\u7C7B\u578B\u9519\u8BEF");case 27:case"end":return f.stop()}},s,null,[[3,16,21,24]])}));return function(j){return i.apply(this,arguments)}}();return(0,e.jsxs)(Y,{fileList:L,multiple:!0,customRequest:h,onRemove:X,disabled:U||!B,onPreview:function(){var i=c()(o()().mark(function s(j){return o()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,navigator.clipboard.writeText(j.url||"");case 2:N.ZP.success("\u94FE\u63A5\u590D\u5236\u6210\u529F "+j.url);case 3:case"end":return p.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),Fe=r(35312);function Re(k){return me.apply(this,arguments)}function me(){return me=c()(o()().mark(function k(E){return o()().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.abrupt("return",(0,Fe.request)("/api/superAdmin/evilAppList",M()({method:"GET"},E||{})));case 1:case"end":return S.stop()}},k)})),me.apply
|