You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
1.8 KiB
84 lines
1.8 KiB
import axiosApi from './AxiosApi.js' |
|
|
|
const apiList = { |
|
getGroupList: `/productGroup/page`, |
|
productGroup: `/productGroup`, |
|
deleteGroup: `/productGroup/delProductCategory`, |
|
getProductList: `/product/findAdminProductList`, |
|
findCategoryList: '/productCategory/findCategoryListByDepth/', |
|
saveProduct: '/product/save', |
|
findAdminProductList: '/platformProduct/findAdminProductList', |
|
findGoods: '/platformProduct/findProductListByCategoryOrProductIdList', |
|
queryAllCategory: '/productCategory/queryAllCategory' |
|
} |
|
|
|
export default { |
|
queryAllCategory() { |
|
return axiosApi({ |
|
method: 'POST', |
|
url: apiList.queryAllCategory |
|
}) |
|
}, |
|
findGoods(data) { |
|
return axiosApi({ |
|
method: 'POST', |
|
url: apiList.findGoods, |
|
data |
|
}) |
|
}, |
|
findAdminProductList(data) { |
|
return axiosApi({ |
|
method: 'POST', |
|
url: apiList.findAdminProductList, |
|
data |
|
}) |
|
}, |
|
saveProduct(data) { |
|
return axiosApi({ |
|
method: 'POST', |
|
url: apiList.saveProduct, |
|
data |
|
}) |
|
}, |
|
findCategoryList(depth) { |
|
return axiosApi({ |
|
method: 'GET', |
|
url: apiList.findCategoryList + depth |
|
}) |
|
}, |
|
getProductList(data) { |
|
return axiosApi({ |
|
method: 'POST', |
|
url: apiList.getProductList, |
|
data |
|
}) |
|
}, |
|
getGroupList(data) { |
|
return axiosApi({ |
|
method: 'POST', |
|
url: apiList.getGroupList, |
|
data |
|
}) |
|
}, |
|
addGroup(data) { |
|
return axiosApi({ |
|
method: 'POST', |
|
url: apiList.productGroup, |
|
data |
|
}) |
|
}, |
|
eidtGroup(data) { |
|
return axiosApi({ |
|
method: 'PUT', |
|
url: apiList.productGroup, |
|
data |
|
}) |
|
}, |
|
deleteGroup(data) { |
|
return axiosApi({ |
|
method: 'POST', |
|
url: apiList.deleteGroup, |
|
data |
|
}) |
|
} |
|
}
|
|
|