页面
this.props.dispatch({
type: 'achievement/getScoreHistoryByXh',
payload:{xh:getCurrentUser().username}
})
model
* avgScoreHistoryByXh({ payload }, { call, put }) {
const response = yield call(avgScoreHistoryByXh,payload);
if(response && response.code === 0){
yield put({
type:'avgScoreHistoryByXhReducer',
payload:response,
})
}
},
service
export async function getScoreHistoryByXh(params) {
return request('/api/student/achievement/getScoreHistoryByXh', {
method: 'POST',
data: params,
});
}