Browse Source

feat: 设备信息展示 & 支持userId查广告

lihao
nili 5 months ago
parent
commit
185d0c431d
  1. 2
      dist/_umi_route_preload_helper.48597c5e.js
  2. 4
      dist/index.html
  3. 1
      dist/p__AdvRecordListV2.1e290899.async.js
  4. 1
      dist/p__AdvRecordListV2.52c0941e.async.js
  5. 1
      dist/p__App__AppManagement.dd12ff21.async.js
  6. 1
      dist/p__App__AppManagement.e532244b.async.js
  7. 1
      dist/p__MoneyManagement.44667bc9.async.js
  8. 1
      dist/p__MoneyManagement.a0ff04f6.async.js
  9. 1
      dist/p__SuperAdmin.7ef997d3.async.js
  10. 1
      dist/p__SuperAdmin.bbb0991c.async.js
  11. 426
      dist/umi.85d0d09b.js
  12. 426
      dist/umi.de9fef38.js
  13. 20
      src/pages/AdvRecordListV2.tsx
  14. 19
      src/pages/MoneyManagement.tsx
  15. 54
      src/pages/User/UserInfo.tsx
  16. 2
      src/services/matrix/typings.d.ts
  17. 28
      src/utils/commonUtil.ts

2
dist/_umi_route_preload_helper.b1e72ce4.js → dist/_umi_route_preload_helper.48597c5e.js

