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
14 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[542],{40110:function(Q,M,e){var O=e(1413),i=e(67294),T=e(509),u=e(91146),B=function(d,n){return i.createElement(u.Z,(0,O.Z)((0,O.Z)({},d),{},{ref:n,icon:T.Z}))},x=i.forwardRef(B);M.Z=x},86408:function(Q,M,e){e.r(M);var O=e(97857),i=e.n(O),T=e(15009),u=e.n(T),B=e(99289),x=e.n(B),_=e(5574),d=e.n(_),n=e(48357),A=e(11415),m=e(39615),S=e(90930),D=e(67539),V=e(57470),F=e(64317),f=e(34540),g=e(13169),b=e(16250),p=e(27484),h=e.n(p),te=e(9220),K=e(67294),t=e(96974),W=e(58125),ne=e(42767),s=e(85893),re=function(){var v=(0,K.useRef)(),H=(0,K.useState)(void 0),Z=d()(H,2),z=Z[0],G=Z[1],y=function(){return window.innerWidth<=768},N=(0,K.useState)({deviceId:{show:!y()},appName:{show:!y()},platform:{show:!y()},deviceBrand:{show:!y()},deviceName:{show:!y()},ip:{show:!y()},advType:{show:!y()}}),w=d()(N,2),q=w[0],ae=w[1],se=[{title:"\u8BBE\u5907id",dataIndex:"deviceId",valueType:"textarea",ellipsis:!0,copyable:!0},{title:"\u5E94\u7528\u540D\u79F0",hideInSearch:!0,dataIndex:"appName",valueType:"textarea"},{title:"\u5E73\u53F0",dataIndex:"platform",width:80,valueEnum:{1:{text:"\u7A7F\u5C71\u7532"},2:{text:"\u817E\u8BAF"},3:{text:"\u767E\u5EA6\u8054\u76DF"},4:{text:"Mintegral"},5:{text:"\u5FEB\u624B"},6:{text:"\u6E38\u53EF\u8D62"},7:{text:"Sigmob"},8:{text:"Admob"}}},{title:"\u5E7F\u544A\u7C7B\u578B",dataIndex:"advType",valueEnum:{1:{text:"\u6A2A\u5E45",status:"Success"},2:{text:"\u63D2\u9875",status:"Success"},3:{text:"\u6FC0\u52B1\u89C6\u9891",status:"Success"}}},{title:"ecpm(\u5143)",dataIndex:"ecpm",hideInSearch:!0,renderText:function(r){return r/100}},{title:"\u91D1\u5E01",dataIndex:"ecpmReal",hideInSearch:!0,renderText:function(r){return r}},{title:"\u8BBE\u5907",dataIndex:"device",hideInSearch:!0,renderText:function(r,E){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:E.deviceBrand}),(0,s.jsx)("p",{children:E.deviceName})]})}},{title:"ip",dataIndex:"ip",hideInSearch:!0,valueType:"textarea"},{title:"\u4EE3\u7406",dataIndex:"adminName",hideInSearch:!0,valueType:"textarea"},{title:"\u7528\u6237",dataIndex:"user",hideInSearch:!0,width:150,renderText:function(r,E){if(E.user)return(0,s.jsx)(ne.Z,{data:E.user})}},{title:"\u65F6\u95F4",hideInSearch:!0,dataIndex:"createdAt",valueType:"dateTime"},{title:"\u65F6\u95F4",hideInTable:!0,dataIndex:"createdAt",valueType:"dateRange"},{title:"\u7528\u6237id",hideInTable:!0,dataIndex:"userId"}],U=(0,t.UO)(),a=U.code,c=(0,K.useState)(),R=d()(c,2),l=R[0],C=R[1],L=(0,K.useState)([]),j=d()(L,2),Y=j[0],J=j[1],k=m.Z.Divider,de=(0,K.useState)(!1),le=d()(de,2),ee=le[0],ce=le[1],_e=function(){var o=x()(u()().mark(function r(E){var I;return u()().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,(0,n.d1)({appCode:E});case 2:I=P.sent,I.data&&C(I.data);case 4:case"end":return P.stop()}},r)}));return function(E){return o.apply(this,arguments)}}(),oe=function(){var o=x()(u()().mark(function r(E){var I;return u()().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,(0,n.Zb)(i()(i()({},E),{},{code:a}));case 2:I=P.sent,I.data&&J(I.data);case 4:case"end":return P.stop()}},r)}));return function(E){return o.apply(this,arguments)}}();(0,K.useEffect)(function(){var o;(o=v.current)===null||o===void 0||o.reload(),_e(a),oe({code:a})},[a]);var me=Y.map(function(o){return{date:function(){var r=o.date+"",E=r.slice(0,4),I=r.slice(4,6),$=r.slice(6,8);return"".concat(E,"-").concat(I,"-").concat($)}(),income:(0,W.P)(o.income)}}),ve={data:me,xField:"date",yField:"income",tooltip:{name:"\u6536\u5165",field:"income"},axis:{date:{title:"\u65E5\u671F"}},title:"\u7D2F\u8BA1"+(0,W.P)(Y.reduce(function(o,r){return o+(r.income?r.income:0)},0))+"\u5143",height:400,label:{text:function(r){return r.income>0?r.income:""},textBaseline:"bottom"}};return(0,s.jsx)(S._z,{children:(0,s.jsxs)(g.Z,{defaultActiveKey:"1",centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,s.jsx)(b.Z,{tab:"\u5E7F\u544A\u8BE6\u60C5",children:(0,s.jsx)(D.Z,{headerTitle:z?"\u8868\u683C\u7D2F\u8BA1\uFF1A"+(0,W.P)(z)+"\u