Commit 0ff0fd32 authored by 武广's avatar 武广

fix: 兼容代码

parent 871fa043
......@@ -42,7 +42,7 @@ const StockModal = options => {
skuId: options.skuIds[0],
shopId: options.shopId,
});
if (res && res.code === '0000' && res.businessCode === '0000') {
if (res && res.code === '0000' && res.businessCode === '0000' && res.data) {
const info = res.data;
form.setFieldsValue({
autoStockStep: info.autoStockStep,
......
......@@ -60,8 +60,8 @@ const Takeaway = options => {
const res = await apiTakeawayGoods(params);
setLoading(false);
if (res && res.data) {
setTableData(res.data.records);
setTotal(res.data.total);
setTableData(res.data.records || []);
setTotal(res.data.total || 0);
}
};
const onPageChange = (page, size) => {
......
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