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
6.1 KiB
2 lines
6.1 KiB
6 months ago
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[542],{86408:function(W,P,e){e.r(P);var p=e(97857),u=e.n(p),D=e(15009),i=e.n(D),g=e(99289),M=e.n(g),Z=e(5574),f=e.n(Z),O=e(48357),F=e(11415),l=e(39615),V=e(90930),$=e(67539),z=e(57470),T=e(64317),N=e(34540),w=e(71230),G=e(7134),Y=e(13169),C=e(16250),H=e(27484),J=e.n(H),Q=e(9220),c=e(67294),X=e(96974),m=e(58125),a=e(85893),k=function(){var R=(0,c.useRef)(),q=(0,c.useState)(void 0),b=f()(q,2),A=b[0],ee=b[1],v=function(){return window.innerWidth<=768},te=(0,c.useState)({deviceId:{show:!v()},appName:{show:!v()},platform:{show:!v()},deviceBrand:{show:!v()},deviceName:{show:!v()},ip:{show:!v()},advType:{show:!v()}}),U=f()(te,2),ae=U[0],ne=U[1],re=[{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:"Default"},2:{text:"\u63D2\u9875",status:"Processing"},3:{text:"\u6FC0\u52B1\u89C6\u9891",status:"Success"}}},{title:"ecpm(\u5143)",dataIndex:"ecpm",hideInSearch:!0,renderText:function(t){return t/100}},{title:"\u8BBE\u5907",dataIndex:"device",hideInSearch:!0,renderText:function(t,s){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{children:s.deviceBrand}),(0,a.jsx)("p",{children:s.deviceName})]})}},{title:"ip",dataIndex:"ip",hideInSearch:!0,valueType:"textarea"},{title:"\u7528\u6237",dataIndex:"user",hideInSearch:!0,renderText:function(t,s){var _,o,r;if(s.user)return(0,a.jsxs)(w.Z,{children:[(0,a.jsx)(G.C,{src:(_=s.user)===null||_===void 0?void 0:_.avatar}),(0,a.jsxs)("p",{style:{fontSize:12},children:["id:",s.user.id,(0,a.jsx)("br",{}),((o=s.user)===null||o===void 0?void 0:o.nickname)||((r=s.user)===null||r===void 0?void 0:r.mobile)]})]})}},{title:"\u65F6\u95F4",hideInSearch:!0,dataIndex:"createdAt",valueType:"dateTime"},{title:"\u65F6\u95F4",hideInTable:!0,dataIndex:"createdAt",valueType:"dateRange"}],se=(0,X.UO)(),h=se.code,_e=(0,c.useState)(),y=f()(_e,2),d=y[0],ie=y[1],de=(0,c.useState)([]),B=f()(de,2),S=B[0],oe=B[1],j=l.Z.Divider,ue=(0,c.useState)(!1),K=f()(ue,2),x=K[0],le=K[1],ce=function(){var n=M()(i()().mark(function t(s){var _;return i()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,O.d1)({appCode:s});case 2:_=r.sent,_.data&&ie(_.data);case 4:case"end":return r.stop()}},t)}));return function(s){return n.apply(this,arguments)}}(),L=function(){var n=M()(i()().mark(function t(s){var _;return i()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,O.Zb)(u()(u()({},s),{},{code:h}));case 2:_=r.sent,_.data&&oe(_.data);case 4:case"end":return r.stop()}},t)}));return function(s){return n.apply(this,arguments)}}();(0,c.useEffect)(function(){var n;(n=R.current)===null||n===void 0||n.reload(),ce(h),L({code:h})},[h]);var me=S.map(function(n){return{date:function(){var t=n.date+"",s=t.slice(0,4),_=t.slice(4,6),o=t.slice(6,8);return"".concat(s,"-").concat(_,"-").concat(o)}(),income:(0,m.P)(n.income)}}),ve={data:me,xField:"date",yField:"income",tooltip:{name:"\u6536\u5165",field:"income"},axis:{date:{title:"\u65E5\u671F"}},title:"\u7D2F\u8BA1"+(0,m.P)(S.reduce(function(n,t){return n+(t.income?t.income:0)},0))+"\u5143",height:400,label:{text:function(t){return t.income>0?t.income:""},textBaseline:"bottom"}};return(0,a.jsx)(V._z,{children:(0,a.jsxs)(Y.Z,{defaultActiveKey:"1",centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,a.jsx)(C.Z,{tab:"\u5E7F\u544A\u8BE6\u60C5",children:(0,a.jsx)($.Z,{headerTitle:A?"\u8868\u683C\u7D2F\u8BA1\uFF1A"+(0,m.P)(A)+"\u5143":"",actionRef:R,rowKey:"key",search:{labelWidth:120},request:function(){var n=M()(i()().mark(function t(s){var _,o,r,I;return i()().wrap(funct
|