Browse Source

feat: 去掉无用的接口

lihao
nili 4 months ago
parent
commit
88ba720e76
  1. 2
      dist/_umi_route_preload_helper.3bd77924.js
  2. 4
      dist/index.html
  3. 1
      dist/p__MoneyManagement.504715f9.async.js
  4. 1
      dist/p__MoneyManagement.7a821bf4.async.js
  5. 2
      dist/p__SuperAdmin.aaa0f8d9.async.js
  6. 4
      dist/umi.1cc9e24b.js
  7. 24
      src/pages/MoneyManagement.tsx
  8. 4
      src/pages/SuperAdmin.tsx
  9. 94
      src/services/ant-design-pro/api.ts
  10. 10
      src/services/ant-design-pro/index.ts
  11. 21
      src/services/ant-design-pro/login.ts
  12. 101
      src/services/ant-design-pro/typings.d.ts
  13. 6
      src/services/matrix/admin.ts
  14. 18
      src/services/matrix/appController.ts
  15. 18
      src/services/matrix/citrusAppController.ts
  16. 12
      src/services/matrix/index.ts
  17. 114
      src/services/matrix/loginController.ts
  18. 93
      src/services/matrix/matrixController.ts
  19. 81
      src/services/matrix/openController.ts
  20. 245
      src/services/matrix/typings.d.ts
  21. 76
      src/services/matrix/userController.ts
  22. 12
      src/services/swagger/index.ts
  23. 153
      src/services/swagger/pet.ts
  24. 48
      src/services/swagger/store.ts
  25. 112
      src/services/swagger/typings.d.ts
  26. 100
      src/services/swagger/user.ts

2
dist/_umi_route_preload_helper.d33b5233.js → dist/_umi_route_preload_helper.3bd77924.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.504715f9.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.cd20fd1e.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.a12680df.async.js",731],["804.139cd916.async.js",804],["p__AdminManagement.4b0ea38b.async.js",816],["841.614ef4c0.async.js",841],["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,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.7a821bf4.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.aaa0f8d9.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.a12680df.async.js",731],["804.139cd916.async.js",804],["p__AdminManagement.4b0ea38b.async.js",816],["841.614ef4c0.async.js",841],["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,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>
<link rel="stylesheet" href="/umi.1ca9308c.css">
<script async src="/scripts/loading.js"></script>
<script src="/_umi_route_preload_helper.d33b5233.js"></script>
<script src="/_umi_route_preload_helper.3bd77924.js"></script>
</head>
<body>
<div id="root"></div>
<script src="/umi.14522ca8.js"></script>
<script src="/umi.1cc9e24b.js"></script>
</body>
</html>

1
dist/p__MoneyManagement.504715f9.async.js

File diff suppressed because one or more lines are too long

1
dist/p__MoneyManagement.7a821bf4.async.js

File diff suppressed because one or more lines are too long

2
dist/p__SuperAdmin.cd20fd1e.async.js → dist/p__SuperAdmin.aaa0f8d9.async.js

File diff suppressed because one or more lines are too long

4
dist/umi.14522ca8.js → dist/umi.1cc9e24b.js

File diff suppressed because one or more lines are too long

24
src/pages/MoneyManagement.tsx

