rename 'idcode' to 'idNo'

This commit is contained in:
Luk Lu
2019-10-13 07:44:45 +08:00
parent 0203a754ae
commit 657529838f
6 changed files with 15 additions and 15 deletions

View File

@@ -176,7 +176,7 @@ export default {
'identity.realname': 'Real Name', 'identity.realname': 'Real Name',
'identity.nationality': 'Nationality', 'identity.nationality': 'Nationality',
'identity.idtype': 'ID Type', 'identity.idtype': 'ID Type',
'identity.idcode': 'ID Code', 'identity.idNo': 'ID Number',
'identity.idphoto': 'ID Photo', 'identity.idphoto': 'ID Photo',
'identity.idtypes': {idcard:'id card', passport:'passport'}, 'identity.idtypes': {idcard:'id card', passport:'passport'},
'identity.chooseIdtype': 'Type of id cards', 'identity.chooseIdtype': 'Type of id cards',

View File

@@ -176,7 +176,7 @@ export default {
'identity.realname': '实名', 'identity.realname': '实名',
'identity.nationality': '国籍', 'identity.nationality': '国籍',
'identity.idtype': '证件类型', 'identity.idtype': '证件类型',
'identity.idcode': '证件编号', 'identity.idNo': '证件编号',
'identity.idphoto': '证件照片', 'identity.idphoto': '证件照片',
'identity.idtypes': {idcard:'身份证', passport:'护照'}, 'identity.idtypes': {idcard:'身份证', passport:'护照'},
'identity.chooseIdtype': '选择证件类型', 'identity.chooseIdtype': '选择证件类型',

View File

@@ -121,8 +121,14 @@ const IdentityPage: React.FC<DispatchProp & UserModelState & IdentityModelState>
/> />
{user && <div className={styles.content}> {user && <div className={styles.content}>
<input className={styles.myinput} <input className={styles.myinput}
placeholder={formatMessage({ id: 'identity.idcode' })} placeholder={formatMessage({ id: 'identity.realname' })}
name="idcode" name="realname"
value={realname}
onChange={e => setRealname(e.target.value)}
/>
<input className={styles.myinput}
placeholder={formatMessage({ id: 'identity.idNo' })}
name="idNo"
value={idNo} value={idNo}
onChange={e => setIdNo(e.target.value)} 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)}/> <input type="file" className={styles.input} ref={picBack} onChange={e => preview(2)}/>
</div> </div>
</div> </div>
<input className={styles.myinput}
placeholder={formatMessage({ id: 'identity.realname' })}
name="realname"
value={realname}
onChange={e => setRealname(e.target.value)}
/>
{/* <AccountItem {/* <AccountItem
className="group" className="group"
title="identity.nationality" title="identity.nationality"

View File

@@ -21,11 +21,11 @@ const model: Model = {
effects: { effects: {
*kyc1submit(_, { put, all, call, select }) { *kyc1submit(_, { put, all, call, select }) {
const { realname, idcode } = yield select((state:any) => state.identity) const { realname, idNo } = yield select((state:any) => state.identity)
if (!idcode || !realname) return if (!idNo || !realname) return
yield put({ type: 'onUpdateState', kyc1Submitting: true }) yield put({ type: 'onUpdateState', kyc1Submitting: true })
try { try {
yield call(kyc1, {idcode:idcode, realname:realname}) yield call(kyc1, {idNo:idNo, realname:realname})
/* yield all([ /* yield all([
put({ type: 'onUpdateState', nameInput: '', nameEditable: false }), put({ type: 'onUpdateState', nameInput: '', nameEditable: false }),

View File

@@ -3,7 +3,7 @@ import http from '@/utils/http';
export async function kyc1(kyc1info: object) { export async function kyc1(kyc1info: object) {
// console.info('进入了 service.ts 调用 kyc1......') // 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) { if (ok) {
return true; return true;
} }

View File

@@ -14,7 +14,7 @@ export interface User {
inviteCode: string; inviteCode: string;
inviter: string; inviter: string;
realname?: string; realname?: string;
idcode?: string; idNo?: string;
idtype?: string; idtype?: string;
nationality?: string; nationality?: string;
kyc1success?: boolean; kyc1success?: boolean;