Commit 182173d4 authored by Sixiang_Zzb's avatar Sixiang_Zzb

首次登陆修改密码

parent 9f85e411
......@@ -55,12 +55,16 @@ const Model: LoginModelType = {
effects: {
*login({ payload }, { call, put }) {
const response = yield call(AccountLogin, payload);
if (response.status === 'resetPwd') {
// if () {
// }
} else if (response.status === 'ok' && response.token != null) {
yield put({
type: 'changeLoginStatus',
payload: response,
});
// Login successfully response.status === 'ok'
if (response.token != null) {
console.log('用户名密码登录成功');
console.log(response);
const userMessage = yield call(AccountCheckLogin, payload); //请求时间网络
......@@ -95,7 +99,6 @@ const Model: LoginModelType = {
}
history.replace(redirect || '/');
} else {
console.error(response);
message.error('Login Error! Username or Password is wrong!', 3);
}
},
......
......@@ -6,7 +6,7 @@ interface Password {
password: string;
}
const Login2 = (props: any) => {
const Login2 = (props: { history: { push: (location: string) => void } }) => {
const { history } = props;
// 修改密码
const onFinish = (values: Password) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment