- 处理未 mock 情况需要处理的 api 数据,暂时后不需要提供这些 api
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { query as queryUsers, queryCurrent } from '@/services/user';
|
||||
import { query as queryUsers } from '@/services/user';
|
||||
import currentUserData from '../mock-data/currentUserData';
|
||||
|
||||
export default {
|
||||
namespace: 'user',
|
||||
@@ -16,8 +17,9 @@ export default {
|
||||
payload: response,
|
||||
});
|
||||
},
|
||||
*fetchCurrent(_, { call, put }) {
|
||||
const response = yield call(queryCurrent);
|
||||
*fetchCurrent(_, { put }) {
|
||||
// const response = yield call(queryCurrent);
|
||||
const response = currentUserData;
|
||||
yield put({
|
||||
type: 'saveCurrentUser',
|
||||
payload: response,
|
||||
|
||||
Reference in New Issue
Block a user