-
+ 登录
+
+
+ {/* }
title={defaultSettings.title as string}
initialValues={{
@@ -82,7 +96,7 @@ const Login: React.FC = () => {
},
]}
/>
-
+ */}
);
diff --git a/src/routes/index.ts b/src/routes/index.ts
index 986575d..4581854 100644
--- a/src/routes/index.ts
+++ b/src/routes/index.ts
@@ -10,6 +10,44 @@ export default [
layout: false,
component: './Login',
},
+ {
+ name: 'ALL',
+ path: RoutePath.ALL,
+ routes: [
+ {
+ path: RoutePath.ALL,
+ redirect: RoutePath.ALL_ADDRESS.LIST,
+ hideInMenu: true,
+ },
+ {
+ name: '地址管理',
+ path: RoutePath.ALL_ADDRESS.LIST,
+ component: './All/Address/List',
+ },
+ {
+ name: '地址详情',
+ path: RoutePath.ALL_ADDRESS.EDIT,
+ hideInMenu: true,
+ component: './All/Address/Edit',
+ },
+ {
+ name: '充值记录',
+ path: RoutePath.ALL_RECORD.LIST,
+ component: './All/Record/List',
+ },
+ {
+ name: '币种管理',
+ path: RoutePath.ALL_CURRENCY.LIST,
+ component: './Work/List',
+ },
+ {
+ name: '币种详情',
+ path: RoutePath.ALL_CURRENCY.EDIT,
+ hideInMenu: true,
+ component: './Work/Edit',
+ },
+ ],
+ },
{
name: 'ETH',
path: RoutePath.ETH,
diff --git a/src/routes/routePath.ts b/src/routes/routePath.ts
index 1594520..a82c4b9 100644
--- a/src/routes/routePath.ts
+++ b/src/routes/routePath.ts
@@ -1,7 +1,20 @@
const SETTING = '/setting';
const ETH = '/eth';
+const ALL = '/all';
const RoutePath = {
LOGIN: '/login',
+ ALL: ALL,
+ ALL_ADDRESS: {
+ LIST: `${ALL}/address`,
+ EDIT: `${ALL}/address/edit`,
+ },
+ ALL_RECORD: {
+ LIST: `${ALL}/record`,
+ },
+ ALL_CURRENCY: {
+ LIST: `${ALL}/currency`,
+ EDIT: `${ALL}/currency/edit`,
+ },
ETH: ETH,
ETH_ADDRESS: {
LIST: `${ETH}/address`,
diff --git a/src/utils/web3.ts b/src/utils/web3.ts
index b64adcb..d5f47a7 100644
--- a/src/utils/web3.ts
+++ b/src/utils/web3.ts
@@ -1,6 +1,7 @@
import Web3 from 'web3';
import detectEthereumProvider from '@metamask/detect-provider';
import { getData } from '@/services/login';
+import { message } from 'antd';
let provider: any;
@@ -28,14 +29,14 @@ export async function initWeb3() {
} catch (reason) {
switch (reason) {
case 'Already processing eth_requestAccounts. Please wait.': // 已有请求存在
- console.log('请打开MetaMask完成授权');
+ message.warning('请打开MetaMask完成授权');
break;
case 'User rejected provider access': //如果用户拒绝了登录请求
- console.log('请同意登录请求');
+ message.warning('请同意登录请求');
break;
default:
// 本不该执行到这里,但是真到这里了,说明发生了意外
- console.log('登录出错!err:' + reason);
+ message.warning('登录出错!err:' + reason);
break;
}
}