1. admin-web 接入新的登陆接入

This commit is contained in:
YunaiV
2020-04-26 19:52:14 +08:00
parent eb86ae7cbc
commit 18180b3a01
12 changed files with 45 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
import { routerRedux } from 'dva/router';
import { stringify } from 'qs';
import { fakeAccountLogin, getFakeCaptcha } from '@/services/api';
import { getFakeCaptcha } from '@/services/api';
import { usernameAuthenticate } from '@/services/system';
import { setAuthority } from '@/utils/authority';
import { getPageQuery } from '@/utils/utils';
import { reloadAuthorized } from '@/utils/Authorized';
@@ -15,7 +16,7 @@ export default {
effects: {
*login({ payload }, { call, put }) {
const response = yield call(fakeAccountLogin, payload);
const response = yield call(usernameAuthenticate, payload);
yield put({
type: 'changeLoginStatus',
payload: response,
@@ -23,6 +24,8 @@ export default {
yield put(routerRedux.replace('/'));
debugger;
// Login successfully
if (response.code === 0) {