bug fix
This commit is contained in:
@@ -8,6 +8,7 @@ import { formatMessage } from 'umi-plugin-locale';
|
||||
import { validPwd, validPhone, validPhoneInput } from '@/utils/validate';
|
||||
import { changePhone, sendCode } from './service';
|
||||
import { dispatch } from '@/utils/utils';
|
||||
import { encodePhone } from '@/utils/transform';
|
||||
|
||||
export interface ChphoneModelState {
|
||||
pageState: PageState;
|
||||
@@ -75,8 +76,8 @@ const model: Model = {
|
||||
if (!code) return message.warn(formatMessage({ id: 'check.msgCode' }));
|
||||
yield put({ type: 'onUpdateState', submitting: true });
|
||||
try {
|
||||
yield call(changePhone, phone, code);
|
||||
yield put({ type: 'user/updateUser', payload: { phone } });
|
||||
yield call(changePhone, areacode, phone, code);
|
||||
yield put({ type: 'user/updateUser', payload: { phone: encodePhone(areacode, phone) } });
|
||||
Modal.success({
|
||||
okText: formatMessage({ id: 'common.iknow' }),
|
||||
title: formatMessage({ id: 'common.prompt' }),
|
||||
|
||||
Reference in New Issue
Block a user