Commit 22cb4a25 authored by GuanHua's avatar GuanHua

fix: 自营商城装修问题

parent f7c1ed46
......@@ -143,8 +143,12 @@ const MixDrawer: React.FC<MixDrawerProps> = (props: MixDrawerProps) => {
_fetch && _fetch(_params).then((res) => {
message.destroy()
if (res.code === 1000) {
setDataSource(res.data?.data || []);
setTotalCount(res.data?.totalCount ?? res.data.length);
if (Array.isArray(res.data)) {
setDataSource(res.data || []);
setTotalCount(res.data.length);
} else {
setDataSource(res.data?.data || []);
}
} else {
setDataSource([])
setTotalCount(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment