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.
NewEduCoderBuild/p__HttpStatus__UserAgents.b...

2 lines
9.5 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[75],{CRnD:function(te,J,v){"use strict";v.r(J);var ne=v("DjyN"),V=v("NUBc"),W=v("9og8"),M=v("tJVT"),R=v("q1tI"),i=v.n(R);function K(l){var E=l.item,h=l.type,b=l.page;return i.a.createElement("div",{style:{display:"flex",alignItems:"center",flexDirection:"initial",height:"37px",background:"#ffffff",padding:"0px 15px"}},i.a.createElement("span",{style:{flex:"1"}},b===1?h+1:h+1+(b-1)*20),i.a.createElement("span",{style:{flex:"1"}},E.login||"--"),i.a.createElement("span",{style:{flex:"2"}},E.name||"--"),i.a.createElement("span",{style:{flex:"2"}},E.register_info||"--"),i.a.createElement("span",{style:{flex:"1"}},E.competition_info||"--"),i.a.createElement("span",{style:{flex:"2"}},E.ip||"--"),i.a.createElement("span",{style:{flex:"2"}},E.username||"--"))}var Q=K,Z=v("Ty5D"),q=v("ErOA");function B(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */B=function(){return l};var l={},E=Object.prototype,h=E.hasOwnProperty,b=typeof Symbol=="function"?Symbol:{},U=b.iterator||"@@iterator",F=b.asyncIterator||"@@asyncIterator",T=b.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(n,r,a){return n[r]=a}}function G(t,e,n,r){var a=e&&e.prototype instanceof j?e:j,o=Object.create(a.prototype),u=new L(r||[]);return o._invoke=function(_,g,s){var c="suspendedStart";return function(y,z){if(c==="executing")throw new Error("Generator is already running");if(c==="completed"){if(y==="throw")throw z;return Y()}for(s.method=y,s.arg=z;;){var $=s.delegate;if($){var H=D($,s);if(H){if(H===p)continue;return H}}if(s.method==="next")s.sent=s._sent=s.arg;else if(s.method==="throw"){if(c==="suspendedStart")throw c="completed",s.arg;s.dispatchException(s.arg)}else s.method==="return"&&s.abrupt("return",s.arg);c="executing";var N=I(_,g,s);if(N.type==="normal"){if(c=s.done?"completed":"suspendedYield",N.arg===p)continue;return{value:N.arg,done:s.done}}N.type==="throw"&&(c="completed",s.method="throw",s.arg=N.arg)}}}(t,n,u),o}function I(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(r){return{type:"throw",arg:r}}}l.wrap=G;var p={};function j(){}function A(){}function w(){}var C={};f(C,U,function(){return this});var x=Object.getPrototypeOf,d=x&&x(x(X([])));d&&d!==E&&h.call(d,U)&&(C=d);var P=w.prototype=j.prototype=Object.create(C);function O(t){["next","throw","return"].forEach(function(e){f(t,e,function(n){return this._invoke(e,n)})})}function m(t,e){function n(a,o,u,_){var g=I(t[a],t,o);if(g.type!=="throw"){var s=g.arg,c=s.value;return c&&typeof c=="object"&&h.call(c,"__await")?e.resolve(c.__await).then(function(y){n("next",y,u,_)},function(y){n("throw",y,u,_)}):e.resolve(c).then(function(y){s.value=y,u(s)},function(y){return n("throw",y,u,_)})}_(g.arg)}var r;this._invoke=function(a,o){function u(){return new e(function(_,g){n(a,o,_,g)})}return r=r?r.then(u,u):u()}}function D(t,e){var n=t.iterator[e.method];if(n===void 0){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=void 0,D(t,e),e.method==="throw"))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=I(n,t.iterator,e.arg);if(r.type==="throw")return e.method="throw",e.arg=r.arg,e.delegate=null,p;var a=r.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,p):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function X(t){if(t){var e=t[U];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var n=-1,r=function a(){for(;++n<t.length;)if(h.call(t,n))return a.value=t[n],a.done=!1,a;return a.value=void 0,a.done=!0,a};return r.next=r}}return{next:Y}}function Y(){return{value:void 0,done:!0}}return A.prototype=w,f(P,"constructor",w),f(w,"constructor",A),A.displayName=f(w,T,"GeneratorFunction"),l.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===A||(e.displayName||e.name)==="GeneratorFunction")},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,T,"GeneratorFunction")),t.prototype=Object.create(P),t},l.awrap=function(t){return{__await:t}},O(m.prototype),f(m.prototype,F,function(){return this}),l.AsyncIterator=m,l.async=function(t,e,n,r,a){a===void 0&&(a=Promise);var o=new m(G(t,e,n,r),a);return l.isGeneratorFunction(e)?o:o.next().then(function(u){return u.done?u.value:o.next()})},O(P),f(P,T,"Generator"),f(P,U,function(){return this}),f(P,"toString",function(){return"[object Generator]"}),l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function r(){for(;e.length;){var a=e.pop();if(a in t)return r.value=a,r.done=!1,r}return r.done=!0,r}},l.values=X,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var n in this)n.charAt(0)==="t"&&h.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(s,c){return u.type="throw",u.arg=e,n.next=s,c&&(n.method="next",n.arg=void 0),!!c}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],u=o.completion;if(o.tryLoc==="root")return r("end");if(o.tryLoc<=this.prev){var _=h.call(o,"catchLoc"),g=h.call(o,"finallyLoc");if(_&&g){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(_){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!g)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,n){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&h.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&(e==="break"||e==="continue")&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=n,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(u)},complete:function(e,n){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&n&&(this.next=n),p},finish:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),p}},catch:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc===e){var a=r.completion;if(a.type==="throw"){var o=a.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:X(e),resultName:n,nextLoc:r},this.method==="next"&&(this.arg=void 0),p}},l}function ee(l){var E=Object(Z.m)(),h=Object(R.useState)(1),b=Object(M.a)(h,2),U=b[0],F=b[1],T=Object(R.useState)(20),f=Object(M.a)(T,2),G=f[0],I=f[1],p=Object(R.useState)(),j=Object(M.a)(p,2),A=j[0],w=j[1],C=Object(R.useState)(),x=Object(M.a)(C,2),d=x[0],P=x[1];return Object(R.useEffect)(function(){function O(){return m.apply(this,arguments)}function m(){return m=Object(W.a)(B().mark(function D(){var S;return B().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return L.next=2,Object(q.a)("/api/user_agents.json",{method:"get",params:{page:U,per_page:G}});case 2:S=L.sent,S.status===0&&(w(S.data.user_agents),P(S.data));case 4:case"end":return L.stop()}},D)})),m.apply(this,arguments)}O()},[U]),i.a.createElement("div",{className:"edu-container minH500"},i.a.createElement("div",{className:"educontent mb20 persmstyle",style:{width:"1200px",marginTop:"26px"}},i.a.createElement("div",{style:{display:"flex",background:"#ffffff",height:"60px",alignItems:"center",padding:"0px 15px"}},i.a.createElement("span",null,"\u5F15\u6D41\u603B\u4EBA\u6570\uFF1A",d&&d.agents_count||"0"),i.a.createElement("span",{style:{marginLeft:"20px"}},"\u7ADE\u8D5B\u6210\u529F\u62A5\u540D\uFF1A",d&&d.action_count||"0")),i.a.createElement("div",{style:{marginTop:"1px",background:"#ffffff"}},i.a.createElement("div",{style:{display:"flex",alignItems:"center",flexDirection:"initial",height:"37px",background:"#ffffff",padding:"0px 15px"}},i.a.createElement("span",{style:{flex:"1"}},"\u5E8F\u53F7"),i.a.createElement("span",{style:{flex:"1"}},"\u4EE3\u7406\u4EBA\u767B\u5F55\u540D"),i.a.createElement("span",{style:{flex:"2"}},"\u4EE3\u7406\u4EBA\u59D3\u540D"),i.a.createElement("span",{style:{flex:"2"}},"\u6CE8\u518C\u60C5\u51B5"),i.a.createElement("span",{style:{flex:"1"}},"\u7ADE\u8D5B\u62A5\u540D"),i.a.createElement("span",{style:{flex:"2"}},"IP"),i.a.createElement("span",{style:{flex:"2"}},"\u5F15\u6D41\u4EBA\u59D3\u540D")),i.a.createElement("div",{style:{border:"1px solid #fafafa",minHeight:"400px"}},A&&A.map(function(O,m){return i.a.createElement(Q,{page:U,item:O,type:m})}))),d&&d.agents_count>20?i.a.createElement("div",{style:{justifyContent:"center",display:"flex",marginTop:"20px"}},i.a.createElement(V.a,{defaultCurrent:1,defaultPageSize:20,onChange:function(m,D){return F(m)},total:d&&d.agents_count})):""))}var re=J.default=ee}}]);