From 90d9a3b8bbd6bb5faee7de719761bb13ee050164 Mon Sep 17 00:00:00 2001 From: "luk.lu" Date: Tue, 15 Oct 2019 09:54:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20getKycInfo=EF=BC=8C?= =?UTF-8?q?=E5=B0=9A=E6=9C=AA=E6=88=90=E5=8A=9F=E3=80=82=E5=8F=96=E6=B6=88?= =?UTF-8?q?commit=E6=97=B6=E7=9A=84tslint=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 - src/models/user.ts | 7 +++++++ src/pages/identity/index.tsx | 7 ++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index eff5f97..1402022 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,6 @@ }, "lint-staged": { "*.{ts,tsx}": [ - "tslint --fix", "git add" ] }, diff --git a/src/models/user.ts b/src/models/user.ts index 43ce708..8016409 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -60,6 +60,13 @@ const model: Model = { setLocale(lang, false); yield put({ type: 'onUpdateState', payload: { lang } }); }, + + *getKycInfo (_, { get }) { +// const data = await http.post('/user/verify', formData); +// yield get({type: 'user/verifyInfo'}) + console.info('inside getKycInfo') + + }, }, reducers: { diff --git a/src/pages/identity/index.tsx b/src/pages/identity/index.tsx index 1aa1dbb..9698888 100644 --- a/src/pages/identity/index.tsx +++ b/src/pages/identity/index.tsx @@ -3,7 +3,7 @@ * Routes: * - ./src/pages/routes */ -import React, { useState } from 'react'; +import React, { useState, useEffect } from 'react'; import { connect, DispatchProp, routerRedux } from 'dva'; import { formatMessage } from 'umi-plugin-locale'; import { Button, Modal, Input, Select } from 'antd'; @@ -56,6 +56,11 @@ const IdentityPage: React.FC const [realname, setRealname] = useState(); const [idNo, setIdNo] = useState(); + useEffect( () => { + console.info('实名认证中') + dispatch({ type: 'user/getKycInfo'}) + }, []); + const preview = (type) => { const pic1 = picCover.current; const pic2 = picBack.current;