feat: 修改网点api地址以及回填内容

This commit is contained in:
2026-07-14 14:22:03 +08:00
parent f065197d75
commit 74a4f25ebd
3 changed files with 46 additions and 9 deletions
+34
View File
@@ -0,0 +1,34 @@
import request from '@/sheep/request';
function normalizeList(data) {
if (Array.isArray(data)) {
return data;
}
if (Array.isArray(data?.list)) {
return data.list;
}
if (Array.isArray(data?.records)) {
return data.records;
}
return [];
}
const StoreApi = {
getStoreListByLocation: async (params) => {
const res = await request({
url: '/trade/store/list-by-location',
method: 'GET',
params,
custom: {
showLoading: false,
showError: false,
},
});
if (res?.code === 0) {
res.data = normalizeList(res.data);
}
return res;
},
};
export default StoreApi;