const getWorkBenchNum = useRequest(WorkBench.getWorkBenchNum, {
manual: true,
loadingDelay: 200,
onSuccess({data}) {
console.log(123);
if (data.code === 200) {
console.log(123);
dispatch({ type: homepageType.GET_SIDER_COUNT, json: { count: data.data } })
console.log(123);
} else {
console.log(123);
message.destroy();
message.error(data.msg)
}
},
onError(err) {
console.log(123);
message.destroy();
message.error(err.message)
}
})
应该是数据格式问题,程序走了error