添加 getKycInfo,尚未成功。取消commit时的tslint要求

This commit is contained in:
luk.lu
2019-10-15 09:54:52 +08:00
parent 630f402e31
commit 90d9a3b8bb
3 changed files with 13 additions and 2 deletions

View File

@@ -66,7 +66,6 @@
}, },
"lint-staged": { "lint-staged": {
"*.{ts,tsx}": [ "*.{ts,tsx}": [
"tslint --fix",
"git add" "git add"
] ]
}, },

View File

@@ -60,6 +60,13 @@ const model: Model = {
setLocale(lang, false); setLocale(lang, false);
yield put({ type: 'onUpdateState', payload: { lang } }); 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: { reducers: {

View File

@@ -3,7 +3,7 @@
* Routes: * Routes:
* - ./src/pages/routes * - ./src/pages/routes
*/ */
import React, { useState } from 'react'; import React, { useState, useEffect } from 'react';
import { connect, DispatchProp, routerRedux } from 'dva'; import { connect, DispatchProp, routerRedux } from 'dva';
import { formatMessage } from 'umi-plugin-locale'; import { formatMessage } from 'umi-plugin-locale';
import { Button, Modal, Input, Select } from 'antd'; import { Button, Modal, Input, Select } from 'antd';
@@ -56,6 +56,11 @@ const IdentityPage: React.FC<DispatchProp & UserModelState & IdentityModelState>
const [realname, setRealname] = useState(); const [realname, setRealname] = useState();
const [idNo, setIdNo] = useState(); const [idNo, setIdNo] = useState();
useEffect( () => {
console.info('实名认证中')
dispatch({ type: 'user/getKycInfo'})
}, []);
const preview = (type) => { const preview = (type) => {
const pic1 = picCover.current; const pic1 = picCover.current;
const pic2 = picBack.current; const pic2 = picBack.current;