- 处理未 mock 情况需要处理的 api 数据,暂时后不需要提供这些 api

This commit is contained in:
sin
2019-03-04 12:15:44 +08:00
parent 171cf5b996
commit 78945c61a7
6 changed files with 87 additions and 19 deletions

View File

@@ -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,