feat: constant
This commit is contained in:
parent
3bcff30458
commit
47941ad9c0
@ -1,10 +1,9 @@
|
||||
import { defineConfig } from "@umijs/max";
|
||||
|
||||
import { defineConfig } from '@umijs/max';
|
||||
|
||||
export default defineConfig({
|
||||
define: {
|
||||
'process.env': {
|
||||
API_HOST_URL: 'http://localhost:3000'
|
||||
}
|
||||
}
|
||||
})
|
||||
API_HOST_URL: 'http://localhost:4399',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
@ -3,7 +3,7 @@ import { defineConfig } from '@umijs/max';
|
||||
export default defineConfig({
|
||||
define: {
|
||||
'process.env': {
|
||||
API_HOST_URL: 'http://localhost:3000',
|
||||
API_HOST_URL: 'http://localhost:4399',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
@ -89,7 +89,7 @@ const Banner: React.FC<IBanner> = ({ type, dataSource, onChange, onDelFile }) =>
|
||||
</Button>
|
||||
</div>
|
||||
<Modal
|
||||
title="Basic Modal"
|
||||
title="新增数据"
|
||||
open={open}
|
||||
centered
|
||||
width={600}
|
||||
|
@ -20,3 +20,18 @@ export const bannerTypes = [
|
||||
name: '游学研学',
|
||||
},
|
||||
];
|
||||
|
||||
export const bankList = [
|
||||
{
|
||||
name: '财富产品投资',
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: '私人银行服务',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: '个人消费贷款',
|
||||
id: 3,
|
||||
},
|
||||
];
|
||||
|
@ -5,6 +5,7 @@ import React, { useState } from 'react';
|
||||
import { getUserList, updateUser, deleteUser } from '@/services/ant-design-pro/api';
|
||||
import { EditableProTable } from '@ant-design/pro-components';
|
||||
import type { ProColumns } from '@ant-design/pro-components';
|
||||
import { bankList } from '@/constant';
|
||||
|
||||
interface DataSourceType {
|
||||
id: string;
|
||||
@ -60,6 +61,10 @@ const Welcome: React.FC = () => {
|
||||
editable: (text, record, index) => {
|
||||
return index !== 0;
|
||||
},
|
||||
render: (_, record) => {
|
||||
const bank = bankList.find((item) => item.id === record.type);
|
||||
return <>{bank?.name}</>;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
@ -45,6 +45,7 @@ export const errorConfig: RequestConfig = {
|
||||
// 我们的 errorThrower 抛出的错误。
|
||||
if (error.name === 'BizError') {
|
||||
const errorInfo: ResponseStructure | undefined = error.info;
|
||||
|
||||
if (errorInfo) {
|
||||
const { errorMessage, errorCode } = errorInfo;
|
||||
switch (errorInfo.showType) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user