接口调试修改
This commit is contained in:
parent
ca87af0bdc
commit
1cfda3b5b3
|
|
@ -11,7 +11,7 @@ export default {
|
|||
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
|
||||
'/tbg/api/v1': {
|
||||
// 要代理的地址
|
||||
target: 'http://192.168.88.224:9999',
|
||||
target: 'http://192.168.2.11:9999',
|
||||
// 配置了这个可以从 http 代理到 https
|
||||
// 依赖 origin 的功能可能需要这个,比如 cookie
|
||||
changeOrigin: true,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ const AddCoinTypeModal = ({ onOk, onCancel, ...rest }: AddCoinTypeModalPropsType
|
|||
<Form form={form} labelCol={4} wrapperCol={18}>
|
||||
<SchemaField>
|
||||
<SchemaField.String
|
||||
name="bc_name"
|
||||
name="name"
|
||||
title="代币名称"
|
||||
required
|
||||
x-decorator="FormItem"
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ const EditCoinTypeModal = ({
|
|||
<Form form={form} labelCol={4} wrapperCol={18}>
|
||||
<SchemaField>
|
||||
<SchemaField.String
|
||||
name="bc_name"
|
||||
name="name"
|
||||
title="游戏币名称"
|
||||
x-disabled
|
||||
x-decorator="FormItem"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ const CoinTypeList = () => {
|
|||
const columns: ProColumns<any>[] = [
|
||||
{
|
||||
title: '游戏币名称',
|
||||
dataIndex: 'bc_name',
|
||||
dataIndex: 'name',
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ const RecordList = () => {
|
|||
},
|
||||
{
|
||||
title: '游戏币类型',
|
||||
dataIndex: 'bc_type',
|
||||
dataIndex: 'name',
|
||||
width: '10%',
|
||||
hideInSearch: true,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import Modal, { ModalProps } from '@/components/Modal';
|
|||
import { Form, FormItem, Input, Select } from '@formily/antd';
|
||||
import { action } from '@formily/reactive';
|
||||
|
||||
interface AddAddressModalPropsType extends ModalProps {
|
||||
interface AddWalletModalPropsType extends ModalProps {
|
||||
onOk: (val: any) => void;
|
||||
onCancel: () => void;
|
||||
}
|
||||
|
|
@ -36,14 +36,14 @@ const useAsyncDataSource = (
|
|||
const form = createForm({
|
||||
effects: () => {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
useAsyncDataSource('bc_name', async (field) => {
|
||||
useAsyncDataSource('name', async (field) => {
|
||||
const list = await getCoinTypeList({ page: 1, page_size: 10 });
|
||||
const option = [];
|
||||
for (let index = 0; index < list.items.length; index++) {
|
||||
const element = list.items[index];
|
||||
const item = {
|
||||
label: element.bc_name,
|
||||
value: element.bc_name,
|
||||
label: element.name,
|
||||
value: element.name,
|
||||
};
|
||||
option.push(item);
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ const form = createForm({
|
|||
},
|
||||
});
|
||||
|
||||
const AddAddressModal = ({ onOk, onCancel, ...rest }: AddAddressModalPropsType) => {
|
||||
const AddWalletModal = ({ onOk, onCancel, ...rest }: AddWalletModalPropsType) => {
|
||||
const handleOk = () => {
|
||||
const formState = form.getFormState();
|
||||
onOk(formState.values);
|
||||
|
|
@ -67,7 +67,7 @@ const AddAddressModal = ({ onOk, onCancel, ...rest }: AddAddressModalPropsType)
|
|||
<FormProvider form={form}>
|
||||
<SchemaField>
|
||||
<SchemaField.String
|
||||
name="bc_name"
|
||||
name="name"
|
||||
title="游戏币名称"
|
||||
required
|
||||
x-decorator="FormItem"
|
||||
|
|
@ -94,4 +94,4 @@ const AddAddressModal = ({ onOk, onCancel, ...rest }: AddAddressModalPropsType)
|
|||
);
|
||||
};
|
||||
|
||||
export default AddAddressModal;
|
||||
export default AddWalletModal;
|
||||
|
|
@ -7,7 +7,7 @@ import Modal, { ModalProps } from '@/components/Modal';
|
|||
import { Form, FormItem, Input, Select } from '@formily/antd';
|
||||
import { action } from '@formily/reactive';
|
||||
|
||||
interface EditAddressModalPropsType extends ModalProps {
|
||||
interface EditWalletModalPropsType extends ModalProps {
|
||||
editModalData: any;
|
||||
onOk: (val: any) => void;
|
||||
onCancel: () => void;
|
||||
|
|
@ -21,12 +21,7 @@ const SchemaField = createSchemaField({
|
|||
},
|
||||
});
|
||||
|
||||
const EditAddressModal = ({
|
||||
onOk,
|
||||
onCancel,
|
||||
editModalData,
|
||||
...rest
|
||||
}: EditAddressModalPropsType) => {
|
||||
const EditWalletModal = ({ onOk, onCancel, editModalData, ...rest }: EditWalletModalPropsType) => {
|
||||
const useAsyncDataSource = (
|
||||
pattern: FormPathPattern,
|
||||
service: (field: Field) => Promise<{ label: string; value: any }[]>,
|
||||
|
|
@ -43,14 +38,14 @@ const EditAddressModal = ({
|
|||
const form = createForm({
|
||||
effects: () => {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
useAsyncDataSource('bc_name', async (field) => {
|
||||
useAsyncDataSource('name', async (field) => {
|
||||
const list = await getCoinTypeList({ page: 1, page_size: 10 });
|
||||
const option = [];
|
||||
for (let index = 0; index < list.items.length; index++) {
|
||||
const element = list.items[index];
|
||||
const item = {
|
||||
label: element.bc_name,
|
||||
value: element.bc_name,
|
||||
label: element.name,
|
||||
value: element.name,
|
||||
};
|
||||
option.push(item);
|
||||
}
|
||||
|
|
@ -84,7 +79,7 @@ const EditAddressModal = ({
|
|||
x-component="Input"
|
||||
/>
|
||||
<SchemaField.String
|
||||
name="bc_name"
|
||||
name="name"
|
||||
title="游戏币名称"
|
||||
required
|
||||
x-decorator="FormItem"
|
||||
|
|
@ -103,4 +98,4 @@ const EditAddressModal = ({
|
|||
);
|
||||
};
|
||||
|
||||
export default EditAddressModal;
|
||||
export default EditWalletModal;
|
||||
|
|
@ -5,12 +5,12 @@ import {
|
|||
deleteAddress,
|
||||
createAddress,
|
||||
modifyAddress,
|
||||
} from '@/services/recharge/address';
|
||||
} from '@/services/recharge/wallet';
|
||||
|
||||
import { fetchTableData } from '@/utils/table';
|
||||
import DeleteButton from '@/components/Table/DeleteButton';
|
||||
import AddAddressModal from '../Components/AddAddressModal';
|
||||
import EditAddressModal from '../Components/EditAddressModal';
|
||||
import AddWalletModal from '../Components/AddWalletModal';
|
||||
import EditWalletModal from '../Components/EditWalletModal';
|
||||
|
||||
const CollectionAddressList = () => {
|
||||
const tableRef = useRef<ActionType>();
|
||||
|
|
@ -39,7 +39,7 @@ const CollectionAddressList = () => {
|
|||
},
|
||||
{
|
||||
title: '收款游戏币名称',
|
||||
dataIndex: 'bc_name',
|
||||
dataIndex: 'name',
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
},
|
||||
|
|
@ -84,7 +84,7 @@ const CollectionAddressList = () => {
|
|||
return res;
|
||||
}}
|
||||
/>
|
||||
<AddAddressModal
|
||||
<AddWalletModal
|
||||
visible={isModalVisible}
|
||||
onCancel={function () {
|
||||
setIsModalVisible(false);
|
||||
|
|
@ -95,7 +95,7 @@ const CollectionAddressList = () => {
|
|||
tableRef.current?.reload();
|
||||
}}
|
||||
/>
|
||||
<EditAddressModal
|
||||
<EditWalletModal
|
||||
visible={isEditModalVisible}
|
||||
editModalData={modalData}
|
||||
onCancel={function () {
|
||||
|
|
@ -12,8 +12,6 @@ const WithdrawList = () => {
|
|||
await solveWithdraw({ uuid: uuid });
|
||||
};
|
||||
|
||||
const handlePass = async (row) => {};
|
||||
|
||||
const tableRef = useRef<ActionType>();
|
||||
const columns: ProColumns<any>[] = [
|
||||
{
|
||||
|
|
@ -56,20 +54,12 @@ const WithdrawList = () => {
|
|||
render: (_, row) => [
|
||||
<ConfirmButton
|
||||
key="confirm"
|
||||
title="确认通知已提现?"
|
||||
buttonName="通知"
|
||||
title="确认通过提现?"
|
||||
buttonName="通过"
|
||||
onConfirm={() => {
|
||||
handleConfirm(row.uuid);
|
||||
}}
|
||||
/>,
|
||||
<a
|
||||
key="pass"
|
||||
onClick={() => {
|
||||
handlePass(row);
|
||||
}}
|
||||
>
|
||||
通过
|
||||
</a>,
|
||||
],
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ const PermissionsList = () => {
|
|||
},
|
||||
{
|
||||
title: '收款游戏币类型',
|
||||
dataIndex: 'bc_type',
|
||||
dataIndex: 'type',
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import { Button, Input } from 'antd';
|
||||
import { Button, Input, Popconfirm } from 'antd';
|
||||
import styles from './index.less';
|
||||
import { createSecretKey, getSecretKey } from '@/services/system/secretKey';
|
||||
|
||||
|
|
@ -24,9 +24,12 @@ const SecretKey: React.FC = () => {
|
|||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<Button className={styles.button} type="primary" onClick={create}>
|
||||
创建密钥
|
||||
</Button>
|
||||
<Popconfirm title="确定创建密钥?" onConfirm={create} okText="确定" cancelText="取消">
|
||||
<Button className={styles.button} type="primary">
|
||||
创建密钥
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
|
||||
<TextArea className={styles.textarea} rows={16} value={secretKey} />
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -17,12 +17,6 @@ const UserManageList = () => {
|
|||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '注册时间',
|
||||
dataIndex: 'first_time',
|
||||
hideInSearch: true,
|
||||
ellipsis: true,
|
||||
},
|
||||
];
|
||||
return (
|
||||
<Table
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ export default [
|
|||
},
|
||||
{
|
||||
name: '收款地址',
|
||||
path: RoutePath.ADDRESS.LIST,
|
||||
component: './Recharge/Address/List',
|
||||
path: RoutePath.WALLET.LIST,
|
||||
component: './Recharge/Wallet/List',
|
||||
},
|
||||
{
|
||||
name: '代币种类',
|
||||
|
|
@ -41,6 +41,22 @@ export default [
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: '用户账号',
|
||||
path: RoutePath.USER,
|
||||
routes: [
|
||||
{
|
||||
path: RoutePath.USER,
|
||||
redirect: RoutePath.USER_LIST.LIST,
|
||||
hideInMenu: true,
|
||||
},
|
||||
{
|
||||
name: '用户账号管理',
|
||||
path: RoutePath.USER_LIST.LIST,
|
||||
component: './User/List',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: '系统设置',
|
||||
path: RoutePath.SYSTEM,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
const SETTING = '/setting';
|
||||
const RECHARGE = '/recharge';
|
||||
const USER = '/user';
|
||||
const SYSTEM = '/system';
|
||||
const RoutePath = {
|
||||
LOGIN: '/login',
|
||||
|
|
@ -7,8 +8,8 @@ const RoutePath = {
|
|||
RECORD: {
|
||||
LIST: `${RECHARGE}/record`,
|
||||
},
|
||||
ADDRESS: {
|
||||
LIST: `${RECHARGE}/address`,
|
||||
WALLET: {
|
||||
LIST: `${RECHARGE}/wallet`,
|
||||
},
|
||||
COIN_TYPE: {
|
||||
LIST: `${RECHARGE}/coin_type`,
|
||||
|
|
@ -16,6 +17,10 @@ const RoutePath = {
|
|||
WITHDRAW: {
|
||||
LIST: `${RECHARGE}/withdraw`,
|
||||
},
|
||||
USER: USER,
|
||||
USER_LIST: {
|
||||
LIST: `${USER}/user`,
|
||||
},
|
||||
SYSTEM: SYSTEM,
|
||||
ACCOUNT: {
|
||||
LIST: `${SYSTEM}/account`,
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import request from '@/utils/request';
|
|||
* @param {object} params
|
||||
* type 代币种类
|
||||
* @returns {array} data
|
||||
* bc_name 游戏币名称
|
||||
* bc_type 游戏币类型
|
||||
* name 游戏币名称
|
||||
* type 游戏币类型
|
||||
* usdt_price 游戏货币与usdt的比例
|
||||
* eth_price 游戏货币与eth的比例
|
||||
*/
|
||||
|
|
@ -21,7 +21,7 @@ export const getCoinTypeList = (params) => {
|
|||
/**
|
||||
* 获取代币种类列表
|
||||
* @param {object} params
|
||||
* bc_name 游戏币名称
|
||||
* name 游戏币名称
|
||||
* usdt_price 游戏货币与usdt的比例
|
||||
* eth_price 游戏货币与eth的比例
|
||||
* num 代币数量
|
||||
|
|
@ -38,8 +38,8 @@ export const addCoinType = (data) => {
|
|||
/**
|
||||
* 获取代币种类列表
|
||||
* @param {object} params
|
||||
* bc_name 游戏币名称
|
||||
* bc_type 游戏币类型
|
||||
* name 游戏币名称
|
||||
* type 游戏币类型
|
||||
* usdt_price 游戏货币与usdt的比例
|
||||
* eth_price 游戏货币与eth的比例
|
||||
* @returns {object} data
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import request from '@/utils/request';
|
|||
* start_time 开始时间
|
||||
* end_time 结束时间
|
||||
* @returns {array} data
|
||||
* bc_type 游戏币类型
|
||||
* type 游戏币类型
|
||||
* address 地址
|
||||
*/
|
||||
export const getRecordList = (data) => {
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ import request from '@/utils/request';
|
|||
* 获取开发商收款地址列表
|
||||
* @param {object} params
|
||||
* @returns {array} data
|
||||
* bc_type 游戏币类型
|
||||
* type 游戏币类型
|
||||
* address 地址
|
||||
*/
|
||||
export const getAddressList = (params) => {
|
||||
return request.request({
|
||||
url: '/address/get',
|
||||
url: '/wallet/get',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
|
|
@ -18,13 +18,13 @@ export const getAddressList = (params) => {
|
|||
/**
|
||||
* 创建开发商收款地址
|
||||
* @param {Object} data
|
||||
* bc_type 游戏币类型
|
||||
* type 游戏币类型
|
||||
* address 地址(不传则后台生成)
|
||||
* @returns
|
||||
*/
|
||||
export const createAddress = (data) => {
|
||||
return request.request({
|
||||
url: '/address/create',
|
||||
url: '/wallet/create',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
|
|
@ -38,7 +38,7 @@ export const createAddress = (data) => {
|
|||
*/
|
||||
export const deleteAddress = (data) => {
|
||||
return request.request({
|
||||
url: '/address/delete',
|
||||
url: '/wallet/delete',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
|
|
@ -48,13 +48,13 @@ export const deleteAddress = (data) => {
|
|||
* 修改开发商收款地址
|
||||
* @param {Object} data
|
||||
* address 旧地址
|
||||
* bc_type 游戏币类型
|
||||
* type 游戏币类型
|
||||
* new_address 新地址
|
||||
* @returns
|
||||
*/
|
||||
export const modifyAddress = (data) => {
|
||||
return request.request({
|
||||
url: '/address/update',
|
||||
url: '/wallet/update',
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
|
|
@ -2,15 +2,15 @@ import request from '@/utils/request';
|
|||
|
||||
/**
|
||||
* 获取后台角色列表
|
||||
* @param {object} params
|
||||
* @param {object} data
|
||||
* @returns {array} data
|
||||
* role_name 角色名称
|
||||
* role 角色类型
|
||||
*/
|
||||
export const getUserList = (params) => {
|
||||
export const getUserList = (data) => {
|
||||
return request.request({
|
||||
url: '/account/get',
|
||||
method: 'get',
|
||||
params,
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue