| 12345678910111213141516171819202122232425262728 |
- 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,
- };
- },
- },
- };
|