Browse Source

抽成后ecpm

master
nili 6 months ago
parent
commit
9fd3267de6
  1. 2
      dist/index.html
  2. 1
      dist/p__DeviceOwnerApp.0dbd8254.async.js
  3. 1
      dist/p__DeviceOwnerApp.67a5dc65.async.js
  4. 2
      dist/umi.6330b154.js
  5. 17
      src/pages/DeviceOwnerApp.tsx

2
dist/index.html

@ -8,6 +8,6 @@
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script src="/umi.c666be9c.js"></script> <script src="/umi.6330b154.js"></script>
</body></html> </body></html>

1
dist/p__DeviceOwnerApp.0dbd8254.async.js

File diff suppressed because one or more lines are too long

1
dist/p__DeviceOwnerApp.67a5dc65.async.js

File diff suppressed because one or more lines are too long

2
dist/umi.c666be9c.js → dist/umi.6330b154.js

File diff suppressed because one or more lines are too long

17
src/pages/DeviceOwnerApp.tsx

@ -26,7 +26,9 @@ const DeviceOwnerApp: React.FC = () => {
const fetchDevice = async () => { const fetchDevice = async () => {
const res = await deviceList({ appCode: code ? code : '' }); const res = await deviceList({ appCode: code ? code : '' });
setUsedDeviceCnt(res.data?.filter((device) => device.status === 0).length); if (res.data) {
setUsedDeviceCnt(res.data?.filter((device) => device.status === 0).length);
}
return { return {
data: res.data, data: res.data,
total: res.data?.length, total: res.data?.length,
@ -112,6 +114,17 @@ const DeviceOwnerApp: React.FC = () => {
return x / 100; return x / 100;
}, },
}, },
{
title: 'ecpm-抽成后(元)',
dataIndex: 'deductEcpm',
hideInSearch: true,
renderText: (x, record) => {
if (currentUser?.incomeRate && record.ecpm) {
return Math.floor((record.ecpm * currentUser.incomeRate) / 100) / 100;
}
return '-';
},
},
{ {
title: '设备品牌', title: '设备品牌',
dataIndex: 'deviceBrand', dataIndex: 'deviceBrand',
@ -215,7 +228,7 @@ const DeviceOwnerApp: React.FC = () => {
{'正常使用设备数:' + {'正常使用设备数:' +
usedDeviceCnt + usedDeviceCnt +
',剩余可绑定设备数:' + ',剩余可绑定设备数:' +
Math.max(0, currentUser?.deviceCnt - usedDeviceCnt)} Math.max(0, (currentUser?.deviceCnt ? currentUser.deviceCnt : 0) - usedDeviceCnt)}
</p> </p>
<ProTable<API.MatrixAdminDevice> <ProTable<API.MatrixAdminDevice>
actionRef={deviceRef} actionRef={deviceRef}

Loading…
Cancel
Save