2 lines
3.4 KiB
JavaScript
2 lines
3.4 KiB
JavaScript
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[737],{34316:function(I,r,_){var d=_(86195),t=_(21362),m=function(){t.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var s=new URL(window.location.href).searchParams,o=s.get("redirect");window.location.pathname!=="/user/login"&&!o&&d.history.replace({pathname:"/user/login"})};r.Z=m},55324:function(I,r,_){_.r(r);var d=_(25359),t=_.n(d),m=_(49811),v=_.n(m),s=_(54306),o=_.n(s),U=_(34316),C=_(87474),O=_(77121),g=_(12472),E=_(78434),M=_.n(E),P=_(86195),n=_(21137),R=_(21362),i=_(68243),c=_(28964),l=_(31255),p=_(26572),T=_(50959),e=_(11527),j=n.Z.Option,K="\u6211\u7684\u63D2\u4EF6\u7F51\u7AD9.com",W="\u52A0\u5BC6\u8BA2\u9605\u94FE\u63A5",b="http://",Z=K,$=function(y){var a=document.createElement("textarea");a.value=y,a.setAttribute("readOnly","true"),document.body.appendChild(a),a.select(),document.execCommand("Copy"),a.className="oInput",a.style.display="none",a.style.opacity="0"},k=function(){var y=(0,T.useState)(W),a=o()(y,2),L=a[0],x=a[1],A=(0,P.useRequest)(function(){return(0,P.request)("/api/storage",{params:{keys:["sillyGirl.plugin_sublink"].join(",")}})}),V=A.data,z=A.error,F=A.loading,G=function(){var f=v()(t()().mark(function u(){var h,B;return t()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,(0,C.Z)({"sillyGirl.plugin_sublink":b+Z},"","","");case 2:h=D.sent,B=h==null?void 0:h.messages["sillyGirl.plugin_sublink"],B&&(x(B),R.ZP.info("\u5DF2\u751F\u6210\u8BA2\u9605\u94FE\u63A5\u3002"));case 5:case"end":return D.stop()}},u)}));return function(){return f.apply(this,arguments)}}();if(F)return(0,e.jsx)(E.Loading,{});if(z)return(0,U.Z)(),null;if(L==W){var S=V["sillyGirl.plugin_sublink"];S&&x(S)}return(0,e.jsxs)(g._z,{children:[(0,e.jsx)(i.Z,{children:(0,e.jsx)(c.Z,{onChange:function(u){Z=u.target.value,G()},addonBefore:(0,e.jsxs)(n.Z,{onSelect:function(u){b=u,G()},defaultValue:b,className:"select-before",children:[(0,e.jsx)(j,{value:"http://",children:"http://"}),(0,e.jsx)(j,{value:"https://",children:"https://"})]}),defaultValue:K})}),(0,e.jsx)("br",{})," ",(0,e.jsx)("br",{}),(0,e.jsxs)(c.Z.Group,{compact:!0,children:[(0,e.jsx)(c.Z,{style:{width:"calc(300px)"},disabled:!0,value:L}),(0,e.jsx)(l.Z,{children:(0,e.jsx)(p.ZP,{onClick:function(){$(L),R.ZP.info("\u590D\u5236\u6210\u529F\u3002",1)},icon:(0,e.jsx)(O.Z,{})})})]})]})};r.default=k},87474:function(I,r,_){var d=_(25359),t=_.n(d),m=_(49811),v=_.n(m),s=_(21362),o=_(86195),U=function(){var C=v()(t()().mark(function O(g){var E,M,P,n=arguments;return t()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return E=n.length>1&&n[1]!==void 0?n[1]:"\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",M=n.length>2&&n[2]!==void 0?n[2]:"\u63D0\u4EA4\u6210\u529F\uFF01",P=n.length>3&&n[3]!==void 0?n[3]:"\u63D0\u4EA4\u5931\u8D25",E&&s.ZP.loading("\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",2e4),i.abrupt("return",new Promise(function(c){(0,o.request)("/api/storage",{method:"put",data:g}).then(function(l){var p;if(s.ZP.destroy(),(l==null||(p=l.data)===null||p===void 0?void 0:p.isLogin)==!1){s.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var T=new URL(window.location.href).searchParams,e=T.get("redirect");window.location.pathname!=="/user/login"&&!e&&o.history.replace({pathname:"/user/login"});return}l!=null&&l.success?M&&s.ZP.success(M,1):P&&s.ZP.warning("\u63D0\u4EA4\u5931\u8D25\uFF01",2),c(l)})}));case 5:case"end":return i.stop()}},O)}));return function(g){return C.apply(this,arguments)}}();r.Z=U}}]);
|