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(H,O,e){var A=e(1413),s=e(67294),S=e(509),i=e(91146),B=function(c,n){return s.createElement(i.Z,(0,A.Z)((0,A.Z)({},c),{},{ref:n,icon:S.Z}))},j=s.forwardRef(B);O.Z=j},86408:function(H,O,e){e.r(O);var A=e(97857),s=e.n(A),S=e(15009),i=e.n(S),B=e(99289),j=e.n(B),m=e(5574),c=e.n(m),n=e(48357),C=e(11415),f=e(39615),b=e(90930),y=e(67539),Z=e(57470),W=e(64317),z=e(34540),V=e(13169),_=e(16250),p=e(27484),D=e.n(p),E=e(9220),l=e(67294),t=e(96974),K=e(58125),ne=e(42767),u=e(85893),re=function(){var h=(0,l.useRef)(),J=(0,l.useState)(void 0),F=c()(J,2),G=F[0],w=F[1],I=function(){return window.innerWidth<=768},N=(0,l.useState)({deviceId:{show:!I()},appName:{show:!I()},platform:{show:!I()},deviceBrand:{show:!I()},deviceName:{show:!I()},ip:{show:!I()},advType:{show:!I()}}),Y=c()(N,2),ee=Y[0],ae=Y[1],se=[{title:"\u7528\u6237id",hideInTable:!0,dataIndex:"userId"},{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,P){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("p",{children:P.deviceBrand}),(0,u.jsx)("p",{children:P.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,P){if(P.user)return(0,u.jsx)(ne.Z,{data:P.user})}},{title:"\u65F6\u95F4",hideInSearch:!0,dataIndex:"createdAt",valueType:"dateTime"},{title:"\u65F6\u95F4",hideInTable:!0,dataIndex:"createdAt",valueType:"dateRange"}],U=(0,t.UO)(),a=U.code,v=(0,l.useState)(),R=c()(v,2),o=R[0],T=R[1],L=(0,l.useState)([]),g=c()(L,2),X=g[0],k=g[1],q=f.Z.Divider,de=(0,l.useState)(!1),le=c()(de,2),te=le[0],ce=le[1],_e=function(){var d=j()(i()().mark(function r(P){var M;return i()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,(0,n.d1)({appCode:P});case 2:M=x.sent,M.data&&T(M.data);case 4:case"end":return x.stop()}},r)}));return function(P){return d.apply(this,arguments)}}(),oe=function(){var d=j()(i()().mark(function r(P){var M;return i()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,(0,n.Zb)(s()(s()({},P),{},{code:a}));case 2:M=x.sent,M.data&&k(M.data);case 4:case"end":return x.stop()}},r)}));return function(P){return d.apply(this,arguments)}}();(0,l.useEffect)(function(){var d;(d=h.current)===null||d===void 0||d.reload(),_e(a),oe({code:a})},[a]);var me=X.map(function(d){return{date:function(){var r=d.date+"",P=r.slice(0,4),M=r.slice(4,6),$=r.slice(6,8);return"".concat(P,"-").concat(M,"-").concat($)}(),income:(0,K.P)(d.income)}}),ve={data:me,xField:"date",yField:"income",tooltip:{name:"\u6536\u5165",field:"income"},axis:{date:{title:"\u65E5\u671F"}},title:"\u7D2F\u8BA1"+(0,K.P)(X.reduce(function(d,r){return d+(r.income?r.income:0)},0))+"\u5143",height:400,label:{text:function(r){return r.income>0?r.income:""},textBaseline:"bottom"}};return(0,u.jsx)(b._z,{children:(0,u.jsxs)(V.Z,{defaultActiveKey:"1",centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,u.jsx)(_.Z,{tab:"\u5E7F\u544A\u8BE6\u60C5",children:(0,u.jsx)(y.Z,{headerTitle:G?"\u8868\u683C\u7D2F\u8BA1\uFF1A"+(0,K.P)(G)+"\u