Browse Source

feat: 非法应用

lihao
nili 5 months ago
parent
commit
46ba5ce17d
  1. 30
      dist/427.f16a2970.async.js
  2. 246
      dist/531.3d4ec55a.async.js
  3. 287
      dist/531.4c68f902.async.js
  4. 42
      dist/63.86ff1d28.async.js
  5. 13
      dist/804.139cd916.async.js
  6. 42
      dist/822.4ba8fa04.async.js
  7. 1
      dist/_umi_route_preload_helper.27e9a3b4.js
  8. 1
      dist/_umi_route_preload_helper.fff8da1d.js
  9. 4
      dist/index.html
  10. 1
      dist/p__SuperAdmin.6d75358a.async.js
  11. 1
      dist/p__SuperAdmin.fe3e1735.async.js
  12. 4
      dist/umi.924b4604.js
  13. 39
      src/pages/SuperAdmin.tsx
  14. 179
      src/pages/SuperAdmin/EvilAppManagement.tsx
  15. 2
      src/services/matrix/index.ts
  16. 23
      src/services/matrix/superAdmin.ts
  17. 12
      src/services/matrix/typings.d.ts

30
dist/427.f16a2970.async.js

File diff suppressed because one or more lines are too long

246
dist/531.3d4ec55a.async.js

File diff suppressed because one or more lines are too long

287
dist/531.4c68f902.async.js

File diff suppressed because one or more lines are too long

42
dist/63.86ff1d28.async.js

File diff suppressed because one or more lines are too long

13
dist/804.139cd916.async.js

File diff suppressed because one or more lines are too long

42
dist/822.4ba8fa04.async.js

File diff suppressed because one or more lines are too long

1
dist/_umi_route_preload_helper.27e9a3b4.js

@ -1 +0,0 @@
!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.41bff0f7.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.fe3e1735.async.js",455],["531.3d4ec55a.async.js",531],["539.49b7b156.async.js",539],["p__AdvRecordListV2.70688ce4.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.f4303cf9.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.687c40f2.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)}))}}();

1
dist/_umi_route_preload_helper.fff8da1d.js

