Merge branch 'develop' of ssh://code.juyouwu.cn:2222/pay/pay-admin into develop
This commit is contained in:
commit
2a965d5f07
@ -35,7 +35,7 @@ export const stateActions = {
|
|||||||
state.storage.access_token = undefined;
|
state.storage.access_token = undefined;
|
||||||
},
|
},
|
||||||
me: async () => {
|
me: async () => {
|
||||||
const res = await Apis.Auth.Me();
|
const res = await Apis.Common.Auth.Me();
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
stateActions.setLogin(res);
|
stateActions.setLogin(res);
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -18,7 +18,7 @@ export function MyLoginPage1() {
|
|||||||
const [getCaptcha, setCaptcha] = useState<any>({});
|
const [getCaptcha, setCaptcha] = useState<any>({});
|
||||||
const methods = {
|
const methods = {
|
||||||
getCaptcha: () => {
|
getCaptcha: () => {
|
||||||
Apis.Auth.Captcha().then(async (res) => {
|
Apis.Common.Auth.Captcha().then(async (res) => {
|
||||||
setCaptcha(res?.data);
|
setCaptcha(res?.data);
|
||||||
console.log(res, 'res');
|
console.log(res, 'res');
|
||||||
});
|
});
|
||||||
@ -35,12 +35,12 @@ export function MyLoginPage1() {
|
|||||||
height: '100vh',
|
height: '100vh',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<LoginFormPage<ApiTypes.Auth.Login>
|
<LoginFormPage<ApiTypes.Common.Auth.Login>
|
||||||
title="欢迎使用后台管理系统"
|
title="欢迎使用后台管理系统"
|
||||||
backgroundVideoUrl="https://gw.alipayobjects.com/v/huamei_gcee1x/afts/video/jXRBRK_VAwoAAAAAAAAAAAAAK4eUAQBr"
|
backgroundVideoUrl="https://gw.alipayobjects.com/v/huamei_gcee1x/afts/video/jXRBRK_VAwoAAAAAAAAAAAAAK4eUAQBr"
|
||||||
subTitle="Admin management system"
|
subTitle="Admin management system"
|
||||||
onFinish={async (values: any) => {
|
onFinish={async (values: any) => {
|
||||||
Apis.Auth.Login({
|
Apis.Common.Auth.Login({
|
||||||
...values,
|
...values,
|
||||||
...{ captcha_key: getCaptcha?.key },
|
...{ captcha_key: getCaptcha?.key },
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,205 +0,0 @@
|
|||||||
import { rulesHelper } from '@/common';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
|
||||||
import { ProColumns, ProFormColumnsType } from '@ant-design/pro-components';
|
|
||||||
|
|
||||||
type ReturnType = ProColumns<any, 'text'> & ProFormColumnsType<any, 'text'>;
|
|
||||||
type PropsType = { required?: boolean } & ReturnType;
|
|
||||||
|
|
||||||
export const Selects = {
|
|
||||||
Agents(props?: PropsType): ReturnType {
|
|
||||||
const {
|
|
||||||
title = '代理',
|
|
||||||
key = 'agents_id',
|
|
||||||
dataIndex = ['agent', 'name'],
|
|
||||||
required = false,
|
|
||||||
hideInTable = false,
|
|
||||||
...rest
|
|
||||||
} = props ?? {};
|
|
||||||
|
|
||||||
return {
|
|
||||||
title: title,
|
|
||||||
key: key,
|
|
||||||
dataIndex: dataIndex,
|
|
||||||
valueType: 'select',
|
|
||||||
hideInTable: hideInTable,
|
|
||||||
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
|
||||||
fieldProps: {
|
|
||||||
showSearch: false,
|
|
||||||
fieldNames: {
|
|
||||||
label: 'name',
|
|
||||||
value: 'id',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
request: async () => (await Apis.Select.Agents()).data,
|
|
||||||
...rest,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
LoanCompany(props?: PropsType): ReturnType {
|
|
||||||
const {
|
|
||||||
title = '资金方',
|
|
||||||
key = 'loan_companies_id',
|
|
||||||
dataIndex = ['loan_company', 'name'],
|
|
||||||
required = false,
|
|
||||||
hideInTable = false,
|
|
||||||
...rest
|
|
||||||
} = props ?? {};
|
|
||||||
|
|
||||||
return {
|
|
||||||
title: title,
|
|
||||||
key: key,
|
|
||||||
dataIndex: dataIndex,
|
|
||||||
valueType: 'select',
|
|
||||||
hideInTable: hideInTable,
|
|
||||||
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
|
||||||
fieldProps: {
|
|
||||||
showSearch: false,
|
|
||||||
fieldNames: {
|
|
||||||
label: 'name',
|
|
||||||
value: 'id',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
request: async () => (await Apis.Select.LoanCompanies()).data,
|
|
||||||
...rest,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
Markets(props?: PropsType): ReturnType {
|
|
||||||
const {
|
|
||||||
title = '选择上游',
|
|
||||||
key = 'markets_id',
|
|
||||||
dataIndex = ['market', 'name'],
|
|
||||||
required = false,
|
|
||||||
hideInTable = false,
|
|
||||||
...rest
|
|
||||||
} = props ?? {};
|
|
||||||
|
|
||||||
return {
|
|
||||||
title: title,
|
|
||||||
key: key,
|
|
||||||
dataIndex: dataIndex,
|
|
||||||
valueType: 'select',
|
|
||||||
hideInTable: hideInTable,
|
|
||||||
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
|
||||||
fieldProps: {
|
|
||||||
showSearch: false,
|
|
||||||
fieldNames: {
|
|
||||||
label: 'name',
|
|
||||||
value: 'id',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
request: async () => (await Apis.Select.Markets()).data,
|
|
||||||
...rest,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
Bosses(props?: PropsType): ReturnType {
|
|
||||||
const {
|
|
||||||
title = '老板',
|
|
||||||
key = 'bosses_id',
|
|
||||||
dataIndex = ['boss', 'name'],
|
|
||||||
required = false,
|
|
||||||
hideInTable = false,
|
|
||||||
...rest
|
|
||||||
} = props ?? {};
|
|
||||||
|
|
||||||
return {
|
|
||||||
title: title,
|
|
||||||
key: key,
|
|
||||||
dataIndex: dataIndex,
|
|
||||||
valueType: 'select',
|
|
||||||
hideInTable: hideInTable,
|
|
||||||
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
|
||||||
fieldProps: {
|
|
||||||
showSearch: false,
|
|
||||||
fieldNames: {
|
|
||||||
label: 'name',
|
|
||||||
value: 'id',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
request: async () => (await Apis.Select.Bosses()).data,
|
|
||||||
...rest,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
Factories(props?: PropsType): ReturnType {
|
|
||||||
const {
|
|
||||||
title = '下游厂家',
|
|
||||||
key = 'factories_id',
|
|
||||||
dataIndex = ['factory', 'name'],
|
|
||||||
required = false,
|
|
||||||
hideInTable = false,
|
|
||||||
...rest
|
|
||||||
} = props ?? {};
|
|
||||||
|
|
||||||
return {
|
|
||||||
title: title,
|
|
||||||
key: key,
|
|
||||||
dataIndex: dataIndex,
|
|
||||||
valueType: 'select',
|
|
||||||
hideInTable: hideInTable,
|
|
||||||
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
|
||||||
fieldProps: {
|
|
||||||
showSearch: false,
|
|
||||||
fieldNames: {
|
|
||||||
label: 'name',
|
|
||||||
value: 'id',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
request: async () => (await Apis.Select.Factories()).data,
|
|
||||||
...rest,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
Platforms(props?: PropsType): ReturnType {
|
|
||||||
const {
|
|
||||||
title = '平台',
|
|
||||||
key = 'platforms_id',
|
|
||||||
dataIndex = ['platform', 'name'],
|
|
||||||
required = false,
|
|
||||||
hideInTable = false,
|
|
||||||
...rest
|
|
||||||
} = props ?? {};
|
|
||||||
|
|
||||||
return {
|
|
||||||
title: title,
|
|
||||||
key: key,
|
|
||||||
dataIndex: dataIndex,
|
|
||||||
valueType: 'select',
|
|
||||||
hideInTable: hideInTable,
|
|
||||||
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
|
||||||
fieldProps: {
|
|
||||||
showSearch: false,
|
|
||||||
fieldNames: {
|
|
||||||
label: 'name',
|
|
||||||
value: 'id',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
request: async () => (await Apis.Select.Platforms()).data,
|
|
||||||
...rest,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
Merchants(props?: PropsType): ReturnType {
|
|
||||||
const {
|
|
||||||
title = '商户',
|
|
||||||
key = 'merchants_id',
|
|
||||||
dataIndex = ['merchant', 'name'],
|
|
||||||
required = false,
|
|
||||||
hideInTable = false,
|
|
||||||
...rest
|
|
||||||
} = props ?? {};
|
|
||||||
|
|
||||||
return {
|
|
||||||
title: title,
|
|
||||||
key: key,
|
|
||||||
dataIndex: dataIndex,
|
|
||||||
valueType: 'select',
|
|
||||||
hideInTable: hideInTable,
|
|
||||||
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
|
||||||
fieldProps: {
|
|
||||||
showSearch: false,
|
|
||||||
fieldNames: {
|
|
||||||
label: 'name',
|
|
||||||
value: 'id',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
request: async () => (await Apis.Select.Merchants()).data,
|
|
||||||
...rest,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
};
|
|
||||||
@ -28,7 +28,7 @@ export const SysSelects = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
request: async () =>
|
request: async () =>
|
||||||
(await Apis.SysPermissions.SelectApi()).data?.children,
|
(await Apis.Permission.SysPermissions.SelectApi()).data?.children,
|
||||||
...rest,
|
...rest,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -40,9 +40,9 @@ export const SysSelects = {
|
|||||||
title: '上级菜单',
|
title: '上级菜单',
|
||||||
valueType: 'treeSelect',
|
valueType: 'treeSelect',
|
||||||
request: async () => {
|
request: async () => {
|
||||||
return Apis.SysPermissions.Tree({ guard_name: guard_name }).then(
|
return Apis.Permission.SysPermissions.Tree({
|
||||||
(res) => res.data,
|
guard_name: guard_name,
|
||||||
);
|
}).then((res) => res.data);
|
||||||
},
|
},
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
@ -83,7 +83,7 @@ export const SysSelects = {
|
|||||||
value: 'id',
|
value: 'id',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
request: async () => (await Apis.SysRoles.Select()).data,
|
request: async () => (await Apis.Permission.SysRoles.Select()).data,
|
||||||
...rest,
|
...rest,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@ -35,16 +35,6 @@ export default function Index({ title = '管理员' }) {
|
|||||||
renderText: renderTextHelper.TagList,
|
renderText: renderTextHelper.TagList,
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: 'last_login_ip',
|
|
||||||
dataIndex: 'last_login_ip',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'last_login_at',
|
|
||||||
dataIndex: 'last_login_at',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
MyColumns.UpdatedAt(),
|
MyColumns.UpdatedAt(),
|
||||||
MyColumns.CreatedAt(),
|
MyColumns.CreatedAt(),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user