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.
1 line
9.5 KiB
1 line
9.5 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[134],{CRnD:function(t,e,r){"use strict";r.r(e);r("DjyN");var n=r("NUBc"),a=r("9og8"),o=r("tJVT"),i=r("q1tI"),c=r.n(i);function l(t){var e=t.item,r=t.type,n=t.page;return c.a.createElement("div",{style:{display:"flex",alignItems:"center",flexDirection:"initial",height:"37px",background:"#ffffff",padding:"0px 15px"}},c.a.createElement("span",{style:{flex:"1"}},1===n?r+1:r+1+20*(n-1)),c.a.createElement("span",{style:{flex:"1"}},e.login||"--"),c.a.createElement("span",{style:{flex:"2"}},e.name||"--"),c.a.createElement("span",{style:{flex:"2"}},e.register_info||"--"),c.a.createElement("span",{style:{flex:"1"}},e.competition_info||"--"),c.a.createElement("span",{style:{flex:"2"}},e.ip||"--"),c.a.createElement("span",{style:{flex:"2"}},e.username||"--"))}var u=l,s=r("Ty5D"),f=r("ErOA");function p(){p=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",y="suspendedYield",d="executing",m="completed",g={};function v(){}function x(){}function w(){}var E={};u(E,i,(function(){return this}));var b=Object.getPrototypeOf,L=b&&b(b(G([])));L&&L!==r&&n.call(L,i)&&(E=L);var j=w.prototype=v.prototype=Object.create(E);function O(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(a,o,i,c){var l=f(t[a],t,o);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,a){r(t,n,e,a)}))}return o=o?o.then(a,a):a()}})}function k(e,r,n){var a=h;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:t,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=N(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var u=f(e,r,n);if("normal"===u.type){if(a=n.done?m:y,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=m,n.method="throw",n.arg=u.arg)}}}function N(e,r){var n=r.method,a=e.iterator[n];if(a===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=f(a,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function G(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,o=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return x.prototype=w,a(j,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:x,configurable:!0}),x.displayName=u(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,u(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},O(_.prototype),u(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new _(s(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(j),u(j,l,"Generator"),u(j,i,(function(){return this})),u(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=G,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function a(n,a){return c.type="throw",c.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;T(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:G(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(t){Object(s["m"])();var e=Object(i["useState"])(1),r=Object(o["a"])(e,2),l=r[0],h=r[1],y=Object(i["useState"])(20),d=Object(o["a"])(y,2),m=d[0],g=(d[1],Object(i["useState"])()),v=Object(o["a"])(g,2),x=v[0],w=v[1],E=Object(i["useState"])(),b=Object(o["a"])(E,2),L=b[0],j=b[1];return Object(i["useEffect"])((function(){function t(){return e.apply(this,arguments)}function e(){return e=Object(a["a"])(p().mark((function t(){var e;return p().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(f["a"])("/api/user_agents.json",{method:"get",params:{page:l,per_page:m}});case 2:e=t.sent,0===e.status&&(w(e.data.user_agents),j(e.data));case 4:case"end":return t.stop()}}),t)}))),e.apply(this,arguments)}t()}),[l]),c.a.createElement("div",{className:"edu-container minH500"},c.a.createElement("div",{className:"educontent mb20 persmstyle",style:{width:"1200px",marginTop:"26px"}},c.a.createElement("div",{style:{display:"flex",background:"#ffffff",height:"60px",alignItems:"center",padding:"0px 15px"}},c.a.createElement("span",null,"\u5f15\u6d41\u603b\u4eba\u6570\uff1a",L&&L.agents_count||"0"),c.a.createElement("span",{style:{marginLeft:"20px"}},"\u7ade\u8d5b\u6210\u529f\u62a5\u540d\uff1a",L&&L.action_count||"0")),c.a.createElement("div",{style:{marginTop:"1px",background:"#ffffff"}},c.a.createElement("div",{style:{display:"flex",alignItems:"center",flexDirection:"initial",height:"37px",background:"#ffffff",padding:"0px 15px"}},c.a.createElement("span",{style:{flex:"1"}},"\u5e8f\u53f7"),c.a.createElement("span",{style:{flex:"1"}},"\u4ee3\u7406\u4eba\u767b\u5f55\u540d"),c.a.createElement("span",{style:{flex:"2"}},"\u4ee3\u7406\u4eba\u59d3\u540d"),c.a.createElement("span",{style:{flex:"2"}},"\u6ce8\u518c\u60c5\u51b5"),c.a.createElement("span",{style:{flex:"1"}},"\u7ade\u8d5b\u62a5\u540d"),c.a.createElement("span",{style:{flex:"2"}},"IP"),c.a.createElement("span",{style:{flex:"2"}},"\u5f15\u6d41\u4eba\u59d3\u540d")),c.a.createElement("div",{style:{border:"1px solid #fafafa",minHeight:"400px"}},x&&x.map((function(t,e){return c.a.createElement(u,{page:l,item:t,type:e})})))),L&&L.agents_count>20?c.a.createElement("div",{style:{justifyContent:"center",display:"flex",marginTop:"20px"}},c.a.createElement(n["a"],{defaultCurrent:1,defaultPageSize:20,onChange:function(t,e){return h(t)},total:L&&L.agents_count})):""))}e["default"]=h}}]); |