正在显示
7 个修改的文件
包含
7 行增加
和
25 行删除
@@ -3,6 +3,6 @@ import request from 'umi-request'; | @@ -3,6 +3,6 @@ import request from 'umi-request'; | ||
3 | export async function fakeSubmitForm(params) { | 3 | export async function fakeSubmitForm(params) { |
4 | return request('/api/BLOCK_NAME/forms', { | 4 | return request('/api/BLOCK_NAME/forms', { |
5 | method: 'POST', | 5 | method: 'POST', |
6 | - body: params, | 6 | + data: params, |
7 | }); | 7 | }); |
8 | } | 8 | } |
@@ -3,6 +3,6 @@ import request from 'umi-request'; | @@ -3,6 +3,6 @@ import request from 'umi-request'; | ||
3 | export async function fakeSubmitForm(params) { | 3 | export async function fakeSubmitForm(params) { |
4 | return request('/api/BLOCK_NAME/forms', { | 4 | return request('/api/BLOCK_NAME/forms', { |
5 | method: 'POST', | 5 | method: 'POST', |
6 | - body: params, | 6 | + data: params, |
7 | }); | 7 | }); |
8 | } | 8 | } |
@@ -3,6 +3,6 @@ import request from 'umi-request'; | @@ -3,6 +3,6 @@ import request from 'umi-request'; | ||
3 | export async function fakeSubmitForm(params) { | 3 | export async function fakeSubmitForm(params) { |
4 | return request('/api/BLOCK_NAME/forms', { | 4 | return request('/api/BLOCK_NAME/forms', { |
5 | method: 'POST', | 5 | method: 'POST', |
6 | - body: params, | 6 | + data: params, |
7 | }); | 7 | }); |
8 | } | 8 | } |
1 | import { routerRedux } from 'dva/router'; | 1 | import { routerRedux } from 'dva/router'; |
2 | -import { stringify } from 'query-string'; | ||
3 | import { getPageQuery } from './utils/utils'; | 2 | import { getPageQuery } from './utils/utils'; |
4 | import { setAuthority } from './utils/authority'; | 3 | import { setAuthority } from './utils/authority'; |
5 | import { reloadAuthorized } from './utils/Authorized'; | 4 | import { reloadAuthorized } from './utils/Authorized'; |
@@ -44,25 +43,6 @@ export default { | @@ -44,25 +43,6 @@ export default { | ||
44 | *getCaptcha({ payload }, { call }) { | 43 | *getCaptcha({ payload }, { call }) { |
45 | yield call(getFakeCaptcha, payload); | 44 | yield call(getFakeCaptcha, payload); |
46 | }, | 45 | }, |
47 | - | ||
48 | - *logout(_, { put }) { | ||
49 | - yield put({ | ||
50 | - type: 'changeLoginStatus', | ||
51 | - payload: { | ||
52 | - status: false, | ||
53 | - currentAuthority: 'guest', | ||
54 | - }, | ||
55 | - }); | ||
56 | - reloadAuthorized(); | ||
57 | - yield put( | ||
58 | - routerRedux.push({ | ||
59 | - pathname: '/user/login', | ||
60 | - search: stringify({ | ||
61 | - redirect: window.location.href, | ||
62 | - }), | ||
63 | - }) | ||
64 | - ); | ||
65 | - }, | ||
66 | }, | 46 | }, |
67 | 47 | ||
68 | reducers: { | 48 | reducers: { |
@@ -3,7 +3,7 @@ import request from 'umi-request'; | @@ -3,7 +3,7 @@ import request from 'umi-request'; | ||
3 | export async function fakeAccountLogin(params) { | 3 | export async function fakeAccountLogin(params) { |
4 | return request('/api/BLOCK_NAME/account', { | 4 | return request('/api/BLOCK_NAME/account', { |
5 | method: 'POST', | 5 | method: 'POST', |
6 | - body: params, | 6 | + data: params, |
7 | }); | 7 | }); |
8 | } | 8 | } |
9 | 9 |
@@ -3,6 +3,6 @@ import request from 'umi-request'; | @@ -3,6 +3,6 @@ import request from 'umi-request'; | ||
3 | export async function fakeRegister(params) { | 3 | export async function fakeRegister(params) { |
4 | return request('/api/BLOCK_NAME/register', { | 4 | return request('/api/BLOCK_NAME/register', { |
5 | method: 'POST', | 5 | method: 'POST', |
6 | - body: params, | 6 | + data: params, |
7 | }); | 7 | }); |
8 | } | 8 | } |
请
注册
或
登录
后发表评论