From 4e3ecd36b6a3b3337f65643bb3c28e1f42c18f94 Mon Sep 17 00:00:00 2001 From: saplf Date: Sun, 29 Sep 2019 09:36:43 +0800 Subject: [PATCH] Small fix --- src/pages/home/fund/index.tsx | 7 ++----- src/pages/home/fund/style.less | 2 +- src/utils/validate.ts | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/pages/home/fund/index.tsx b/src/pages/home/fund/index.tsx index e21c9eb..69f5ec1 100644 --- a/src/pages/home/fund/index.tsx +++ b/src/pages/home/fund/index.tsx @@ -44,11 +44,8 @@ const FundPage: React.FC = ({
{formatMessage({ id: 'home.fund.total' })} - - {info ? (info.vic || 0) : 0} VIC(可提取) - - - {info ? (info.usdt || 0) : 0} VIC(总量) + + {info ? (info.usdt || 0) : 0} VIC
diff --git a/src/pages/home/fund/style.less b/src/pages/home/fund/style.less index 1219876..b209411 100644 --- a/src/pages/home/fund/style.less +++ b/src/pages/home/fund/style.less @@ -46,7 +46,7 @@ margin: 10px 15% 24px; align-self: stretch; display: flex; - justify-content: space-between; + justify-content: center; } .content .large { diff --git a/src/utils/validate.ts b/src/utils/validate.ts index 861f4bd..019a38f 100644 --- a/src/utils/validate.ts +++ b/src/utils/validate.ts @@ -4,7 +4,7 @@ * @param input 输入 */ function validPhone(input: string | number): boolean { - return /^1\d{10}$/.test(`${input || ''}`); + return /^\d+$/.test(`${input || ''}`); } /** @@ -12,7 +12,7 @@ function validPhone(input: string | number): boolean { * @param input 输入 */ function validPhoneInput(input: string | number): boolean { - return /^(?:1\d*)?$/.test(`${input || ''}`); + return /^\d*$/.test(`${input || ''}`); } /**