import http from "@/api";

const PRODUCT_ATTR = `/product/attr`;
// 产品属性列表
export const getProductAttrListApi = (params: any) => {
    return http.get<any>(`${PRODUCT_ATTR}/index`, params);
};
// 产品属性详情
export const getProductAttrDetailsApi = (params: any) => {
    return http.get<any>(`${PRODUCT_ATTR}/read/${params}`);
};
// 产品属性删除
export const getProductAttrDelApi = (params: any) => {
    return http.delete<any>(`${PRODUCT_ATTR}/delete/${params}`);
};
// 产品属性更新
export const getProductAttrUpApi = (params: any) => {
    const { id } = params;
    return http.put<any>(`${PRODUCT_ATTR}/update/${id}`, params);
};
//产品属性新增
export const getProductAttrAddApi = (params: any) => {
    return http.post<any>(`${PRODUCT_ATTR}/save`, params, {
        headers: {
            "Content-Type": "application/x-www-form-urlencoded"
        }
    });
};
//
