Commit 871fa043 authored by 武广's avatar 武广

fix: 修改获取门店问题

parent a20ed388
...@@ -17,9 +17,10 @@ const GoodsGroup = forwardRef((options, ref) => { ...@@ -17,9 +17,10 @@ const GoodsGroup = forwardRef((options, ref) => {
const [tags, setTags] = useState([]); const [tags, setTags] = useState([]);
const getShopList = async () => { const getShopList = async () => {
const user = localStorage.getItem('user'); const res = await apiSupplierShopList({
const json = JSON.parse(user); state: 1,
const res = await apiSupplierShopList(json.id); productBusiness: 1,
});
if (res && res.data && res.data.length > 0) { if (res && res.data && res.data.length > 0) {
setShops( setShops(
res.data.map(item => ({ res.data.map(item => ({
......
...@@ -320,8 +320,8 @@ export async function apiTopTakeawayGoods(data) { ...@@ -320,8 +320,8 @@ export async function apiTopTakeawayGoods(data) {
}); });
} }
// 获取供应商门店列表 // 获取供应商门店列表
export async function apiSupplierShopList() { export async function apiSupplierShopList(params) {
return request.get('/api/merchants/shops/getBySupplierId?state=1', { return request.get(`/api/merchants/shops/getBySupplierId?${stringify(params)}`, {
prefix: goodsApi, prefix: goodsApi,
}); });
} }
......
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