@ -1 +1 @@
!function(){"use strict";var t="/".replace(/([^/])$/,"$1/"),e=location.pathname,n=e.startsWith(t)&&decodeURI("/".concat(e.slice(t.length)));if(n){var a=document,c=a.head,r=a.createElement.bind(a),i=function(t,e,n){var a,c=e.r[t]||(null===(a=Object.entries(e.r).find((function(e){var n=e[0];return new RegExp("^".concat(n.replace(/\/:[^/]+/g,"/[^/]+").replace("/*","/.+"),"$")).test(t)})))||void 0===a?void 0:a[1]);return null==c?void 0:c.map((function(t){var a=e.f[t][1],c=e.f[t][0];return{type:c.split(".").pop(),url:"".concat(n.publicPath).concat(c),attrs:[["data-".concat(e.b),"".concat(e.p,":").concat(a)]]}}))}(n,{"p":"ant-design-pro","b":"webpack","f":[["51.a2ea1b3b.async.js",51],["63.86ff1d28.async.js",63],["134.6fc81d91.async.js",134],["169.57647c7d.async.js",169],["p__Welcome.61596037.async.js",185],["p__MoneyManagement.a0ff04f6.async.js",190],["247.3fe8fb10.async.js",247],["t__plugin-layout__Layout.6cae69f5.chunk.css",301],["t__plugin-layout__Layout.4594a64b.async.js",301],["p__User__Login__index.9d3ab92e.async.js",366],["p__DeviceOwnerApp.ec53e5c4.async.js",371],["390.41467286.async.js",390],["393.38316f72.async.js",393],["397.fb5f72c1.async.js",397],["427.f16a2970.async.js",427],["p__SuperAdmin.bbb0991c.async.js",455],["531.3d4ec55a.async.js",531],["539.49b7b156.async.js",539],["p__AdvRecordListV2.52c0941e.async.js",542],["p__Bind.b6ee068f.async.js",557],["559.016bfdbb.async.js",559],["p__404.0c100574.async.js",571],["635.20e45f05.async.js",635],["p__App__AppManagement.dd12ff21.async.js",731],["804.139cd916.async.js",804],["p__AdminManagement.5e2368b3.async.js",816],["841.614ef4c0.async.js",841],["p__AdvRecordList.8e5ef22c.async.js",857],["p__UserManagement.6d77584d.async.js",903],["905.6e225d1b.async.js",905],["930.fca7adbf.async.js",930]],"r":{"/*":[21,29],"/":[2,7,8,20,22,29],"/welcome":[2,3,4,12,20,30,7,8,22,29],"/super":[0,1,2,3,6,14,15,30,7,8,20,22,29],"/adminList":[0,3,14,24,25,2,7,8,20,22,29],"/bind":[2,3,12,13,19,20,30,7,8,22,29],"/appList":[0,1,2,3,6,13,14,16,17,23,24,29,30,7,8,20,22],"/advList/:code":[0,1,2,3,14,16,17,20,24,26,27,29,30,7,8,22],"/advListV2/:code":[0,1,2,3,14,16,17,18,20,24,26,29,30,7,8,22],"/user/:code":[0,1,2,3,14,16,17,24,28,29,30,7,8,20,22],"/money/:code":[0,1,2,3,5,14,16,17,24,29,30,7,8,20,22],"/app/:code":[0,1,2,3,10,14,16,17,20,24,26,29,30,7,8,22],"/user/login":[1,2,3,9,14,16,24]}},{publicPath:"/"});null==i||i.forEach((function(t){var e,n=t.type,a=t.url;if("js"===n)(e=r("script")).src=a,e.async=!0;else{if("css"!==n)return;(e=r("link")).href=a,e.rel="preload",e.as="style"}t.attrs.forEach((function(t){e.setAttribute(t[0],t[1]||"")})),c.appendChild(e)}))}}(); !function(){"use strict";var t="/".replace(/([^/])$/,"$1/"),e=location.pathname,n=e.startsWith(t)&&decodeURI("/".concat(e.slice(t.length)));if(n){var a=document,c=a.head,r=a.createElement.bind(a),i=function(t,e,n){var a,c=e.r[t]||(null===(a=Object.entries(e.r).find((function(e){var n=e[0];return new RegExp("^".concat(n.replace(/\/:[^/]+/g,"/[^/]+").replace("/*","/.+"),"$")).test(t)})))||void 0===a?void 0:a[1]);return null==c?void 0:c.map((function(t){var a=e.f[t][1],c=e.f[t][0];return{type:c.split(".").pop(),url:"".concat(n.publicPath).concat(c),attrs:[["data-".concat(e.b),"".concat(e.p,":").concat(a)]]}}))}(n,{"p":"ant-design-pro","b":"webpack","f":[["51.a2ea1b3b.async.js",51],["63.86ff1d28.async.js",63],["134.6fc81d91.async.js",134],["169.57647c7d.async.js",169],["p__Welcome.61596037.async.js",185],["p__MoneyManagement.44667bc9.async.js",190],["247.3fe8fb10.async.js",247],["t__plugin-layout__Layout.6cae69f5.chunk.css",301],["t__plugin-layout__Layout.4594a64b.async.js",301],["p__User__Login__index.9d3ab92e.async.js",366],["p__DeviceOwnerApp.ec53e5c4.async.js",371],["390.41467286.async.js",390],["393.38316f72.async.js",393],["397.fb5f72c1.async.js",397],["427.f16a2970.async.js",427],["p__SuperAdmin.7ef997d3.async.js",455],["531.3d4ec55a.async.js",531],["539.49b7b156.async.js",539],["p__AdvRecordListV2.1e290899.async.js",542],["p__Bind.b6ee068f.async.js",557],["559.016bfdbb.async.js",559],["p__404.0c100574.async.js",571],["635.20e45f05.async.js",635],["p__App__AppManagement.e532244b.async.js",731],["804.139cd916.async.js",804],["p__AdminManagement.5e2368b3.async.js",816],["841.614ef4c0.async.js",841],["p__AdvRecordList.8e5ef22c.async.js",857],["p__UserManagement.6d77584d.async.js",903],["905.6e225d1b.async.js",905],["930.fca7adbf.async.js",930]],"r":{"/*":[21,29],"/":[2,7,8,20,22,29],"/welcome":[2,3,4,12,20,30,7,8,22,29],"/super":[0,1,2,3,6,14,15,30,7,8,20,22,29],"/adminList":[0,3,14,24,25,2,7,8,20,22,29],"/bind":[2,3,12,13,19,20,30,7,8,22,29],"/appList":[0,1,2,3,6,13,14,16,17,23,24,29,30,7,8,20,22],"/advList/:code":[0,1,2,3,14,16,17,20,24,26,27,29,30,7,8,22],"/advListV2/:code":[0,1,2,3,14,16,17,18,20,24,26,29,30,7,8,22],"/user/:code":[0,1,2,3,14,16,17,24,28,29,30,7,8,20,22],"/money/:code":[0,1,2,3,5,14,16,17,24,29,30,7,8,20,22],"/app/:code":[0,1,2,3,10,14,16,17,20,24,26,29,30,7,8,22],"/user/login":[1,2,3,9,14,16,24]}},{publicPath:"/"});null==i||i.forEach((function(t){var e,n=t.type,a=t.url;if("js"===n)(e=r("script")).src=a,e.async=!0;else{if("css"!==n)return;(e=r("link")).href=a,e.rel="preload",e.as="style"}t.attrs.forEach((function(t){e.setAttribute(t[0],t[1]||"")})),c.appendChild(e)}))}}();

