初始化 antd-pro

This commit is contained in:
sin
2019-02-27 11:06:55 +08:00
parent 9f4fdb7f6e
commit b2068ae44b
458 changed files with 28090 additions and 2 deletions

View File

@@ -0,0 +1,28 @@
import { queryProjectNotice } from '@/services/api';
export default {
namespace: 'project',
state: {
notice: [],
},
effects: {
*fetchNotice(_, { call, put }) {
const response = yield call(queryProjectNotice);
yield put({
type: 'saveNotice',
payload: Array.isArray(response) ? response : [],
});
},
},
reducers: {
saveNotice(state, action) {
return {
...state,
notice: action.payload,
};
},
},
};