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

fix: 兼容代码

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