4
dist/index.html

@ -7,10 +7,10 @@
<title>Ant Design Pro</title> <title>Ant Design Pro</title>
<link rel="stylesheet" href="/umi.1ca9308c.css"> <link rel="stylesheet" href="/umi.1ca9308c.css">
<script async src="/scripts/loading.js"></script> <script async src="/scripts/loading.js"></script>
<script src="/_umi_route_preload_helper.b1e72ce4.js"></script> <script src="/_umi_route_preload_helper.48597c5e.js"></script>
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script src="/umi.de9fef38.js"></script> <script src="/umi.85d0d09b.js"></script>
</body> </body>
</html> </html>

1
dist/p__AdvRecordListV2.1e290899.async.js

File diff suppressed because one or more lines are too long

1
dist/p__AdvRecordListV2.52c0941e.async.js

File diff suppressed because one or more lines are too long

1
dist/p__App__AppManagement.dd12ff21.async.js

File diff suppressed because one or more lines are too long

1
dist/p__App__AppManagement.e532244b.async.js

File diff suppressed because one or more lines are too long

1
dist/p__MoneyManagement.44667bc9.async.js

File diff suppressed because one or more lines are too long

1
dist/p__MoneyManagement.a0ff04f6.async.js

File diff suppressed because one or more lines are too long

1
dist/p__SuperAdmin.7ef997d3.async.js

File diff suppressed because one or more lines are too long

1
dist/p__SuperAdmin.bbb0991c.async.js

File diff suppressed because one or more lines are too long

426
dist/umi.85d0d09b.js

File diff suppressed because one or more lines are too long

426
dist/umi.de9fef38.js

File diff suppressed because one or more lines are too long

20
src/pages/AdvRecordListV2.tsx