@ -34,7 +34,7 @@ const MoneyManagement: React.FC = () => {
return (
<Row>
<Avatar src={r.user?.avatar} />
<p style={{ fontSize: 12 }}>
<p style={{ fontSize: 12, marginLeft: 10 }}>
id:{r.user.id}
<br />
{r.user?.nickname || r.user?.mobile}
@ -60,6 +60,18 @@ const MoneyManagement: React.FC = () => {
title: '支付宝账号',
dataIndex: 'aliPayAccount',
},
{
title: '订单号',
dataIndex: 'orderId',
},
{
title: '资金流水号',
dataIndex: 'payFundOrderId',
},
{
title: '转账时间',
dataIndex: 'transDate',
},
{
title: '状态',
dataIndex: 'status',
@ -70,7 +82,7 @@ const MoneyManagement: React.FC = () => {
},
},
{
title: '提现时间',
title: '提现申请时间',
hideInTable: true,
dataIndex: 'createdAt',
valueType: 'dateRange',
@ -90,8 +102,8 @@ const MoneyManagement: React.FC = () => {
await audit({ id: record.id, status: -2, reason: '' });
actionRef.current?.reload();
}}
okText="Yes"
cancelText="No"
okText="确定"
cancelText="取消"
>
<Button></Button>
</Popconfirm>
@ -102,8 +114,8 @@ const MoneyManagement: React.FC = () => {
await audit({ id: record.id, status: 1, reason: '' });
actionRef.current?.reload();
}}
okText="Yes"
cancelText="No"
okText="确定"
cancelText="取消"
>
<Button type="primary"></Button>
</Popconfirm>

4
src/pages/SuperAdmin.tsx

@ -1,10 +1,10 @@
import {
addSchedule,
addWhiteList1,
addWhiteList as addWhiteList1,
appList,
deleteWhiteList,
scheduleList,
whiteList1,
whiteList as whiteList1,
} from '@/services/matrix/admin';
import { channelList } from '@/utils/commonUtil';
import { MinusCircleOutlined } from '@ant-design/icons';

94
src/services/ant-design-pro/api.ts

@ -1,94 +0,0 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
/** 获取当前的用户 GET /api/currentUser */
export async function currentUser(options?: { [key: string]: any }) {
return request<{
data: API.CurrentUser;
}>('/api/currentUser', {
method: 'GET',
...(options || {}),
});
}
/** 退出登录接口 POST /api/login/outLogin */
export async function outLogin(options?: { [key: string]: any }) {
return request<Record<string, any>>('/api/login/outLogin', {
method: 'POST',
...(options || {}),
});
}
/** 登录接口 POST /api/login/account */
export async function login(body: API.LoginParams, options?: { [key: string]: any }) {
return request<API.LoginResult>('/api/login/account', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 此处后端没有提供注释 GET /api/notices */
export async function getNotices(options?: { [key: string]: any }) {
return request<API.NoticeIconList>('/api/notices', {
method: 'GET',
...(options || {}),
});
}
/** 获取规则列表 GET /api/rule */
export async function rule(
params: {
// query
/** 当前的页码 */
current?: number;
/** 页面的容量 */
pageSize?: number;
},
options?: { [key: string]: any },
) {
return request<API.RuleList>('/api/rule', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}
/** 更新规则 PUT /api/rule */
export async function updateRule(options?: { [key: string]: any }) {
return request<API.RuleListItem>('/api/rule', {
method: 'POST',
data:{
method: 'update',
...(options || {}),
}
});
}
/** 新建规则 POST /api/rule */
export async function addRule(options?: { [key: string]: any }) {
return request<API.RuleListItem>('/api/rule', {
method: 'POST',
data:{
method: 'post',
...(options || {}),
}
});
}
/** 删除规则 DELETE /api/rule */
export async function removeRule(options?: { [key: string]: any }) {
return request<Record<string, any>>('/api/rule', {
method: 'POST',
data:{
method: 'delete',
...(options || {}),
}
});
}

10
src/services/ant-design-pro/index.ts

@ -1,10 +0,0 @@
// @ts-ignore
/* eslint-disable */
// API 更新时间:
// API 唯一标识:
import * as api from './api';
import * as login from './login';
export default {
api,
login,
};

21
src/services/ant-design-pro/login.ts

@ -1,21 +0,0 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
/** 发送验证码 POST /api/login/captcha */
export async function getFakeCaptcha(
params: {
// query
/** 手机号 */
phone?: string;
},
options?: { [key: string]: any },
) {
return request<API.FakeCaptcha>('/api/login/captcha', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}

101
src/services/ant-design-pro/typings.d.ts

@ -1,101 +0,0 @@
// @ts-ignore
/* eslint-disable */
declare namespace API {
type CurrentUser = {
name?: string;
avatar?: string;
userid?: string;
email?: string;
signature?: string;
title?: string;
group?: string;
tags?: { key?: string; label?: string }[];
notifyCount?: number;
unreadCount?: number;
country?: string;
access?: string;
geographic?: {
province?: { label?: string; key?: string };
city?: { label?: string; key?: string };
};
address?: string;
phone?: string;
};
type LoginResult = {
status?: string;
type?: string;
currentAuthority?: string;
};
type PageParams = {
current?: number;
pageSize?: number;
};
type RuleListItem = {
key?: number;
disabled?: boolean;
href?: string;
avatar?: string;
name?: string;
owner?: string;
desc?: string;
callNo?: number;
status?: number;
updatedAt?: string;
createdAt?: string;
progress?: number;
};
type RuleList = {
data?: RuleListItem[];
/** 列表的内容总数 */
total?: number;
success?: boolean;
};
type FakeCaptcha = {
code?: number;
status?: string;
};
type LoginParams = {
username?: string;
password?: string;
autoLogin?: boolean;
type?: string;
};
type ErrorResponse = {
/** 业务约定的错误码 */
errorCode: string;
/** 业务上的错误信息 */
errorMessage?: string;
/** 业务上的请求是否成功 */
success?: boolean;
};
type NoticeIconList = {
data?: NoticeIconItem[];
/** 列表的内容总数 */
total?: number;
success?: boolean;
};
type NoticeIconItemType = 'notification' | 'message' | 'event';
type NoticeIconItem = {
id?: string;
extra?: string;
key?: string;
read?: boolean;
avatar?: string;
title?: string;
status?: string;
datetime?: string;
description?: string;
type?: NoticeIconItemType;
};
}

6
src/services/matrix/admin.ts

@ -15,9 +15,9 @@ export async function addSchedule(body: API.AddMockScheduleReq, options?: { [key
}
/** 此处后端没有提供注释 POST /api/admin/addWhiteList */
export async function addWhiteList1(
export async function addWhiteList(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.addWhiteList1Params,
params: API.addWhiteListParams,
options?: { [key: string]: any },
) {
return request<API.RVoid>('/api/admin/addWhiteList', {
@ -193,7 +193,7 @@ export async function scheduleList(options?: { [key: string]: any }) {
}
/** 此处后端没有提供注释 GET /api/admin/whiteList */
export async function whiteList1(options?: { [key: string]: any }) {
export async function whiteList(options?: { [key: string]: any }) {
return request<API.RListMatrixWhiteDevice>('/api/admin/whiteList', {
method: 'GET',
...(options || {}),

18
src/services/matrix/appController.ts

@ -1,18 +0,0 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
/** 此处后端没有提供注释 GET /api/game/app/info */
export async function getAppInfo(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getAppInfoParams,
options?: { [key: string]: any },
) {
return request<API.RAppInfo>('/api/game/app/info', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}

18
src/services/matrix/citrusAppController.ts

@ -1,18 +0,0 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
/** 此处后端没有提供注释 GET /api/citrus/app/getDetail */
export async function getAppDetail(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getAppDetailParams,
options?: { [key: string]: any },
) {
return request<API.RAppCashConfig>('/api/citrus/app/getDetail', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}

12
src/services/matrix/index.ts

@ -3,26 +3,14 @@
// API 更新时间:
// API 唯一标识:
import * as admin from './admin';
import * as appController from './appController';
import * as citrusAppController from './citrusAppController';
import * as device from './device';
import * as loginController from './loginController';
import * as matrixAppConfigController from './matrixAppConfigController';
import * as matrixController from './matrixController';
import * as matrixMoneyController from './matrixMoneyController';
import * as matrixUserController from './matrixUserController';
import * as openController from './openController';
import * as userController from './userController';
export default {
matrixController,
loginController,
userController,
openController,
matrixUserController,
admin,
matrixMoneyController,
device,
matrixAppConfigController,
appController,
citrusAppController,
};

114
src/services/matrix/loginController.ts

@ -1,114 +0,0 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
/** 此处后端没有提供注释 GET /api/game/auth/current */
export async function currentUser(options?: { [key: string]: any }) {
return request<API.RCurrentUser>('/api/game/auth/current', {
method: 'GET',
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/game/auth/login */
export async function wxLogin(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.wxLoginParams,
options?: { [key: string]: any },
) {
return request<API.RString>('/api/game/auth/login', {
method: 'POST',
params: {
...params,
},
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/game/auth/loginV2 */
export async function wxLoginV2(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.wxLoginV2Params,
options?: { [key: string]: any },
) {
return request<API.RLoginBo>('/api/game/auth/loginV2', {
method: 'POST',
params: {
...params,
},
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/game/auth/loginV3 */
export async function loginV3(body: API.LoginReq, options?: { [key: string]: any }) {
return request<API.RLoginBo>('/api/game/auth/loginV3', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 此处后端没有提供注释 GET /api/game/auth/myInviteRecord */
export async function myInviteRecord(options?: { [key: string]: any }) {
return request<API.RInviteInfo>('/api/game/auth/myInviteRecord', {
method: 'GET',
...(options || {}),
});
}
/** 此处后端没有提供注释 GET /api/game/auth/rankList */
export async function rankList(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.rankListParams,
options?: { [key: string]: any },
) {
return request<API.RRankList>('/api/game/auth/rankList', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}
/** 此处后端没有提供注释 GET /api/game/auth/test */
export async function setInviteCode(options?: { [key: string]: any }) {
return request<API.RVoid>('/api/game/auth/test', {
method: 'GET',
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/game/auth/updateScore */
export async function updateScore(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.updateScoreParams,
options?: { [key: string]: any },
) {
return request<API.RVoid>('/api/game/auth/updateScore', {
method: 'POST',
params: {
...params,
},
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/game/auth/updateUserInfo */
export async function updateUserInfo(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.updateUserInfoParams,
options?: { [key: string]: any },
) {
return request<API.RVoid>('/api/game/auth/updateUserInfo', {
method: 'POST',
params: {
...params,
},
...(options || {}),
});
}

93
src/services/matrix/matrixController.ts

@ -1,93 +0,0 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
/** 此处后端没有提供注释 POST /api/game/matrix/addWhiteList */
export async function addWhiteList(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.addWhiteListParams,
options?: { [key: string]: any },
) {
return request<API.RVoid>('/api/game/matrix/addWhiteList', {
method: 'POST',
params: {
...params,
},
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/game/matrix/bindDevice */
export async function bindDevice(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.bindDeviceParams,
options?: { [key: string]: any },
) {
return request<API.RString>('/api/game/matrix/bindDevice', {
method: 'POST',
params: {
...params,
},
...(options || {}),
});
}
/** 此处后端没有提供注释 GET /api/game/matrix/getAdvList */
export async function getAdvList(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getAdvListParams,
options?: { [key: string]: any },
) {
return request<API.RListMatrixAdvRecordSimple>('/api/game/matrix/getAdvList', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/game/matrix/saveAdvRecord */
export async function saveAdvRecord(
body: API.MatrixAdvRecordEditBo,
options?: { [key: string]: any },
) {
return request<API.RVoid>('/api/game/matrix/saveAdvRecord', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/game/matrix/saveAdvRecordV2 */
export async function saveAdvRecordV2(
body: API.MatrixAdvRecordEditBo,
options?: { [key: string]: any },
) {
return request<API.RVoid>('/api/game/matrix/saveAdvRecordV2', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 此处后端没有提供注释 GET /api/game/matrix/whiteList */
export async function whiteList(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.whiteListParams,
options?: { [key: string]: any },
) {
return request<API.RBoolean>('/api/game/matrix/whiteList', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}

81
src/services/matrix/openController.ts

@ -1,81 +0,0 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
/** 此处后端没有提供注释 POST /api/citrus/loginByCode */
export async function loginByCode(body: API.LoginReq, options?: { [key: string]: any }) {
return request<API.RString>('/api/citrus/loginByCode', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/citrus/loginByPwd */
export async function loginByPwd(body: API.LoginReq, options?: { [key: string]: any }) {
return request<API.RString>('/api/citrus/loginByPwd', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/citrus/loginByToken */
export async function loginByToken(body: API.LoginReq, options?: { [key: string]: any }) {
return request<API.RString>('/api/citrus/loginByToken', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 此处后端没有提供注释 GET /api/citrus/register/getApp */
export async function getApp(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getAppParams,
options?: { [key: string]: any },
) {
return request<API.RMatrixAppBo>('/api/citrus/register/getApp', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/citrus/register/sendCode */
export async function sendCode(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.sendCodeParams,
options?: { [key: string]: any },
) {
return request<API.RVoid>('/api/citrus/register/sendCode', {
method: 'POST',
params: {
...params,
},
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/citrus/register/submitRegister */
export async function submitRegister(body: API.RegisterBo, options?: { [key: string]: any }) {
return request<API.RVoid>('/api/citrus/register/submitRegister', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}

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

@ -5,14 +5,9 @@ declare namespace API {
scheduleTime?: number[];
};
type addWhiteList1Params = {
deviceId: string;
channel: string;
};
type addWhiteListParams = {
deviceId: string;
appCode: string;
channel: string;
};
type adminLoginParams = {
@ -51,25 +46,6 @@ declare namespace API {
version?: number;
};
type AppCashConfig = {
moneyLadder?: number[];
noAuditMoney?: number;
qqUrl?: string;
dayLimit?: number;
};
type AppInfo = {
name?: string;
icon?: string;
appId?: string;
inAudit?: number;
recommend?: AppInfo[];
};
type applyCashParams = {
money: number;
};
type AppNormalConfig = {
moneyLadder?: number[];
noAuditMoney?: number;
@ -80,34 +56,10 @@ declare namespace API {
defaultRate?: number;
};
type bindDeviceParams = {
deviceId: string;
appCode: string;
adminName: string;
};
type bindWxParams = {
accessToken: string;
openId: string;
};
type calcParams = {
date: number;
};
type CashRecord = {
cent?: number;
createTime?: number;
status?: number;
};
type CurrentUser = {
avatarUrl?: string;
nickName?: string;
score?: number;
openId?: string;
};
type DateIncome = {
date?: number;
income?: number;
@ -126,32 +78,14 @@ declare namespace API {
appCode: string;
};
type getAdvListParams = {
appCode: string;
deviceId: string;
};
type getAliPayConfigParams = {
appCode: string;
};
type getAppDetailParams = {
appCode: string;
};
type getAppInfoParams = {
appId?: string;
};
type getAppNormalConfigParams = {
appCode: string;
};
type getAppParams = {
inviteCode?: string;
appCode?: string;
};
type getBasicConfigParams = {
appCode: string;
};
@ -184,31 +118,6 @@ declare namespace API {
date?: string[];
};
type InviteInfo = {
inviteCnt?: number;
list?: InviteUserInfo[];
};
type InviteUserInfo = {
avatarUrl?: string;
nickName?: string;
score?: number;
nextTime?: number;
};
type LoginBo = {
jwtToken?: string;
inviteCode?: string;
signature?: string;
};
type LoginReq = {
code?: string;
appId?: string;
inviteCode?: string;
rawData?: string;
};
type MatrixAdmin = {
id?: number;
name?: string;
@ -261,27 +170,6 @@ declare namespace API {
adminName?: string;
};
type MatrixAdvRecordEditBo = {
deviceId?: string;
appCode?: string;
platform?: number;
advType?: number;
ecpm?: number;
deviceBrand?: string;
deviceName?: string;
ip?: string;
advId?: number;
sign?: string;
};
type MatrixAdvRecordSimple = {
deviceId?: string;
platform?: number;
advType?: number;
ecpm?: number;
createdAt?: number;
};
type MatrixApp = {
id?: number;
name?: string;
@ -348,6 +236,9 @@ declare namespace API {
aliPayAccount?: string;
name?: string;
reason?: string;
orderId?: string;
payFundOrderId?: string;
transDate?: string;
status?: number;
createdAt?: number;
};
@ -399,73 +290,18 @@ declare namespace API {
data?: AliPayConfigBo;
};
type RankList = {
list?: UserInfo[];
myRank?: string;
myScore?: number;
myAvatarUrl?: string;
myNickName?: string;
};
type rankListParams = {
size: number;
};
type RAppBasicConfig = {
code?: number;
message?: string;
data?: AppBasicConfig;
};
type RAppCashConfig = {
code?: number;
message?: string;
data?: AppCashConfig;
};
type RAppInfo = {
code?: number;
message?: string;
data?: AppInfo;
};
type RAppNormalConfig = {
code?: number;
message?: string;
data?: AppNormalConfig;
};
type RBoolean = {
code?: number;
message?: string;
data?: boolean;
};
type RCurrentUser = {
code?: number;
message?: string;
data?: CurrentUser;
};
type RegisterBo = {
mobile?: string;
code?: string;
pwd?: string;
inviteCode?: string;
};
type RInviteInfo = {
code?: number;
message?: string;
data?: InviteInfo;
};
type RListCashRecord = {
code?: number;
message?: string;
data?: CashRecord[];
};
type RListDateIncome = {
code?: number;
message?: string;
@ -484,12 +320,6 @@ declare namespace API {
data?: MatrixAdminDevice[];
};
type RListMatrixAdvRecordSimple = {
code?: number;
message?: string;
data?: MatrixAdvRecordSimple[];
};
type RListMatrixAppBo = {
code?: number;
message?: string;
@ -508,30 +338,12 @@ declare namespace API {
data?: MatrixWhiteDevice[];
};
type RLoginBo = {
code?: number;
message?: string;
data?: LoginBo;
};
type RLong = {
code?: number;
message?: string;
data?: number;
};
type RMatrixAdmin = {
code?: number;
message?: string;
data?: MatrixAdmin;
};
type RMatrixAppBo = {
code?: number;
message?: string;
data?: MatrixAppBo;
};
type ROverviewBo = {
code?: number;
message?: string;
@ -556,12 +368,6 @@ declare namespace API {
data?: PageResultUserBo;
};
type RRankList = {
code?: number;
message?: string;
data?: RankList;
};
type RString = {
code?: number;
message?: string;
@ -580,12 +386,6 @@ declare namespace API {
data?: UmengConfigBo;
};
type RUserBo = {
code?: number;
message?: string;
data?: UserBo;
};
type RVoid = {
code?: number;
message?: string;
@ -614,11 +414,6 @@ declare namespace API {
appCode: string;
};
type sendCodeParams = {
mobile: string;
scene: string;
};
type STSInfo = {
securityToken?: string;
expiration?: string;
@ -638,15 +433,6 @@ declare namespace API {
bindWx?: boolean;
};
type updateScoreParams = {
score: number;
};
type updateUserInfoParams = {
rawData: string;
signature: string;
};
type UserBo = {
id?: number;
mobile?: string;
@ -663,37 +449,14 @@ declare namespace API {
createdAt?: number;
};
type UserInfo = {
avatarUrl?: string;
nickName?: string;
score?: number;
};
type UserQuery = {
current?: number;
pageSize?: number;
appCode?: string;
};
type whiteListParams = {
deviceId: string;
appCode: string;
};
type WxConfig = {
appId?: string;
appSecret?: string;
};
type wxLoginParams = {
code: string;
appId: string;
};
type wxLoginV2Params = {
code: string;
appId: string;
inviteCode?: string;
rawData?: string;
};
}

76
src/services/matrix/userController.ts

@ -1,76 +0,0 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
/** 此处后端没有提供注释 POST /api/citrus/user/applyCash */
export async function applyCash(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.applyCashParams,
options?: { [key: string]: any },
) {
return request<API.RVoid>('/api/citrus/user/applyCash', {
method: 'POST',
params: {
...params,
},
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/citrus/user/bindAliPay */
export async function bindAliPay(body: API.UserBo, options?: { [key: string]: any }) {
return request<API.RVoid>('/api/citrus/user/bindAliPay', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/citrus/user/bindWx */
export async function bindWx(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.bindWxParams,
options?: { [key: string]: any },
) {
return request<API.RVoid>('/api/citrus/user/bindWx', {
method: 'POST',
params: {
...params,
},
...(options || {}),
});
}
/** 此处后端没有提供注释 GET /api/citrus/user/cashRecords */
export async function getCashRecord(options?: { [key: string]: any }) {
return request<API.RListCashRecord>('/api/citrus/user/cashRecords', {
method: 'GET',
...(options || {}),
});
}
/** 此处后端没有提供注释 GET /api/citrus/user/current */
export async function currentUser1(options?: { [key: string]: any }) {
return request<API.RUserBo>('/api/citrus/user/current', {
method: 'GET',
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /api/citrus/user/saveAdvRecordV3 */
export async function saveAdvRecordV3(
body: API.MatrixAdvRecordEditBo,
options?: { [key: string]: any },
) {
return request<API.RLong>('/api/citrus/user/saveAdvRecordV3', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}

12
src/services/swagger/index.ts

@ -1,12 +0,0 @@
// @ts-ignore
/* eslint-disable */
// API 更新时间:
// API 唯一标识:
import * as pet from './pet';
import * as store from './store';
import * as user from './user';
export default {
pet,
store,
user,
};

153
src/services/swagger/pet.ts

@ -1,153 +0,0 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
/** Update an existing pet PUT /pet */
export async function updatePet(body: API.Pet, options?: { [key: string]: any }) {
return request<any>('/pet', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** Add a new pet to the store POST /pet */
export async function addPet(body: API.Pet, options?: { [key: string]: any }) {
return request<any>('/pet', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** Find pet by ID Returns a single pet GET /pet/${param0} */
export async function getPetById(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getPetByIdParams,
options?: { [key: string]: any },
) {
const { petId: param0, ...queryParams } = params;
return request<API.Pet>(`/pet/${param0}`, {
method: 'GET',
params: { ...queryParams },
...(options || {}),
});
}
/** Updates a pet in the store with form data POST /pet/${param0} */
export async function updatePetWithForm(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.updatePetWithFormParams,
body: { name?: string; status?: string },
options?: { [key: string]: any },
) {
const { petId: param0, ...queryParams } = params;
const formData = new FormData();
Object.keys(body).forEach((ele) => {
const item = (body as any)[ele];
if (item !== undefined && item !== null) {
formData.append(
ele,
typeof item === 'object' && !(item instanceof File) ? JSON.stringify(item) : item,
);
}
});
return request<any>(`/pet/${param0}`, {
method: 'POST',
params: { ...queryParams },
data: formData,
...(options || {}),
});
}
/** Deletes a pet DELETE /pet/${param0} */
export async function deletePet(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.deletePetParams & {
// header
api_key?: string;
},
options?: { [key: string]: any },
) {
const { petId: param0, ...queryParams } = params;
return request<any>(`/pet/${param0}`, {
method: 'DELETE',
headers: {},
params: { ...queryParams },
...(options || {}),
});
}
/** uploads an image POST /pet/${param0}/uploadImage */
export async function uploadFile(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.uploadFileParams,
body: { additionalMetadata?: string; file?: string },
file?: File,
options?: { [key: string]: any },
) {
const { petId: param0, ...queryParams } = params;
const formData = new FormData();
if (file) {
formData.append('file', file);
}
Object.keys(body).forEach((ele) => {
const item = (body as any)[ele];
if (item !== undefined && item !== null) {
formData.append(
ele,
typeof item === 'object' && !(item instanceof File) ? JSON.stringify(item) : item,
);
}
});
return request<API.ApiResponse>(`/pet/${param0}/uploadImage`, {
method: 'POST',
params: { ...queryParams },
data: formData,
requestType: 'form',
...(options || {}),
});
}
/** Finds Pets by status Multiple status values can be provided with comma separated strings GET /pet/findByStatus */
export async function findPetsByStatus(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.findPetsByStatusParams,
options?: { [key: string]: any },
) {
return request<API.Pet[]>('/pet/findByStatus', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}
/** Finds Pets by tags Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. GET /pet/findByTags */
export async function findPetsByTags(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.findPetsByTagsParams,
options?: { [key: string]: any },
) {
return request<API.Pet[]>('/pet/findByTags', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}

48
src/services/swagger/store.ts

@ -1,48 +0,0 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
/** Returns pet inventories by status Returns a map of status codes to quantities GET /store/inventory */
export async function getInventory(options?: { [key: string]: any }) {
return request<Record<string, any>>('/store/inventory', {
method: 'GET',
...(options || {}),
});
}
/** Place an order for a pet POST /store/order */
export async function placeOrder(body: API.Order, options?: { [key: string]: any }) {
return request<API.Order>('/store/order', {
method: 'POST',
data: body,
...(options || {}),
});
}
/** Find purchase order by ID For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions GET /store/order/${param0} */
export async function getOrderById(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getOrderByIdParams,
options?: { [key: string]: any },
) {
const { orderId: param0, ...queryParams } = params;
return request<API.Order>(`/store/order/${param0}`, {
method: 'GET',
params: { ...queryParams },
...(options || {}),
});
}
/** Delete purchase order by ID For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors DELETE /store/order/${param0} */
export async function deleteOrder(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.deleteOrderParams,
options?: { [key: string]: any },
) {
const { orderId: param0, ...queryParams } = params;
return request<any>(`/store/order/${param0}`, {
method: 'DELETE',
params: { ...queryParams },
...(options || {}),
});
}

112
src/services/swagger/typings.d.ts

@ -1,112 +0,0 @@
declare namespace API {
type ApiResponse = {
code?: number;
type?: string;
message?: string;
};
type Category = {
id?: number;
name?: string;
};
type deleteOrderParams = {
/** ID of the order that needs to be deleted */
orderId: number;
};
type deletePetParams = {
api_key?: string;
/** Pet id to delete */
petId: number;
};
type deleteUserParams = {
/** The name that needs to be deleted */
username: string;
};
type findPetsByStatusParams = {
/** Status values that need to be considered for filter */
status: ('available' | 'pending' | 'sold')[];
};
type findPetsByTagsParams = {
/** Tags to filter by */
tags: string[];
};
type getOrderByIdParams = {
/** ID of pet that needs to be fetched */
orderId: number;
};
type getPetByIdParams = {
/** ID of pet to return */
petId: number;
};
type getUserByNameParams = {
/** The name that needs to be fetched. Use user1 for testing. */
username: string;
};
type loginUserParams = {
/** The user name for login */
username: string;
/** The password for login in clear text */
password: string;
};
type Order = {
id?: number;
petId?: number;
quantity?: number;
shipDate?: string;
/** Order Status */
status?: 'placed' | 'approved' | 'delivered';
complete?: boolean;
};
type Pet = {
id?: number;
category?: Category;
name: string;
photoUrls: string[];
tags?: Tag[];
/** pet status in the store */
status?: 'available' | 'pending' | 'sold';
};
type Tag = {
id?: number;
name?: string;
};
type updatePetWithFormParams = {
/** ID of pet that needs to be updated */
petId: number;
};
type updateUserParams = {
/** name that need to be updated */
username: string;
};
type uploadFileParams = {
/** ID of pet to update */
petId: number;
};
type User = {
id?: number;
username?: string;
firstName?: string;
lastName?: string;
email?: string;
password?: string;
phone?: string;
/** User Status */
userStatus?: number;
};
}

100
src/services/swagger/user.ts

@ -1,100 +0,0 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
/** Create user This can only be done by the logged in user. POST /user */
export async function createUser(body: API.User, options?: { [key: string]: any }) {
return request<any>('/user', {
method: 'POST',
data: body,
...(options || {}),
});
}
/** Get user by user name GET /user/${param0} */
export async function getUserByName(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getUserByNameParams,
options?: { [key: string]: any },
) {
const { username: param0, ...queryParams } = params;
return request<API.User>(`/user/${param0}`, {
method: 'GET',
params: { ...queryParams },
...(options || {}),
});
}
/** Updated user This can only be done by the logged in user. PUT /user/${param0} */
export async function updateUser(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.updateUserParams,
body: API.User,
options?: { [key: string]: any },
) {
const { username: param0, ...queryParams } = params;
return request<any>(`/user/${param0}`, {
method: 'PUT',
params: { ...queryParams },
data: body,
...(options || {}),
});
}
/** Delete user This can only be done by the logged in user. DELETE /user/${param0} */
export async function deleteUser(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.deleteUserParams,
options?: { [key: string]: any },
) {
const { username: param0, ...queryParams } = params;
return request<any>(`/user/${param0}`, {
method: 'DELETE',
params: { ...queryParams },
...(options || {}),
});
}
/** Creates list of users with given input array POST /user/createWithArray */
export async function createUsersWithArrayInput(
body: API.User[],
options?: { [key: string]: any },
) {
return request<any>('/user/createWithArray', {
method: 'POST',
data: body,
...(options || {}),
});
}
/** Creates list of users with given input array POST /user/createWithList */
export async function createUsersWithListInput(body: API.User[], options?: { [key: string]: any }) {
return request<any>('/user/createWithList', {
method: 'POST',
data: body,
...(options || {}),
});
}
/** Logs user into the system GET /user/login */
export async function loginUser(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.loginUserParams,
options?: { [key: string]: any },
) {
return request<string>('/user/login', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}
/** Logs out current logged in user session GET /user/logout */
export async function logoutUser(options?: { [key: string]: any }) {
return request<any>('/user/logout', {
method: 'GET',
...(options || {}),
});
}
Loading…
Cancel
Save