Browse Source

feat: 用户管理和提现审批

lihao
nili 7 months ago
parent
commit
163278cd96
  1. 153
      dist/335.fcb437d3.async.js
  2. 153
      dist/539.49b7b156.async.js
  3. 1
      dist/_umi_route_preload_helper.5d8ddf90.js
  4. 1
      dist/_umi_route_preload_helper.77c14e0c.js
  5. 4
      dist/index.html
  6. 2
      dist/p__AdvRecordList.8e5ef22c.async.js
  7. 1
      dist/p__AdvRecordListV2.30086e42.async.js
  8. 1
      dist/p__AdvRecordListV2.52c0941e.async.js
  9. 1
      dist/p__App__AppManagement.37218ab6.async.js
  10. 1
      dist/p__App__AppManagement.82005a8e.async.js
  11. 2
      dist/p__DeviceOwnerApp.ec53e5c4.async.js
  12. 1
      dist/p__MoneyManagement.79d40f90.async.js
  13. 1
      dist/p__MoneyManagement.8db966b3.async.js
  14. 1
      dist/p__SuperAdmin.6fe38dca.async.js
  15. 1
      dist/p__SuperAdmin.9634e267.async.js
  16. 1
      dist/p__UserManagement.2c68b70b.async.js
  17. 1
      dist/p__UserManagement.6aa3da9c.async.js
  18. 50
      dist/umi.6385cc0f.js
  19. 129
      src/pages/MoneyManagement.tsx
  20. 103
      src/pages/UserManagement.tsx
  21. 6
      src/services/matrix/index.ts
  22. 40
      src/services/matrix/matrixAppConfigController.ts
  23. 27
      src/services/matrix/matrixMoneyController.ts
  24. 15
      src/services/matrix/matrixUserController.ts
  25. 49
      src/services/matrix/typings.d.ts
  26. 13
      src/utils/commonUtil.ts
  27. 9
      src/utils/numberUtils.ts

153
dist/335.fcb437d3.async.js

File diff suppressed because one or more lines are too long

153
dist/539.49b7b156.async.js

File diff suppressed because one or more lines are too long

