rename 'idcode' to 'idNo'
This commit is contained in:
@@ -176,7 +176,7 @@ export default {
|
||||
'identity.realname': 'Real Name',
|
||||
'identity.nationality': 'Nationality',
|
||||
'identity.idtype': 'ID Type',
|
||||
'identity.idcode': 'ID Code',
|
||||
'identity.idNo': 'ID Number',
|
||||
'identity.idphoto': 'ID Photo',
|
||||
'identity.idtypes': {idcard:'id card', passport:'passport'},
|
||||
'identity.chooseIdtype': 'Type of id cards',
|
||||
|
||||
@@ -176,7 +176,7 @@ export default {
|
||||
'identity.realname': '实名',
|
||||
'identity.nationality': '国籍',
|
||||
'identity.idtype': '证件类型',
|
||||
'identity.idcode': '证件编号',
|
||||
'identity.idNo': '证件编号',
|
||||
'identity.idphoto': '证件照片',
|
||||
'identity.idtypes': {idcard:'身份证', passport:'护照'},
|
||||
'identity.chooseIdtype': '选择证件类型',
|
||||
|
||||
@@ -121,8 +121,14 @@ const IdentityPage: React.FC<DispatchProp & UserModelState & IdentityModelState>
|
||||
/>
|
||||
{user && <div className={styles.content}>
|
||||
<input className={styles.myinput}
|
||||
placeholder={formatMessage({ id: 'identity.idcode' })}
|
||||
name="idcode"
|
||||
placeholder={formatMessage({ id: 'identity.realname' })}
|
||||
name="realname"
|
||||
value={realname}
|
||||
onChange={e => setRealname(e.target.value)}
|
||||
/>
|
||||
<input className={styles.myinput}
|
||||
placeholder={formatMessage({ id: 'identity.idNo' })}
|
||||
name="idNo"
|
||||
value={idNo}
|
||||
onChange={e => setIdNo(e.target.value)}
|
||||
/>
|
||||
@@ -140,12 +146,6 @@ const IdentityPage: React.FC<DispatchProp & UserModelState & IdentityModelState>
|
||||
<input type="file" className={styles.input} ref={picBack} onChange={e => preview(2)}/>
|
||||
</div>
|
||||
</div>
|
||||
<input className={styles.myinput}
|
||||
placeholder={formatMessage({ id: 'identity.realname' })}
|
||||
name="realname"
|
||||
value={realname}
|
||||
onChange={e => setRealname(e.target.value)}
|
||||
/>
|
||||
{/* <AccountItem
|
||||
className="group"
|
||||
title="identity.nationality"
|
||||
|
||||
@@ -21,11 +21,11 @@ const model: Model = {
|
||||
|
||||
effects: {
|
||||
*kyc1submit(_, { put, all, call, select }) {
|
||||
const { realname, idcode } = yield select((state:any) => state.identity)
|
||||
if (!idcode || !realname) return
|
||||
const { realname, idNo } = yield select((state:any) => state.identity)
|
||||
if (!idNo || !realname) return
|
||||
yield put({ type: 'onUpdateState', kyc1Submitting: true })
|
||||
try {
|
||||
yield call(kyc1, {idcode:idcode, realname:realname})
|
||||
yield call(kyc1, {idNo:idNo, realname:realname})
|
||||
|
||||
/* yield all([
|
||||
put({ type: 'onUpdateState', nameInput: '', nameEditable: false }),
|
||||
|
||||
@@ -3,7 +3,7 @@ import http from '@/utils/http';
|
||||
export async function kyc1(kyc1info: object) {
|
||||
// console.info('进入了 service.ts 调用 kyc1......')
|
||||
|
||||
const { ok, msg } = await http.post('/user/kyc1', kyc1info);
|
||||
const { ok, msg } = await http.post('/user/verify', kyc1info);
|
||||
if (ok) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ export interface User {
|
||||
inviteCode: string;
|
||||
inviter: string;
|
||||
realname?: string;
|
||||
idcode?: string;
|
||||
idNo?: string;
|
||||
idtype?: string;
|
||||
nationality?: string;
|
||||
kyc1success?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user