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.2...

1 line
9.6 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[122],{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 t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(S){l=function(t,e,r){return t[e]=r}}function u(t,e,r,a){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),c=new _(a||[]);return n(i,"_invoke",{value:b(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(S){return{type:"throw",arg:S}}}t.wrap=u;var f={};function h(){}function y(){}function d(){}var v={};l(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(k([])));g&&g!==e&&r.call(g,o)&&(v=g);var x=d.prototype=h.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function a(n,o,i,c){var l=s(t[n],t,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){a("next",t,i,c)}),(function(t){a("throw",t,i,c)})):e.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return a("throw",t,i,c)}))}c(l.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){a(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function b(t,e,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return N()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=L(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=s(n,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,f;var o=a.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function j(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:N}}function N(){return{value:void 0,done:!0}}return y.prototype=d,n(x,"constructor",{value:d,configurable:!0}),n(d,"constructor",{value:y,configurable:!0}),y.displayName=l(d,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},w(E.prototype),l(E.prototype,i,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(x),l(x,c,"Generator"),l(x,o,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),t.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}},t.values=k,_.prototype={constructor:_,reset:function(t){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(O),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,f):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),f},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),O(r),f}},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;O(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}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),v=d[0],m=(d[1],Object(i["useState"])()),g=Object(o["a"])(m,2),x=g[0],w=g[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:v}});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}}]);