@ -10,7 +10,7 @@ import {
QueryFilter, QueryFilter,
StatisticCard, StatisticCard,
} from '@ant-design/pro-components'; } from '@ant-design/pro-components';
import { Avatar, Row, Tabs } from 'antd'; import { Tabs } from 'antd';
import TabPane from 'antd/es/tabs/TabPane'; import TabPane from 'antd/es/tabs/TabPane';
import moment from 'moment'; import moment from 'moment';
import RcResizeObserver from 'rc-resize-observer'; import RcResizeObserver from 'rc-resize-observer';
@ -21,6 +21,7 @@ import { useParams } from 'react-router-dom';
import { formatIncome } from '@/utils/numberUtils'; import { formatIncome } from '@/utils/numberUtils';
import type { ActionType } from '@ant-design/pro-components'; import type { ActionType } from '@ant-design/pro-components';
import UserInfo from './User/UserInfo';
const AdvRecordListV2: React.FC = () => { const AdvRecordListV2: React.FC = () => {
const actionRef = useRef<ActionType>(); const actionRef = useRef<ActionType>();
const [income, setIncome] = useState<number | undefined>(undefined); const [income, setIncome] = useState<number | undefined>(undefined);
@ -133,20 +134,12 @@ const AdvRecordListV2: React.FC = () => {
title: '用户', title: '用户',
dataIndex: 'user', dataIndex: 'user',
hideInSearch: true, hideInSearch: true,
width: 150,
renderText: (_, record) => { renderText: (_, record) => {
if (!record.user) { if (!record.user) {
return; return;
} }
return ( return <UserInfo data={record.user} />;
<Row>
<Avatar src={record.user?.avatar} />
<p style={{ fontSize: 12 }}>
id:{record.user.id}
<br />
{record.user?.nickname || record.user?.mobile}
</p>
</Row>
);
}, },
}, },
{ {
@ -161,6 +154,11 @@ const AdvRecordListV2: React.FC = () => {
dataIndex: 'createdAt', dataIndex: 'createdAt',
valueType: 'dateRange', valueType: 'dateRange',
}, },
{
title: '用户id',
hideInTable: true,
dataIndex: 'userId',
},
// { // {
// title: "应用名称", // title: "应用名称",
// hideInTable: true, // hideInTable: true,

19
src/pages/MoneyManagement.tsx

@ -2,9 +2,10 @@ import { audit, moneyApplyList } from '@/services/matrix/matrixMoneyController';
import { cent2Yuan } from '@/utils/numberUtils'; import { cent2Yuan } from '@/utils/numberUtils';
import { ActionType, PageContainer, ProColumns, ProTable } from '@ant-design/pro-components'; import { ActionType, PageContainer, ProColumns, ProTable } from '@ant-design/pro-components';
import { useParams } from '@umijs/max'; import { useParams } from '@umijs/max';
import { Avatar, Button, Flex, Popconfirm, Row, Tag } from 'antd'; import { Button, Flex, Popconfirm, Tag } from 'antd';
import { useEffect, useRef } from 'react'; import { useEffect, useRef } from 'react';
import { moneyStatus, prefixInteger, timestamp2Num } from '../utils/commonUtil'; import { moneyStatus, prefixInteger, timestamp2Num } from '../utils/commonUtil';
import UserInfo from './User/UserInfo';
const MoneyManagement: React.FC = () => { const MoneyManagement: React.FC = () => {
const { code } = useParams(); const { code } = useParams();
@ -35,21 +36,7 @@ const MoneyManagement: React.FC = () => {
if (!r.user) { if (!r.user) {
return; return;
} }
return ( return <UserInfo data={r.user} />;
<Row>
<Avatar
src={
r.user?.avatar ||
'https://apks.bzgames.cn/matrix/fc3fca88a8b28ff602e7a38d8164938b.png'
}
/>
<p style={{ fontSize: 12, marginLeft: 10 }}>
id:{r.user.id}
<br />
{r.user?.nickname || r.user?.mobile}
</p>
</Row>
);
}, },
}, },
{ {

54
src/pages/User/UserInfo.tsx

@ -0,0 +1,54 @@
import { Avatar, List, Popover, Row } from 'antd';
import React from 'react';
import { envMsg } from '../../utils/commonUtil';
import { cent2Yuan, formatIncome } from '../../utils/numberUtils';
export type UserInfoProps = {
data: API.UserBo;
};
const UserInfo: React.FC<UserInfoProps> = (props) => {
let msg = envMsg(props.data.env);
return (
<Popover
content={
<>
<p>
<label></label>
{formatIncome(props.data.income)}
</p>
<p>
<label></label>
{cent2Yuan(props.data.realMoney)}
</p>
{msg.length > 0 && (
<List
size="small"
header={<div></div>}
// footer={<div>Footer</div>}
bordered
dataSource={msg}
renderItem={(item) => <List.Item>{item}</List.Item>}
/>
)}
</>
}
>
<Row>
<Avatar
src={
props.data.avatar ||
'https://apks.bzgames.cn/matrix/fc3fca88a8b28ff602e7a38d8164938b.png'
}
/>
<p style={{ fontSize: 12, marginLeft: 10, color: msg.length > 0 ? 'red' : '' }}>
id:{props.data.id}
<br />
{props.data.nickname || props.data.mobile}
</p>
</Row>
</Popover>
);
};
export default UserInfo;

2
src/services/matrix/typings.d.ts

@ -24,6 +24,7 @@ declare namespace API {
code?: string; code?: string;
createdAt?: string[]; createdAt?: string[];
adminId?: number; adminId?: number;
userId?: number;
}; };
type AliPayConfigBo = { type AliPayConfigBo = {
@ -454,6 +455,7 @@ declare namespace API {
goldCoin?: number; goldCoin?: number;
inviteCode?: string; inviteCode?: string;
inviteUrl?: string; inviteUrl?: string;
env?: number;
wxOpenId?: string; wxOpenId?: string;
createdAt?: number; createdAt?: number;
}; };

28
src/utils/commonUtil.ts

@ -5,6 +5,32 @@ const channelList = () => {
]; ];
}; };
const envMsg = (env: number | undefined) => {
const res: string[] = [];
if (!env) {
return res;
}
let n = env;
const arr = [
'用户打开了USB调试模式',
'用户打开了开发者模式',
'用户打开了无障碍模式',
'用户手机已经Root',
'用户安装了Xpose',
'用户开启了VPN',
'用户开启代理',
'支付宝未安装',
'微信未安装',
];
for (const s of arr) {
if (n % 2 === 1) {
res.push(s);
}
n = Math.floor(n / 2);
}
return res;
};
const moneyStatus = () => { const moneyStatus = () => {
return [ return [
{ label: '待审批', value: '0', color: 'orange' }, { label: '待审批', value: '0', color: 'orange' },
@ -29,4 +55,4 @@ const prefixInteger = (num: number, length: number) => {
return str.padStart(length, '0'); return str.padStart(length, '0');
}; };
export { channelList, moneyStatus, prefixInteger, timestamp2Num }; export { channelList, envMsg, moneyStatus, prefixInteger, timestamp2Num };

Loading…
Cancel
Save