1
dist/_umi_route_preload_helper.5d8ddf90.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],["63.86ff1d28.async.js",63],["134.6fc81d91.async.js",134],["169.57647c7d.async.js",169],["p__Welcome.61596037.async.js",185],["p__MoneyManagement.8db966b3.async.js",190],["235.ac8537cc.async.js",235],["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.6fe38dca.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.82005a8e.async.js",731],["p__AdminManagement.4b0ea38b.async.js",816],["841.614ef4c0.async.js",841],["848.32a73e48.async.js",848],["p__AdvRecordList.8e5ef22c.async.js",857],["p__UserManagement.2c68b70b.async.js",903],["905.6e225d1b.async.js",905],["930.fca7adbf.async.js",930]],"r":{"/*":[21,29],"/":[2,8,9,20,22,29],"/welcome":[2,3,4,13,20,30,8,9,22,29],"/super":[0,1,2,3,6,7,15,30,8,9,20,22,29],"/adminList":[0,3,6,24,26,2,8,9,20,22,29],"/bind":[2,3,13,14,19,20,30,8,9,22,29],"/appList":[0,1,2,3,6,7,14,16,17,23,26,29,30,8,9,20,22],"/advList/:code":[0,1,2,3,6,16,17,20,25,26,27,29,30,8,9,22],"/advListV2/:code":[0,1,2,3,6,16,17,18,20,25,26,29,30,8,9,22],"/user/:code":[0,1,2,3,6,16,17,26,28,29,30,8,9,20,22],"/money/:code":[0,1,2,3,5,6,16,17,26,29,30,8,9,20,22],"/app/:code":[0,1,2,3,6,11,16,17,20,25,26,29,30,8,9,22],"/user/login":[1,2,3,6,10,16,26]}},{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.77c14e0c.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.79d40f90.async.js",190],["235.ac8537cc.async.js",235],["247.3fe8fb10.async.js",247],["t__plugin-layout__Layout.6cae69f5.chunk.css",301],["t__plugin-layout__Layout.4594a64b.async.js",301],["335.fcb437d3.async.js",335],["p__User__Login__index.9d3ab92e.async.js",366],["p__DeviceOwnerApp.1442f75c.async.js",371],["390.41467286.async.js",390],["393.38316f72.async.js",393],["397.fb5f72c1.async.js",397],["p__SuperAdmin.9634e267.async.js",455],["531.3d4ec55a.async.js",531],["p__AdvRecordListV2.30086e42.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.37218ab6.async.js",731],["p__AdminManagement.4b0ea38b.async.js",816],["841.614ef4c0.async.js",841],["848.32a73e48.async.js",848],["p__AdvRecordList.957040e5.async.js",857],["p__UserManagement.6aa3da9c.async.js",903],["905.6e225d1b.async.js",905],["930.fca7adbf.async.js",930]],"r":{"/*":[21,29],"/":[2,8,9,20,22,29],"/welcome":[2,3,4,14,20,30,8,9,22,29],"/super":[0,1,2,3,6,7,16,30,8,9,20,22,29],"/adminList":[0,3,6,24,26,2,8,9,20,22,29],"/bind":[2,3,14,15,19,20,30,8,9,22,29],"/appList":[0,1,2,3,6,7,10,15,17,23,26,29,30,8,9,20,22],"/advList/:code":[0,1,2,3,6,10,17,20,25,26,27,29,30,8,9,22],"/advListV2/:code":[0,1,2,3,6,10,17,18,20,25,26,29,30,8,9,22],"/user/:code":[2,3,28,30,8,9,20,22,29],"/money/:code":[2,3,5,30,8,9,20,22,29],"/app/:code":[0,1,2,3,6,10,12,17,20,25,26,29,30,8,9,22],"/user/login":[1,2,3,6,11,17,26]}},{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.77c14e0c.js"></script> <script src="/_umi_route_preload_helper.5d8ddf90.js"></script>
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script src="/umi.5f5e048f.js"></script> <script src="/umi.6385cc0f.js"></script>
</body> </body>
</html> </html>

2
dist/p__AdvRecordList.957040e5.async.js → dist/p__AdvRecordList.8e5ef22c.async.js

File diff suppressed because one or more lines are too long

1
dist/p__AdvRecordListV2.30086e42.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.37218ab6.async.js

File diff suppressed because one or more lines are too long

1
dist/p__App__AppManagement.82005a8e.async.js

File diff suppressed because one or more lines are too long

2
dist/p__DeviceOwnerApp.1442f75c.async.js → dist/p__DeviceOwnerApp.ec53e5c4.async.js

File diff suppressed because one or more lines are too long

1
dist/p__MoneyManagement.79d40f90.async.js

@ -1 +0,0 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[190],{3295:function(s,e,n){n.r(e);var t=n(90930),_=n(85893),a=function(){return(0,_.jsx)(t._z,{children:(0,_.jsx)("p",{children:"TODO"})})};e.default=a}}]);

1
dist/p__MoneyManagement.8db966b3.async.js

File diff suppressed because one or more lines are too long

1
dist/p__SuperAdmin.6fe38dca.async.js

File diff suppressed because one or more lines are too long

1
dist/p__SuperAdmin.9634e267.async.js

File diff suppressed because one or more lines are too long

1
dist/p__UserManagement.2c68b70b.async.js

File diff suppressed because one or more lines are too long

1
dist/p__UserManagement.6aa3da9c.async.js

@ -1 +0,0 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[903],{47989:function(a,e,n){n.r(e);var _=n(90930),s=n(85893),t=function(){return(0,s.jsx)(_._z,{children:(0,s.jsx)("p",{children:"TODO"})})};e.default=t}}]);

50
dist/umi.5f5e048f.js → dist/umi.6385cc0f.js

File diff suppressed because one or more lines are too long

129
src/pages/MoneyManagement.tsx

@ -1,9 +1,134 @@
import { PageContainer } from '@ant-design/pro-components'; import { audit, moneyApplyList } from '@/services/matrix/matrixMoneyController';
import { cent2Yuan } from '@/utils/numberUtils';
import { ActionType, PageContainer, ProColumns, ProTable } from '@ant-design/pro-components';
import { useParams } from '@umijs/max';
import { Avatar, Button, Flex, Popconfirm, Row } from 'antd';
import { useEffect, useRef } from 'react';
import { moneyStatus } from '../utils/commonUtil';
const MoneyManagement: React.FC = () => { const MoneyManagement: React.FC = () => {
const { code } = useParams();
const actionRef = useRef<ActionType>();
useEffect(() => {
actionRef.current?.reload();
}, [code]);
const columns: ProColumns<API.MoneyBo>[] = [
{
title: 'id',
dataIndex: 'id',
valueType: 'textarea',
ellipsis: true,
copyable: true,
},
{
title: '用户',
hideInSearch: true,
dataIndex: 'user',
valueType: 'textarea',
renderText: (_, r: API.MoneyBo) => {
if (!r.user) {
return;
}
return (
<Row>
<Avatar src={r.user?.avatar} />
<p style={{ fontSize: 12 }}>
id:{r.user.id}
<br />
{r.user?.nickname || r.user?.mobile}
</p>
</Row>
);
},
},
{
title: '金额(元)',
hideInSearch: true,
dataIndex: 'cent',
valueType: 'textarea',
renderText: (cent: number) => {
return cent2Yuan(cent);
},
},
{
title: '支付宝名称',
dataIndex: 'name',
},
{
title: '支付宝账号',
dataIndex: 'aliPayAccount',
},
{
title: '状态',
dataIndex: 'status',
renderText: (status: number) => {
const statusList = moneyStatus();
const matched = statusList.find((x) => x.value === status + '');
return matched ? matched.label : '未知';
},
},
{
title: '提现时间',
hideInTable: true,
dataIndex: 'createdAt',
valueType: 'dateRange',
},
{
title: '操作',
width: 100,
hideInSearch: true,
renderText: (record: API.MoneyBo) => (
<Flex gap="small" wrap>
{record.status === 0 && (
<>
<Popconfirm
title="拒绝提现申请"
description="拒绝后,状态无法修改成审批通过,确定拒绝吗?"
onConfirm={async () => {
await audit({ id: record.id, status: -2, reason: '' });
actionRef.current?.reload();
}}
okText="Yes"
cancelText="No"
>
<Button></Button>
</Popconfirm>
<Popconfirm
title="通过提现申请"
description="通过后系统将自动转账,无法撤回,确定通过吗?"
onConfirm={async () => {
await audit({ id: record.id, status: 1, reason: '' });
actionRef.current?.reload();
}}
okText="Yes"
cancelText="No"
>
<Button type="primary"></Button>
</Popconfirm>
</>
)}
</Flex>
),
},
];
return ( return (
<PageContainer> <PageContainer>
<p>TODO</p> <ProTable<API.MoneyBo, API.MoneyQuery>
search={false}
actionRef={actionRef}
request={async (params: API.MoneyQuery) => {
const res = await moneyApplyList({ ...params, appCode: code });
return {
data: res.data?.data,
total: res.data?.total,
success: true,
};
}}
columns={columns}
/>
</PageContainer> </PageContainer>
); );
}; };

103
src/pages/UserManagement.tsx

@ -1,9 +1,108 @@
import { PageContainer } from '@ant-design/pro-components'; import { ActionType, PageContainer, ProColumns, ProTable } from '@ant-design/pro-components';
import { useParams } from '@umijs/max';
import { Avatar, Tag } from 'antd';
import { useEffect, useRef } from 'react';
import { list } from '../services/matrix/matrixUserController';
import { cent2Yuan, formatIncome } from '../utils/numberUtils';
const UserManagement: React.FC = () => { const UserManagement: React.FC = () => {
const { code } = useParams();
const actionRef = useRef<ActionType>();
useEffect(() => {
actionRef.current?.reload();
}, [code]);
const columns: ProColumns<API.UserBo>[] = [
{
title: 'id',
dataIndex: 'id',
valueType: 'textarea',
ellipsis: true,
copyable: true,
},
{
title: '昵称',
hideInSearch: true,
dataIndex: 'nickname',
valueType: 'textarea',
renderText: (nickname: string, r: API.UserBo) => {
if (!nickname) {
return r.mobile;
}
return nickname;
},
},
{
title: '头像',
hideInSearch: true,
dataIndex: 'avatar',
valueType: 'textarea',
renderText: (avatar: string) => {
return <Avatar src={avatar} />;
},
},
{
title: '支付宝名称',
dataIndex: 'name',
},
{
title: '支付宝账号',
dataIndex: 'aliPayAccount',
},
{
title: '微信',
dataIndex: 'wxOpenId',
renderText: (s: string | undefined) => {
if (s) {
return <Tag color="green"></Tag>;
}
return <Tag color="red"></Tag>;
},
},
{
title: '总收益(元)',
dataIndex: 'income',
renderText: (r: number) => {
return formatIncome(r);
},
},
{
title: '已提现(元)',
dataIndex: 'money',
renderText: (r: number) => {
return cent2Yuan(r);
},
},
{
title: '注册时间',
hideInSearch: true,
dataIndex: 'createdAt',
valueType: 'dateTime',
},
{
title: '时间',
hideInTable: true,
dataIndex: 'createdAt',
valueType: 'dateRange',
},
];
return ( return (
<PageContainer> <PageContainer>
<p>TODO</p> <ProTable<API.UserBo, API.UserQuery>
search={false}
actionRef={actionRef}
request={async (params: API.UserQuery) => {
const res = await list({ ...params, appCode: code });
return {
data: res.data?.data,
total: res.data?.total,
success: true,
};
}}
columns={columns}
/>
</PageContainer> </PageContainer>
); );
}; };

6
src/services/matrix/index.ts

@ -9,16 +9,20 @@ import * as device from './device';
import * as loginController from './loginController'; import * as loginController from './loginController';
import * as matrixAppConfigController from './matrixAppConfigController'; import * as matrixAppConfigController from './matrixAppConfigController';
import * as matrixController from './matrixController'; import * as matrixController from './matrixController';
import * as matrixMoneyController from './matrixMoneyController';
import * as matrixUserController from './matrixUserController';
import * as openController from './openController'; import * as openController from './openController';
import * as userController from './userController'; import * as userController from './userController';
export default { export default {
matrixAppConfigController,
matrixController, matrixController,
loginController, loginController,
userController, userController,
openController, openController,
matrixUserController,
admin, admin,
matrixMoneyController,
device, device,
matrixAppConfigController,
appController, appController,
citrusAppController, citrusAppController,
}; };

40
src/services/matrix/matrixAppConfigController.ts

@ -2,13 +2,13 @@
/* eslint-disable */ /* eslint-disable */
import { request } from '@umijs/max'; import { request } from '@umijs/max';
/** 此处后端没有提供注释 GET /api/matrix/app/aliPayConfig */ /** 此处后端没有提供注释 GET /api/admin/app/aliPayConfig */
export async function getAliPayConfig( export async function getAliPayConfig(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getAliPayConfigParams, params: API.getAliPayConfigParams,
options?: { [key: string]: any }, options?: { [key: string]: any },
) { ) {
return request<API.RAliPayConfigBo>('/api/matrix/app/aliPayConfig', { return request<API.RAliPayConfigBo>('/api/admin/app/aliPayConfig', {
method: 'GET', method: 'GET',
params: { params: {
...params, ...params,
@ -17,14 +17,14 @@ export async function getAliPayConfig(
}); });
} }
/** 此处后端没有提供注释 POST /api/matrix/app/aliPayConfig */ /** 此处后端没有提供注释 POST /api/admin/app/aliPayConfig */
export async function saveAliPayConfig( export async function saveAliPayConfig(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.saveAliPayConfigParams, params: API.saveAliPayConfigParams,
body: API.AliPayConfigBo, body: API.AliPayConfigBo,
options?: { [key: string]: any }, options?: { [key: string]: any },
) { ) {
return request<API.RVoid>('/api/matrix/app/aliPayConfig', { return request<API.RVoid>('/api/admin/app/aliPayConfig', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@ -37,13 +37,13 @@ export async function saveAliPayConfig(
}); });
} }
/** 此处后端没有提供注释 GET /api/matrix/app/basicConfig */ /** 此处后端没有提供注释 GET /api/admin/app/basicConfig */
export async function getBasicConfig( export async function getBasicConfig(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getBasicConfigParams, params: API.getBasicConfigParams,
options?: { [key: string]: any }, options?: { [key: string]: any },
) { ) {
return request<API.RAppBasicConfig>('/api/matrix/app/basicConfig', { return request<API.RAppBasicConfig>('/api/admin/app/basicConfig', {
method: 'GET', method: 'GET',
params: { params: {
...params, ...params,
@ -52,9 +52,9 @@ export async function getBasicConfig(
}); });
} }
/** 此处后端没有提供注释 POST /api/matrix/app/basicConfig */ /** 此处后端没有提供注释 POST /api/admin/app/basicConfig */
export async function saveBasicConfig(body: API.AppBasicConfig, options?: { [key: string]: any }) { export async function saveBasicConfig(body: API.AppBasicConfig, options?: { [key: string]: any }) {
return request<API.RVoid>('/api/matrix/app/basicConfig', { return request<API.RVoid>('/api/admin/app/basicConfig', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@ -64,13 +64,13 @@ export async function saveBasicConfig(body: API.AppBasicConfig, options?: { [key
}); });
} }
/** 此处后端没有提供注释 GET /api/matrix/app/normalConfig */ /** 此处后端没有提供注释 GET /api/admin/app/normalConfig */
export async function getAppNormalConfig( export async function getAppNormalConfig(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getAppNormalConfigParams, params: API.getAppNormalConfigParams,
options?: { [key: string]: any }, options?: { [key: string]: any },
) { ) {
return request<API.RAppNormalConfig>('/api/matrix/app/normalConfig', { return request<API.RAppNormalConfig>('/api/admin/app/normalConfig', {
method: 'GET', method: 'GET',
params: { params: {
...params, ...params,
@ -79,14 +79,14 @@ export async function getAppNormalConfig(
}); });
} }
/** 此处后端没有提供注释 POST /api/matrix/app/normalConfig */ /** 此处后端没有提供注释 POST /api/admin/app/normalConfig */
export async function saveNormalConfig( export async function saveNormalConfig(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.saveNormalConfigParams, params: API.saveNormalConfigParams,
body: API.AppNormalConfig, body: API.AppNormalConfig,
options?: { [key: string]: any }, options?: { [key: string]: any },
) { ) {
return request<API.RVoid>('/api/matrix/app/normalConfig', { return request<API.RVoid>('/api/admin/app/normalConfig', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@ -99,13 +99,13 @@ export async function saveNormalConfig(
}); });
} }
/** 此处后端没有提供注释 GET /api/matrix/app/uMengConfig */ /** 此处后端没有提供注释 GET /api/admin/app/uMengConfig */
export async function getUMengConfig( export async function getUMengConfig(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getUMengConfigParams, params: API.getUMengConfigParams,
options?: { [key: string]: any }, options?: { [key: string]: any },
) { ) {
return request<API.RUmengConfigBo>('/api/matrix/app/uMengConfig', { return request<API.RUmengConfigBo>('/api/admin/app/uMengConfig', {
method: 'GET', method: 'GET',
params: { params: {
...params, ...params,
@ -114,14 +114,14 @@ export async function getUMengConfig(
}); });
} }
/** 此处后端没有提供注释 POST /api/matrix/app/uMengConfig */ /** 此处后端没有提供注释 POST /api/admin/app/uMengConfig */
export async function saveUMengConfig( export async function saveUMengConfig(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.saveUMengConfigParams, params: API.saveUMengConfigParams,
body: API.UmengConfigBo, body: API.UmengConfigBo,
options?: { [key: string]: any }, options?: { [key: string]: any },
) { ) {
return request<API.RVoid>('/api/matrix/app/uMengConfig', { return request<API.RVoid>('/api/admin/app/uMengConfig', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@ -134,13 +134,13 @@ export async function saveUMengConfig(
}); });
} }
/** 此处后端没有提供注释 GET /api/matrix/app/wxConfig */ /** 此处后端没有提供注释 GET /api/admin/app/wxConfig */
export async function getWxConfig( export async function getWxConfig(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getWxConfigParams, params: API.getWxConfigParams,
options?: { [key: string]: any }, options?: { [key: string]: any },
) { ) {
return request<API.RWxConfig>('/api/matrix/app/wxConfig', { return request<API.RWxConfig>('/api/admin/app/wxConfig', {
method: 'GET', method: 'GET',
params: { params: {
...params, ...params,
@ -149,14 +149,14 @@ export async function getWxConfig(
}); });
} }
/** 此处后端没有提供注释 POST /api/matrix/app/wxConfig */ /** 此处后端没有提供注释 POST /api/admin/app/wxConfig */
export async function saveWxConfig( export async function saveWxConfig(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.saveWxConfigParams, params: API.saveWxConfigParams,
body: API.WxConfig, body: API.WxConfig,
options?: { [key: string]: any }, options?: { [key: string]: any },
) { ) {
return request<API.RVoid>('/api/matrix/app/wxConfig', { return request<API.RVoid>('/api/admin/app/wxConfig', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',

27
src/services/matrix/matrixMoneyController.ts

@ -0,0 +1,27 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
/** 此处后端没有提供注释 POST /api/admin/money/audit */
export async function audit(body: API.MoneyBo, options?: { [key: string]: any }) {
return request<API.RVoid>('/api/admin/money/audit', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/admin/money/list */
export async function moneyApplyList(body: API.MoneyQuery, options?: { [key: string]: any }) {
return request<API.RPageResultMoneyBo>('/api/admin/money/list', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}

15
src/services/matrix/matrixUserController.ts

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

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

@ -341,6 +341,24 @@ declare namespace API {
end: number; end: number;
}; };
type MoneyBo = {
user?: UserBo;
id?: number;
cent?: number;
aliPayAccount?: string;
name?: string;
reason?: string;
status?: number;
createdAt?: number;
};
type MoneyQuery = {
current?: number;
pageSize?: number;
appCode?: string;
status?: number;
};
type offlineParams = { type offlineParams = {
deviceId: string; deviceId: string;
}; };
@ -363,6 +381,18 @@ declare namespace API {
sum?: number; sum?: number;
}; };
type PageResultMoneyBo = {
data?: MoneyBo[];
total?: number;
sum?: number;
};
type PageResultUserBo = {
data?: UserBo[];
total?: number;
sum?: number;
};
type RAliPayConfigBo = { type RAliPayConfigBo = {
code?: number; code?: number;
message?: string; message?: string;
@ -514,6 +544,18 @@ declare namespace API {
data?: PageResultMatrixAdvRecordBo; data?: PageResultMatrixAdvRecordBo;
}; };
type RPageResultMoneyBo = {
code?: number;
message?: string;
data?: PageResultMoneyBo;
};
type RPageResultUserBo = {
code?: number;
message?: string;
data?: PageResultUserBo;
};
type RRankList = { type RRankList = {
code?: number; code?: number;
message?: string; message?: string;
@ -617,6 +659,7 @@ declare namespace API {
inviteCode?: string; inviteCode?: string;
inviteUrl?: string; inviteUrl?: string;
wxOpenId?: string; wxOpenId?: string;
createdAt?: number;
}; };
type UserInfo = { type UserInfo = {
@ -625,6 +668,12 @@ declare namespace API {
score?: number; score?: number;
}; };
type UserQuery = {
current?: number;
pageSize?: number;
appCode?: string;
};
type whiteListParams = { type whiteListParams = {
deviceId: string; deviceId: string;
appCode: string; appCode: string;

13
src/utils/commonUtil.ts

@ -5,4 +5,15 @@ const channelList = () => {
]; ];
}; };
export { channelList }; const moneyStatus = () => {
return [
{ label: '待审批', value: '0' },
{ label: '审批通过', value: '1' },
{ label: '转账中', value: '2' },
{ label: '审批成功', value: '3' },
{ label: '转账失败', value: '-1' },
{ label: '审批拒绝', value: '-2' },
];
};
export { channelList, moneyStatus };

9
src/utils/numberUtils.ts

@ -5,4 +5,11 @@ const formatIncome = (v: number | undefined) => {
return parseFloat((v / 1000_00).toFixed(2)); return parseFloat((v / 1000_00).toFixed(2));
}; };
export { formatIncome }; const cent2Yuan = (v: number | undefined) => {
if (!v) {
return 0;
}
return parseFloat((v / 100).toFixed(2));
};
export { cent2Yuan, formatIncome };

Loading…
Cancel
Save