|
@ -2,7 +2,7 @@ import React, { useEffect, useRef, useState } from "react"; |
|
|
import api from "@/api"; |
|
|
import api from "@/api"; |
|
|
import MyTable from "@/components/MyTable"; |
|
|
import MyTable from "@/components/MyTable"; |
|
|
import { DeleteFilled, EditOutlined, RightCircleFilled, SolutionOutlined, StopTwoTone } from "@ant-design/icons"; |
|
|
import { DeleteFilled, EditOutlined, RightCircleFilled, SolutionOutlined, StopTwoTone } from "@ant-design/icons"; |
|
|
import { Button, Form, Input, Modal, Popconfirm, Radio, Select, Switch, notification } from "antd"; |
|
|
|
|
|
|
|
|
import { Button, Form, Input, Modal, Popconfirm, Radio, Select, Switch, message, notification } from "antd"; |
|
|
import { getBaseUrl, getOriginUrl } from "@/utils/axios"; |
|
|
import { getBaseUrl, getOriginUrl } from "@/utils/axios"; |
|
|
|
|
|
|
|
|
const ProxyList = () => { |
|
|
const ProxyList = () => { |
|
@ -71,7 +71,6 @@ const ProxyList = () => { |
|
|
items: [ |
|
|
items: [ |
|
|
{ label: "当前余额", component: <Input value={currentAccount.current.balance || ''} disabled /> }, |
|
|
{ label: "当前余额", component: <Input value={currentAccount.current.balance || ''} disabled /> }, |
|
|
{ label: "加减金额", name: "balance", rules: [{ required: true, message: '请输入加减金额' }] }, |
|
|
{ label: "加减金额", name: "balance", rules: [{ required: true, message: '请输入加减金额' }] }, |
|
|
{ label: "邮箱通知", name: "email_flag", initialValue: true, valuePropName: "checked", component: <Switch /> } |
|
|
|
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
assets: { |
|
|
assets: { |
|
@ -91,14 +90,19 @@ const ProxyList = () => { |
|
|
onFinish: (values) => onFinish(values, api.set_loginPwd, '重置成功'), |
|
|
onFinish: (values) => onFinish(values, api.set_loginPwd, '重置成功'), |
|
|
items: [ |
|
|
items: [ |
|
|
{ label: "登录密码", name: "password", rules: [{ required: true, message: '请输入要修改的登录密码' }] }, |
|
|
{ label: "登录密码", name: "password", rules: [{ required: true, message: '请输入要修改的登录密码' }] }, |
|
|
{ label: "邮箱通知", name: "email_flag", initialValue: true, valuePropName: "checked", component: <Switch /> } |
|
|
|
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
txPwd: { |
|
|
txPwd: { |
|
|
onFinish: (values) => onFinish(values, api.set_txPwd, '重置成功'), |
|
|
onFinish: (values) => onFinish(values, api.set_txPwd, '重置成功'), |
|
|
items: [ |
|
|
items: [ |
|
|
{ label: "交易密码", name: "account_password", rules: [{ required: true, message: '请输入要修改的交易密码' }] }, |
|
|
{ label: "交易密码", name: "account_password", rules: [{ required: true, message: '请输入要修改的交易密码' }] }, |
|
|
{ label: "邮箱通知", name: "email_flag", initialValue: true, valuePropName: "checked", component: <Switch /> } |
|
|
|
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
email: { |
|
|
|
|
|
onFinish: (values) => onFinish(values, api.change_emailAndName, '修改成功'), |
|
|
|
|
|
items: [ |
|
|
|
|
|
{ label: "名称", name: "name", rules: [{ required: true, message: '请输入名称' }], initialValue: currentAccount.current.name || '' }, |
|
|
|
|
|
{ label: "邮箱", name: "email", rules: [{ required: true, message: '请输入邮箱', }, { type: 'email', message: '邮箱格式错误' }], initialValue: currentAccount.current.email || '' }, |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
@ -246,6 +250,7 @@ const ProxyList = () => { |
|
|
<Radio.Button value="lv">设置级别</Radio.Button> |
|
|
<Radio.Button value="lv">设置级别</Radio.Button> |
|
|
<Radio.Button value="pwd">重置登录密码</Radio.Button> |
|
|
<Radio.Button value="pwd">重置登录密码</Radio.Button> |
|
|
<Radio.Button value="txPwd">重置交易密码</Radio.Button> |
|
|
<Radio.Button value="txPwd">重置交易密码</Radio.Button> |
|
|
|
|
|
<Radio.Button value="email">修改名称和邮箱</Radio.Button> |
|
|
</Radio.Group> |
|
|
</Radio.Group> |
|
|
<div style={{ marginTop: 20 }}> |
|
|
<div style={{ marginTop: 20 }}> |
|
|
{renderForm(path)} |
|
|
{renderForm(path)} |
|
|