model.js
445 Bytes
import { queryBasicProfile } from './service';
export default {
namespace: 'BLOCK_NAME',
state: {
basicGoods: [],
},
effects: {
*fetchBasic(_, { call, put }) {
const response = yield call(queryBasicProfile);
yield put({
type: 'show',
payload: response,
});
},
},
reducers: {
show(state, { payload }) {
return {
...state,
...payload,
};
},
},
};