@ -0,0 +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],["134.6fc81d91.async.js",134],["169.57647c7d.async.js",169],["p__Welcome.61596037.async.js",185],["p__MoneyManagement.41bff0f7.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],["p__SuperAdmin.6d75358a.async.js",455],["531.4c68f902.async.js",531],["539.49b7b156.async.js",539],["p__AdvRecordListV2.70688ce4.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.f4303cf9.async.js",731],["p__AdminManagement.5e2368b3.async.js",816],["822.4ba8fa04.async.js",822],["841.614ef4c0.async.js",841],["p__AdvRecordList.8e5ef22c.async.js",857],["p__UserManagement.687c40f2.async.js",903],["905.6e225d1b.async.js",905],["930.fca7adbf.async.js",930]],"r":{"/*":[19,27],"/":[1,6,7,18,20,27],"/welcome":[1,2,3,11,18,28,6,7,20,27],"/super":[0,1,2,5,13,14,15,23,27,28,6,7,18,20],"/adminList":[0,2,22,23,1,6,7,18,20,27],"/bind":[1,2,11,12,17,18,28,6,7,20,27],"/appList":[0,1,2,5,12,14,15,21,23,27,28,6,7,18,20],"/advList/:code":[0,1,2,14,15,18,23,24,25,27,28,6,7,20],"/advListV2/:code":[0,1,2,14,15,16,18,23,24,27,28,6,7,20],"/user/:code":[0,1,2,14,15,23,26,27,28,6,7,18,20],"/money/:code":[0,1,2,4,14,15,23,27,28,6,7,18,20],"/app/:code":[0,1,2,9,14,15,18,23,24,27,28,6,7,20],"/user/login":[1,2,8,14,23]}},{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>
<link rel="stylesheet" href="/umi.1ca9308c.css">
<script async src="/scripts/loading.js"></script>
<script src="/_umi_route_preload_helper.27e9a3b4.js"></script>
<script src="/_umi_route_preload_helper.fff8da1d.js"></script>
</head>
<body>
<div id="root"></div>
<script src="/umi.c8a3e254.js"></script>
<script src="/umi.924b4604.js"></script>
</body>
</html>

1
dist/p__SuperAdmin.6d75358a.async.js

File diff suppressed because one or more lines are too long

1
dist/p__SuperAdmin.fe3e1735.async.js

File diff suppressed because one or more lines are too long

4
dist/umi.c8a3e254.js → dist/umi.924b4604.js

File diff suppressed because one or more lines are too long

39
src/pages/SuperAdmin.tsx

@ -7,7 +7,7 @@ import {
whiteList as whiteList1,
} from '@/services/matrix/admin';
import { channelList } from '@/utils/commonUtil';
import { MinusCircleOutlined } from '@ant-design/icons';
import { MinusCircleOutlined, SearchOutlined } from '@ant-design/icons';
import { PageContainer } from '@ant-design/pro-components';
import {
Button,
@ -19,6 +19,7 @@ import {
Popover,
Row,
Select,
Space,
Table,
Tabs,
Tag,
@ -30,6 +31,7 @@ import moment from 'moment';
import React, { useEffect, useState } from 'react';
import OSSUploadDragger from './OSSUploadDragger';
import EvilAppManagement from './SuperAdmin/EvilAppManagement';
// import { RequestOptionsType, ProFieldRequestData } from "@ant-design/pro-utils";
@ -67,6 +69,38 @@ const SuperAdmin: React.FC = () => {
title: '设备id',
dataIndex: 'deviceId',
ellipsis: true,
filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters }) => (
<div style={{ padding: 8 }}>
<Input
placeholder="搜索设备"
value={selectedKeys[0]}
onChange={(e) => setSelectedKeys(e.target.value ? [e.target.value] : [])}
onPressEnter={() => confirm()}
style={{ marginBottom: 8, display: 'block' }}
/>
<Space>
<Button onClick={() => confirm()} type="primary">
</Button>
<Button onClick={() => clearFilters && clearFilters()} type="link">
</Button>
</Space>
</div>
),
onFilter: (value, record) => {
if (typeof value === 'string' && typeof record?.deviceId === 'string') {
return record.deviceId.includes(value);
}
return false;
},
filterIcon: (filtered) => (
<SearchOutlined
style={{ color: filtered ? '#1890ff' : undefined }}
onPointerOverCapture={undefined}
onPointerMoveCapture={undefined}
/>
),
},
{
@ -352,6 +386,9 @@ const SuperAdmin: React.FC = () => {
<TabPane tab="上传资源" key="3">
<OSSUploadDragger />
</TabPane>
<TabPane tab="非法应用" key="4">
<EvilAppManagement />
</TabPane>
</Tabs>
</PageContainer>
);

179
src/pages/SuperAdmin/EvilAppManagement.tsx

@ -0,0 +1,179 @@
import { SearchOutlined } from '@ant-design/icons';
import { ProColumns, ProTable } from '@ant-design/pro-components';
import { Button, Form, Input, Modal, Space } from 'antd';
import { useEffect, useState } from 'react';
import { evilAppList, saveEvilApp } from '../../services/matrix/superAdmin';
const EvilAppManagement = () => {
const [visible, setVisible] = useState(false);
const [appArr, setAppArr] = useState<API.MatrixEvilApp[]>([]);
const [filteredAppArr, setFilteredAppArr] = useState<API.MatrixEvilApp[]>([]);
const [form] = Form.useForm();
const columns: ProColumns<API.MatrixEvilApp>[] = [
{
title: '应用名',
dataIndex: 'name',
copyable: true,
hideInSearch: true,
filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters }) => (
<div style={{ padding: 8 }}>
<Input
placeholder="搜索应用"
value={selectedKeys[0]}
onChange={(e) => setSelectedKeys(e.target.value ? [e.target.value] : [])}
onPressEnter={() => confirm()}
style={{ marginBottom: 8, display: 'block' }}
/>
<Space>
<Button onClick={() => confirm()} type="primary">
</Button>
<Button onClick={() => clearFilters && clearFilters()} type="link">
</Button>
</Space>
</div>
),
onFilter: (value, record) => {
if (typeof value === 'string' && typeof record?.name === 'string') {
return record.name.includes(value);
}
return false;
},
filterIcon: (filtered) => (
<SearchOutlined
style={{ color: filtered ? '#1890ff' : undefined }}
onPointerOverCapture={undefined}
onPointerMoveCapture={undefined}
/>
),
},
{
title: '应用包名',
dataIndex: 'packageName',
hideInSearch: true,
filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters }) => (
<div style={{ padding: 8 }}>
<Input
placeholder="搜索包名"
value={selectedKeys[0]}
onChange={(e) => setSelectedKeys(e.target.value ? [e.target.value] : [])}
onPressEnter={() => confirm()}
style={{ marginBottom: 8, display: 'block' }}
/>
<Space>
<Button onClick={() => confirm()} type="primary">
</Button>
<Button onClick={() => clearFilters && clearFilters()} type="link">
</Button>
</Space>
</div>
),
onFilter: (value, record) => {
if (typeof value === 'string' && typeof record?.packageName === 'string') {
return record.packageName.includes(value);
}
return false;
},
filterIcon: (filtered) => (
<SearchOutlined
style={{ color: filtered ? '#1890ff' : undefined }}
onPointerOverCapture={undefined}
onPointerMoveCapture={undefined}
/>
),
},
{
title: '操作',
width: 80,
hideInSearch: true,
renderText: (r: API.MatrixEvilApp) => {
return (
<a
key="edit"
onClick={() => {
setVisible(true);
form.setFieldsValue(r);
}}
>
</a>
);
},
},
];
const fetchApp = async () => {
const res = await evilAppList();
if (res.data) {
setAppArr(res.data);
setFilteredAppArr(res.data);
}
};
useEffect(() => {
fetchApp();
}, []);
return (
<>
<Button
style={{ marginBottom: '20px' }}
onClick={() => {
setVisible(true);
form.resetFields();
}}
>
</Button>
<ProTable
search={false}
onReset={() => {
setFilteredAppArr(appArr);
}}
columns={columns}
dataSource={filteredAppArr}
/>
<Modal
title="编辑"
visible={visible}
onOk={() => {
form.submit();
setVisible(false);
}}
onCancel={() => {
setVisible(false);
}}
>
<Form
labelCol={{ span: 4 }}
wrapperCol={{ span: 18 }}
form={form}
onFinish={async (values: API.MatrixEvilApp) => {
await saveEvilApp(values);
fetchApp();
}}
>
<Form.Item name="id" style={{ display: 'none' }}>
<Input type="hidden" />
</Form.Item>
<Form.Item label="应用名" name="name">
<Input />
</Form.Item>
<Form.Item label="包名" name="packageName">
<Input />
</Form.Item>
</Form>
</Modal>
</>
);
};
export default EvilAppManagement;

2
src/services/matrix/index.ts

@ -7,7 +7,9 @@ import * as device from './device';
import * as matrixAppConfigController from './matrixAppConfigController';
import * as matrixMoneyController from './matrixMoneyController';
import * as matrixUserController from './matrixUserController';
import * as superAdmin from './superAdmin';
export default {
superAdmin,
matrixUserController,
admin,
matrixMoneyController,

23
src/services/matrix/superAdmin.ts

@ -0,0 +1,23 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
/** 此处后端没有提供注释 GET /api/superAdmin/evilAppList */
export async function evilAppList(options?: { [key: string]: any }) {
return request<API.RListMatrixEvilApp>('/api/superAdmin/evilAppList', {
method: 'GET',
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/superAdmin/saveEvilApp */
export async function saveEvilApp(body: API.MatrixEvilApp, options?: { [key: string]: any }) {
return request<API.RVoid>('/api/superAdmin/saveEvilApp', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}

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

@ -216,6 +216,12 @@ declare namespace API {
enableCash?: boolean;
};
type MatrixEvilApp = {
id?: number;
name?: string;
packageName?: string;
};
type MatrixMockSchedule = {
id?: number;
appId?: number;
@ -337,6 +343,12 @@ declare namespace API {
data?: MatrixAppBo[];
};
type RListMatrixEvilApp = {
code?: number;
message?: string;
data?: MatrixEvilApp[];
};
type RListMatrixMockSchedule = {
code?: number;
message?: string;

Loading…
Cancel
Save