import http from "@/api";
const MALL = `mall/store`;
// 列表
export const getMallListApi = (params: any) => {
    return http.get<any>(`${MALL}/index`, params);
};
// 详情
export const getMallDetailsApi = (params: any) => {
    return http.get<any>(`${MALL}/read/${params}`);
};
// 删除
export const getMallDelApi = (params: any) => {
    return http.delete<any>(`${MALL}/delete/${params}`);
};
//新增

export const getMallSaveApi = (params: any) => {
    return http.post<any>(`${MALL}/save`, params, {
        headers: {
            "Content-Type": "application/x-www-form-urlencoded"
        }
    });
};
//更新
export const getMallUpApi = (params: any) => {
    return http.put<any>(`${MALL}/update/${params.id}`, params);
};

// 导出
export const getMallUpExportApi = (params: any) => {
    return http.get<any>(`${MALL}/export`, params, {
        responseType: "arraybuffer"
    });
};
